Functions give you the power to create custom transformations on
Hightouch Events. By writing
Javascript code, you can easily modify event properties, validate fields, or
enrich your event data!
Test the function works as expected by using the test panel in the function
code editor view.
Simply modify the input in the test panel, and hit Test. Results will be
displayed in the output panel, along with any console logs. If the function
errors during execution, the error and stack trace will be displayed.
To save a function, hit Save changes at the bottom of the code editor.
Upon save, if the function is connected to any event syncs, the new function
code will immediately be used.
To connect a function to a sync, use the Connected syncs tab. Here you can
easily connect or disconnect a function from a sync. When a function is connected
to a sync, events in the target event sync will immediately begin to be transformed by
the function.
Note: a function can be connected to multiple syncs, but a sync can only have
one function connected to it at a time.
Functions are executed after contract validation (if a contract is defined
for the respective event source). This means events blocked by contracts
are not able to be transformed using functions.
Use Promise.all to run async code in parallel, reducing the chance of
hitting a timeout
If a function errors, the entire batch is failed and will be retried
based on the sync retry configuration
Ready to get started?
Jump right in or a book a demo. Your first destination is always free.