Please note The Klaviyo trigger is only included in specific contracts. If you are interested and would like to get access, please get in touch with your Customer Success Manager.
Introduction
Welcome to this product guide for the Klaviyo Trigger. In this guide, we will discuss how to trigger a charles Flow from Klaviyo which is the first step of connecting Klaviyo with charles.
The Klaviyo trigger is a powerful tool that can help you connect with your customers how they prefer. This trigger allows you to trigger a charles flow from a Klaviyo Flow using webhooks in Klaviyo Flows. It also allows you to send along any information from Klaviyo in the form of a JSON object.
By following the step-by-step instructions provided in this guide, you learn how to set up the Klaviyo trigger in charles, configure the webhook in Klaviyo, and how to send dynamic variables from Klaviyo to charles.
Set-Up
Create a new Klaviyo Flow or edit an existing one that you want to add the charles webhook to. Drag and drop the “Webhook” node to the position in your Klaviyo Flow from which you want to trigger a WhatsApp message.
Select Klaviyo trigger: Log in to charles, create a new flow, and select the Klaviyo trigger type from the list of available triggers.
3. Copy-Paste: Once you have selected the Klaviyo trigger type, copy the unique URL and API key that is provided by charles and Paste them into the "Webhook URL" field in Klaviyo.
If you are unfamiliar with webhooks or how they work, we recommend checking out the Klaviyo webhook guide. This guide provides a comprehensive overview of what webhooks are, how they can be used, and how to set them. Click on the link to learn more. https://help.klaviyo.com/hc/en-us/articles/4534329515931-Understanding-Klaviyo-Webhooks
JSON Payload: JSON is a data structure used to send structured information from Klaviyo to charles. The field "phone_number" is required and therefore needs to be included in the JSON payload.
By using double curly braces and the "event_properties" object, the JSON can dynamically retrieve the values of these properties from the event that triggers the flow in Klaviyo. In the "JSON Payload" section, enter the following code, replacing the variables with your data:
{
"phone_number": "{{ person.phone_number }}",
"message": "{{ event_properties.message }}",
"first_name": "{{ person.first_name }}"
}
{
"phone_number": "{{ person.phone_number }}",
"first_name": "{{ person.first_name }}"
}
Note: You can customize this code according to your needs, and add additional dynamic variables as necessary.
One way to use dynamic variables is to access customer profile properties, such as their name, email address, order history, etc. To do this, you can click on the ”View Profile Properties” button under the JSON body in Klaviyo. This will bring up a list of all the variable properties for that customer, including any custom properties you may have created.
For instance, let’s say you want to include the customer’s most recent purchase in a message. You can use the dynamic variable tag {{ recent_purchase.product_name }} to pull in the name of the product they bought. This will automatically populate with the correct information for each customer, based on their purchase history.
5. Save Trigger: Click "Save Trigger" in Klaviyo to set the webhook live.
6. Copy JSON code: Now, you need to copy the JSON response provided by Klaviyo, including any dynamic variables that you may have defined. Go back to your charles account and edit the Klaviyo Trigger parameters.
7. Paste JSON code: In the "Payload body" field, paste the JSON response you have copied from Klaviyo. It’s important to note that the payloads must match exactly, meaning they must contain the same JSON keys.
Note: Please ensure that the JSON payload in the Klaviyo webhook node and the charles platform contains the same JSON keys and variables. Even a small difference in the payloads can result in errors or failed integrations. Double-check the payloads before proceeding with the integration.
8. Save your changes. That's it! By following these steps, you can easily set up the Klaviyo trigger in charles and send targeted, personalized messages to your audience. With dynamic variables, you can include relevant information such as customer names, order details, or other custom data points to create a more engaging and effective messaging experience.
Use Cases
Cart abandonment reminders: You can use dynamic variables to send a personalized message to a customer who has abandoned their cart on your website. This can include a reminder of the products in their cart and a discount code to encourage them to complete the purchase.
Order confirmation message: You can trigger a flow in Klaviyo when a new order is placed in your eCommerce store, and then use dynamic variables to send a confirmation message to the customer via WhatsApp. This helps to provide customers with instant feedback and confirmation on their orders, improving their overall experience with your brand.
Order shipment updates: Keep customers informed about their order shipment status by triggering a flow in Klaviyo to send them a message on WhatsApp via charles. This helps to improve customer satisfaction and reduce support inquiries.