ChangelogBook a demoSign up

Handling webhooks

Use functions to reshape webhook payloads before Hightouch writes them to your warehouse or sends them to destinations.

These webhooks usually contain event data that are helpful for building a full profile of your users. For example, Shopify has webhooks for when users check out, and Iterable has webhooks for when users open emails.

To set this up, create a webhook source and add it to the tool that emits events. You can then process the raw webhook data using functions.

For example, your code might look something like:

async function transformEvents(events) {
  return events.map((event) => ({
    ...event,
    type: "track",
    event: event.event,
    messageId: event.messageId,
    properties: {
      ...event.properties.body.dataFields,
      email: event.properties.body.email,
    },
    anonymousId: event.properties.body.userId
      ? null
      : event.properties.body.email,
    userId: event.properties.body.userId,
  }));
}

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Privacy PolicyTerms of Service

Last updated: Jun 25, 2026

Was this page helpful?