Connecting Klaviyo to ReturnZap
About the ReturnZap Klaviyo Integration
ReturnZap can sync return events to Klaviyo in order to enrich Klaviyo profiles and allow custom email notifications flows.
ReturnZap will push custom events to Klaviyo when a return is created and when a return is updated in ReturnZap. Return updates are triggered when a return's stage is changed - for example, from "Waiting for Return" to "Received".
ReturnZap will use the email address associated with the Shopify order to match the return to the customer's profile in your Klaviyo account. If no email address exists for this customer then a new customer profile will be created in Klaviyo.
In order to use the Klaviyo integration, you must generate an API key in your Klaviyo account and connect it to ReturnZap.
The Klaviyo integration is available to ReturnZap customers on the ReturnZap Plus plan tier and above
Creating a Klaviyo API Key
To create an API key in Klaviyo you will need to follow these steps:
- Log in to your Klaviyo account
- Navigate to the Klaviyo Settings page and click API Keys
- Click Create Private API Key
- Give your API key a name - we recommend calling it 'ReturnZap'
- Choose the proper scope for the newly created API Key. ReturnZap requires Read|Write access for the Events scope in Klaviyo.
- Save your API key
See full details on creating a Klaviyo API key here:
https://help.klaviyo.com/hc/en-us/articles/7423954176283
Connecting your Klaviyo API Key to ReturnZap
Next, you will need to add your Klaviyo API key to ReturnZap.
Navigate to ReturnZap Settings > Integrations > Klaviyo. Enter in your newly created API key and click to save the page.
Once an API key is saved in ReturnZap, the integration with Klaviyo will be active and return events will begin syncing to your Klaviyo account.
Return Events Synced to Klaviyo
Return Created Events
When a new return is created in ReturnZap, ReturnZap will create a custom event in Klaviyo with the name ReturnZap Return Created. This will be linked to the user's profile via the email address. The payload will contain:
id: 45269 rma_number: 1.1761 customer_email: customer@example.com is_archived: false customer_first_name: ReturnZap customer_last_name: Customer shopify_order_id: 5837699285243 shopify_order_number: 1761 rma_form_url:link_to_rma_form stage_id: 173094 stage_label: Waiting for Return system_stage: 1 created_at: 2024-10-03T19:12:37.944325+00:00 tracking_number: 12345 shipping_method: self customer_address: {"street1":"Wrigley Field","street2":"","city":"Chicago","state":"IL","zip":"60613","country":"US"} items: [{"id":"123","sku":"TOY431","quantity":1,"value":14.99,"return_reason":"Did Not Like","comment":"Customer Comment","vendor":"Vendor Name","presentment_discounted_amount":"14.990","presentment_currency":"USD","title":"Activity Auto","title_clean":"Activity Auto","return_type":"REFUND","image_url":"Shopify Image URL","exchange_item":null}] shipment: {"tracking_url":"shipment_tracking_URL"}
Return Updated Events
When a return's status changes, ReturnZap will create a custom event in Klaviyo with the name ReturnZap Return Updated. The payload synced to Klaviyo will look like this:
id: 45269 rma_number: 1.1761 customer_email: customer@example.com is_archived: false customer_first_name: ReturnZap customer_last_name: Customer shopify_order_id: 5837699285243 shopify_order_number: 1761 rma_form_url:link_to_rma_form stage_id: 280129 stage_label: In Transit system_stage: null created_at: 2024-10-03T19:12:37.944325+00:00 tracking_number: 12345 shipping_method: self customer_address: {"street1":"Wrigley Field","street2":"","city":"Chicago","state":"IL","zip":"60613","country":"US"} items: [{"id":"123","sku":"TOY431","quantity":1,"value":14.99,"return_reason":"Did Not Like","comment":"Customer Comment","vendor":"Vendor Name","presentment_discounted_amount":"14.990","presentment_currency":"USD","title":"Activity Auto","title_clean":"Activity Auto","return_type":"REFUND","image_url":"Shopify Image URL","exchange_item":null}] shipment: {"tracking_url":"shipment_tracking_URL"}