How to Connect Klaviyo with Your TrackMage Account and Set Your First Automated Email Flow

           Table of contents:

  1. Connect your TrackMage account with Klaviyo  
  2. List of Events (metrics) 
  3. Review the event streamlines
  4. Create Your First Automated Email Flow 

Connect your TrackMage account with Klaviyo 

1. To connect your TrackMage account with Klaviyo, go to the side menu and click the Automation tab. Then click Integrations and select Klaviyo in the list of integrations, when the Integrations is open. Click on the Install button in the right-upper corner.

2. Follow the opened new tab, and  Select the team and workspace in your TrackMage account, that you want to connect Klaviyo to (1). Mark the checkbox Agree to the Terms & Conditions and Privacy Policy, after reading it (2), and click Next (3) to proceed.

3. Now allow TrackMage access to your account information in Klaviyo.

4. Congrats! Your Klaviyo account was connected and you can see a success message in the TrackMage notifications.

5. First, let's check on available metrics (events) that will be sent to Klaviyo following significant actions, updates, or occurrences within TrackMage. Find the Analytics tab in the side menu (1), and click on it. Then click on Metrics (2).

6. On the page open, scroll down to check the TrackMage's metrics.

List of the events (metrics), that TrackMage will send to Klaviyo

For your convenience here is a list of all the events (or metrics) with a brief explanation:

TrackMage - Order Partially Shipped - the event will be sent after the order is partially fulfilled or fully fulfilled, but some of the shipments have no tracking numbers or are in the status No Info.

TrackMage - Order Shipped - the event will be sent after the order is fulfilled, all of the linked shipments have tracking numbers assigned and are in statuses other than No Info.  Another requirement is that the last linked shipment reaches Pre-Transit, In Transit, Return to Sender, Transit Limit Exceeded, Customs Clearance, or Exception statuses.

TrackMage - Consider Shipment Delayed - this event will be sent each day if the shipment will be in transit for more days than it's set for the preferred origin/destination carrier.

TrackMage - Shipment Created  - the event will be sent after the shipment is created without the tracking number.

TrackMage - Shipment Shipped -  the event will be sent once the tracking number with statuses Pre-Transit, In Transit, Return to Sender, Transit Limit Exceeded, Customs Clearance, and Exception is assigned to the shipment without the linked order.

TrackMage - Shipment Customs Clearance Processing - the event will be sent when the shipment gets Customs Clearance status.

TrackMage - Shipment Delivery In Progress - the event will be sent when the shipment gets Delivery in Progress status.

TrackMage - Shipment Expired -the event will be sent when the shipment gets Expired status.

TrackMage - Shipment Available For Pickup - the event is sent when the shipment is marked as Available For Pickup.

TrackMage - Shipment Delivered - the event will be sent when the shipment gets Delivered status.

TrackMage - Shipment In Transit - the event will be sent when the shipment gets In Transit status.

TrackMage - Shipment Return To Sender - the event will be sent when the shipment gets Return To Sender status.

TrackMage - Shipment Transit Limit Exceeded - the event will be sent when the shipment gets Transit Limit Exceeded status.

TrackMage - Shipment Unsuccessful Delivery - the event will be sent when the shipment gets Unsuccessful Delivery status.

TrackMage will also update Klaviyo profiles with any missing data that is added to TrackMage after the relevant event is sent.

Review the event streamlines

Reviewing the streamlines for the events will help you get additional
context and clarity. Let's take a look at them

1.  When you create a new shipment without a Tracking Number on TrackMage the event Shipment created will be sent to Klaviyo. 

2.  At TrackMage, you can link a shipment to one or more orders in certain situations. When you link the order to the shipment with the Tracking Number, TrackMage will first check if the shipment status is No Info. If it's not, it will then check if all the linked shipments for the order have been sent. If they have, TrackMage will send an Order Shipped event. If there are still items in the order that haven't been fulfilled, or some shipments haven't been sent yet, TrackMage will send an Order partially shipped event.

3. When a tracking status changes, TrackMage will send a Tracking Status event. This event will follow the status change, which could be Customs Clearance Processing,  Delivery In Progress, Expired,  Available For Pickup, Delivered, In Transit,  Return To Sender, Transit Limit Exceeded, or Unsuccessful Delivery.

Next, the system will perform a few checks. If the previous tracking status was No Info, the system will check if the shipment has an order assigned. If not, and the shipment is in statuses Pre-Transit, In Transit, Return to Sender, Transit Limit Exceeded, Customs Clearance or Exception, TrackMage will send the Shipment shipped event. If yes, and the order is fully fulfilled and all the linked shipments were sent, TrackMage will send the Order Shipped event. If there are shipments, that haven't been shipped yet, linked to the order or it is partially fulfilled, TrackMage will send an Order Partially shipped event.

The Tracking Status event will be sent every time the tracking status changes.

4. And the last case is the Consider Shipment Delayed event (CSD). TrackMage lets you set preferred carriers for every workspace you have. For each of these carriers, you can set how many days a shipment can be in transit before the system considers it delayed. If CSD is set for the carrier you use for the shipment and the shipment has been in transit longer than the number of days you specified, TrackMage will send a Consider Shipment Delayed event to Klaviyo. You can use this event to communicate with your customers, letting them know that their shipment is delayed and maybe offering them a small gift or a discount on their next purchase.

This event will be sent daily as long as the shipment has the status "In Transit" or the "Transit limit exceeded".


Create Your First Automated Email Flow

In this article, we will create a workflow to automatically send emails after the Order is shipped. We will configure one email to go out in a different language from the default. It will also send a text message if certain conditions are met. Both the international email and text will be triggered after the same Order Shipped event.

Please keep in mind that the order or shipment must have a valid email address assigned for the customer to receive updates through emails.

7. In your Klaviyo account, go to the Flows section (1) and then click on the Create Flow button (2) in the right-upper corner of the page.

8. Next, click on the Create From Scratch button in the upper-right corner of the page, that was open.

9. In the modal window, that appears, type in the name for the flow (1) and click the Create flow button (2).

10. When the flow-builder is open, select Metrics from the Triggers list.

11. Now select Order shipped in the Metrics list.

12. Then click the Save button.

13. Here we'll split the flow, by adding a Trigger split. Grab the Trigger split block and add it to the flow. Now set a condition to split the flow. We'll set the condition that if the shipping country is Mexico, the email in the Spanish language will be sent, if not - the email in English will be sent along with the SMS. Click Close when you're done.

14. Now grab an email block and add it to both paths. Then click on the one, that goes after the YES option. This means we'll set this email in Spanish. 

15. Edit email details (1) and click the Select template button (2) 

16. Pick any template from the list and click the Use Template button.

17. Click on the text block on the template to edit it.

18. Change the text to what you need (1), check that it's displayed on the template (2), and click on the Preview & test button (3).

19. Here's a little tip - to use data (like customer's First Name, Last name, Order Number, Tracking Page link, etc.) from orders or shipments you will need to add different variables to your emails. You can find the list of the variables on the right side of the Preview email page. Simply click on the variable to copy it. Then you can paste it to your email.

20. Now click Send test (1), type in an email address you want to test your email on (2), click Send (3), and Done after the success pop-up appears (4).

21. Go to your email and check it - you will receive a letter with test data.

22. Now go back to Klaviyo and click on the Save button.

23. Next, check the details for your email (1) and click Done (2).

24.  Use steps 14-22 to set an email in English. Use variables from the Preview page to send all the data in English.

25. Now, let's set an SMS to be sent to international users. Grab the trigger split block and add it under email #2 (1), add the condition phone number is set (2), and click the Save button (3).

26. Select the SMS option, add it to the Yes option in the flow (2), and click the Edit button in the Content block (3).

27. Add text to the SMS content (1). You can use the same variables, as for the email in English. Check if the data is displayed properly in the preview (2), and click Save when you're done (3).

28. Now set the SMS status as live (1). That's it! Your first flow is built! Now click on the Update action statuses button (2). 

29. Click Turn On in the pop-up window, when it appears.

30. And now let's test it 😎 Go to your TrackMage account and fulfill any order. Make sure it has email and the shipping country is Mexico. Assign the tracking number to the created shipment. We use the tracking number with the status In Transit.

31. Check on the Activity Feed at your Klaviyo account - there are three events received - Shipment Created, Order shipped, and Shipment in Transit  (1). An email was sent to the email address, given in the order (2).


The customer will only receive an email for the metrics, used in live flows.


32.  As expected, the received email is in Spanish. 

33. Next you can fulfill any order at TrackMage with a shipping country other, than Mexico. This will let you test if you receive an international email and SMS (If your email and phone number will be added to the Order details).

Congrats! You've successfully integrated Klaviyo into your TrackMage account and learned how to create a flow with metrics, received from TrackMage!

Find more info about Klaviyo integration here.

Learn about TrackMage's Branded Tracking Pages here.

Should you have any questions or need help, please Contact Us.

Did this solve your problem?