Skip to main content

How to Use Custom Data in Webhook-Based Automations

Webhook-based automations allow you to personalize your WhatsApp survey and notification messages using dynamic data sent directly from external systems (such as your e-commerce platform, CRM, or backend billing systems).

Whether you need to include a customer’s name, order ID, delivery date, or a custom account balance, you can pass these values through the webhook payload and map them directly into your WhatsApp templates.

Step 1: Adding Custom Variables to Your Message Template

Before your automation can display dynamic customer data, your WhatsApp message template must be created with placeholders for that information.

  1. Go to Settings > WhatsApp Templates and click Create a template.

  2. Select your desired automation usage type (e.g.,CSAT, Post Purchase Review, etc).

  3. Choose Create from Scratch

  4. Choose the correct usage according to the automation you want to use the template for. Name your template using English letters or numbers, and choose the template langauge.

  5. In the Body text box, insert custom variables from the dropdown.

  6. If the custom field you require isn't available, then add it by clicking "custom field", write the variable name, and clicking the plus sign.

  7. Add your attached WhatsApp Flow button label, header/footer text if needed, and click Submit template for approval.

Step 2: Capturing the Webhook Payload Schema

To map your incoming system data to these template variables, the automation engine first needs a sample of the data your system sends.

  1. Go to Automations > New Automation and choose your webhook-based automation type.

  2. Click Set up, copy the generated Webhook URL, and paste it into your external system's webhook target.

  3. Trigger a test webhook payload from your external system to this URL.

  4. The automation builder captures this incoming JSON/XML response, automatically generating a tree schema of all available fields (e.g., customer.first_name, order.id, shipping.address).

Vital: make sure you send all the custom customers information variables you want to add to the template message.

Step 3: Mapping Webhook Fields to Your Template Variables

Once the sample schema is captured, you can connect the dynamic payload data directly to your message template placeholders.

  1. In the automation builder, proceed to the Template Setup step and select your approved message template.

  2. Upon selecting the template, the system automatically detects all variables defined in Step 1.

  3. Click the dropdown field next to each variable placeholder to open the captured payload tree.

  4. Select the corresponding path from your webhook response

  5. Click Save and Publish your automation.

When a live event occurs, the automation extracts the exact values from the incoming webhook payload, replaces the custom fields with real customer data, and delivers a fully personalized WhatsApp message instantly.

Did this answer your question?