At Instasent, you can have real-time events to automate processes and segment your contacts in the best possible way.
To keep your contacts updated in real time, you must follow these steps:
1. Connect your Klaviyo account
Here you can see how to integrate your Klaviyo account.
2. Understanding the Setup Instructions
Once your account is connected, you have to go to the Setup Instructions:
Then navigate to the bottom of the page, until you see this information:
Webhook URL: this is the URL youâll need to copy and use in your Klaviyo account (more information below).
Payload Example
Events accepted: these are the different events you can configure.
Weâll use as an example the coupon created event (Payload Example 2), which occurs when we generate individual coupons for each customer in our Shopify store and want to import that information.
{
"contact_id": "{{ person.KlaviyoID }}",
"event": "ecommerce_coupon_created",
"parameters": {
"coupon-name": "My coupon name",
"coupon-code": "COUPON20PERCENT",
"coupon-percentage": 20,
"coupon-category": "klaviyo-flow-123456"
}
}
3. Setting up Klaviyo
Copy the webhook URL
We take it and paste it in our flow in Klaviyo:
Once in Klaviyo, within our flow, we need to add the webhook in the exact step where we want to send the information.
We need to add a name for the webhook and then paste the URL in the Destination URL field.
â
We need to add a name for the webhook and then paste the URL in the Destination URL field.
Back in Klaviyo, within the webhook details, weâll paste the sample payload into the webhookâs JSON body field:
â
Within the JSON body, there are several pieces of data that are essential depending on the event. In this case, they would be "contact_id" and "coupon-name". In our example, the rest of the fields are optional. This may vary across events, so you should always check which fields are required for your specific event.
Variable data. Another important point is that you can use variables. For example, the coupon name is a variable. In order to configure it, you must delete the sample value:
"coupon-code": "",
Click on Event Properties (View profile & event properties). Then, look for the variable within the event that corresponds to the coupon name and click on it to copy it.
Pegamos el dato variable en la fila correspondiente
You can do this with all the variable data.
Once everything is configured as desired, click Save, then close and activate the flow.
4. Custom Events
If you want to import a custom event that isnât included in the list of available events, we recommend using automation_flow. You can use this template, which is fully editable:
{
"contact_id": "{{ person.KlaviyoID }}",
"event": "automation_flow",
"parameters": {
"name": "Mi evento de prueba",
"type": "my_event_type",
"category": "my_event_category"
}
}
For example, if you have an email flow in Klaviyo, you can create a split condition where, when a customer hasnât opened an email, this âAutomation_Flowâ event is triggered.
Make sure to configure at least the Name field so you can identify the event name later and use it to create filters in your automations.









