Build a custom connector that looks and feels just like a native destination
If you need to connect to a destination Hightouch doesn't support yet, we recommend using the HTTP Request destination. Please also —we're always gauging interest in new destinations.
The Embedded Destination framework allows Hightouch users to develop their own custom data connector and use it as an extension of Hightouch's existing library.
If you are looking to send data to a private API or a SaaS tool that Hightouch doesn't support, you can use Hightouch to send data to your own connector in a specific format, while continuing to use all of our alerting, reliability, and error handling systems.
To implement the destination, Hightouch will need users to provide information on what objects, modes, and fields are available in the destination, as well as how data is synced.
Embedded destinations in Hightouch are implemented by providing information of two steps:
Sync configuration: Hightouch needs information on what objects, modes, and fields are available, as well as custom forms
Sync execution: Hightouch sends data that needs to be synced to a method on your connector, which should format and send the data to the destination and return a success or error response
Hightouch uses the following methods to render the configuration form.
These methods can be optionally implemented and used in any combination:
list_objects: Retrieves a list of objects available in the destination (for example, users, organizations, etc.)
list_modes: Retrieves a list of modes available in your implementation (for example, upsert, update, mirror, etc.)
list_fields: Retrieves a list of object fields, including identifiers and custom fields
list_options: Retrieves a JSON schema of custom configuration fields, which will be rendered into a form based on react-jsonschema-form
validate: This method is called when a user attempts to save the configuration form, and is used to display errors that aren't handled automatically by default or by JSON schema
When all the methods are implemented and all the concepts are used in conjunction, there is a hierarchy where objects must be selected first before modes are shown, and modes must be selected before fields and options are shown.
This is because the mode options shown are conditional on the object selected, for example, "upsert" and "update" can be enabled for the "user" object, but only "update" is enabled for the "organizations" object.
This will render a form similar to the example above.
When only list_options is implemented, Hightouch will render a form based on the JSON schema. Note that all formats such as dropdowns, arrays, text areas are available. In this case, only the list_options method is implemented.
The other methods such as list_objects aren't implemented, and therefore selecting an object is not required.
The Embedded Destination acts as a transformation and parsing layer between Hightouch and any API. Hightouch calls the following methods when a sync is run, either by schedule or manual run.
When a sync is run, Hightouch first calls for information on sync behavior, then sends sync requests of each operation (add, change, remove) with the data and configuration in batches of a specified size:
behavior: Retrieves behavior settings such as batch size, which operations to send, etc. for the sync run
add: This method is called with a batch of raw data from rows that have been added since the last sync run, as well as configuration details
change: This method is called with a batch of raw data from rows that have changed since the last sync run, as well as configuration details
remove: This method is called with a batch of raw data from rows that have been removed since the last sync run, as well as configuration details
Each of the add, change, remove methods should return a response with any errors encountered when sending the data to the destination API.
Hightouch supports the following field types. Hightouch will not automatically cast the value to this type, nor will it validate whether the data in the row is of that type. it's generally just for suggestion and display purposes.
This method should return the schema and uiSchema of the form that you would like to render. Hightouch uses React JSON Schema Form to build a form out of a semi-standard JSON Schema.
If your schema at the highest level is an object, we will spread the properties into the configuration, how
Name
Description
object
ID of object selected in the configuration (can be undefined if list_object not implemented or returned an empty object array)
mode
ID of mode selected in the configuration (can be undefined if list_mode not implemented or returned an empty mode array)
{"options":{"schema":{"type":"object","properties":{"channel":{"title":"Channel","description":"Channel that messages are sent to.","type":"string","enum":[1,2,3],"enumNames":["#general","#engineering","#marketing"]},"message":{"label":"Message","description":"Template for messages in Liquid format.","type":"string"}}},"uiSchema":{"message":{"ui:widget":"textarea"}}}
{"configuration":{"object":"user","mode":"upsert","identifierMapping":[{"from":"user_email","to":"email"}],"mappings":[{"from":"user_fn","to":"first_name"},{"from":"user_ln","to":"last_name"}],"customMappings":[{"from":"user_ltv","to":"ltv"}],// the following properties come from custom configuration from list_options"archiveOnRemove":true}}
{"idColumn":"user_email","configuration":{"object":"user","mode":"upsert","identifierMapping":[{"from":"user_email","to":"email"}],"mappings":[{"from":"user_fn","to":"first_name"},{"from":"user_ln","to":"last_name"}],"customMappings":[{"from":"user_ltv","to":"ltv"}],// the following properties come from custom configuration from list_options"archiveOnRemove":true},"rows":[{"user_email":"alice@hightouch.com","user_fn":"Alice","user_ln":"Doe","user_ltv":0},{"user_email":"bob@hightouch.com","user_fn":"Bob","user_ln":"Doe","user_ltv":10}]}