Solved

Tracking number from shipstation

  • 7 January 2021
  • 3 replies
  • 251 views

Badge

I am working on a flow to let my customers know that their order has been shipped and want to send them their tracking number.  I use shipstation and have it integrated into Klaviyo, but don’t know how to pull that tracking number from shipstation and put it into the email.  Is this possible to do and if so how do I do it?

icon

Best answer by ksanfelipe 10 January 2021, 17:16

Hey @harwardm !

Events that sync to Klaviyo include data that can be used in your email templates. When you are working with an event/metric-triggered flow, you can use the Preview tool in the template editor to add dynamic content to your template. I’d recommend checking out our instructions here: https://help.klaviyo.com/hc/en-us/articles/115002779071-Personalize-Flow-Emails-with-Dynamic-Event-Data#how-to-find-event-variables3

To give you a general process to follow:

  1. Create a flow with the trigger event that you are wanting to use (Order shipped, Order on hold, etc)
  2. Add an email action under the flow trigger
  3. Configure email content. Open the preview tool in our template editor, and find the line of event data that refers to the “Tracking Number”
  4. Click on that, and see that it provides a code slug for you to insert into your template
  5. Copy the code slug, and paste it into your template!

These instructions are covered in the help doc linked, but hopefully that gives you further clarity. Reply back if you have any other questions!

View original

3 replies

Userlevel 3
Badge +1

Hey @harwardm !

Events that sync to Klaviyo include data that can be used in your email templates. When you are working with an event/metric-triggered flow, you can use the Preview tool in the template editor to add dynamic content to your template. I’d recommend checking out our instructions here: https://help.klaviyo.com/hc/en-us/articles/115002779071-Personalize-Flow-Emails-with-Dynamic-Event-Data#how-to-find-event-variables3

To give you a general process to follow:

  1. Create a flow with the trigger event that you are wanting to use (Order shipped, Order on hold, etc)
  2. Add an email action under the flow trigger
  3. Configure email content. Open the preview tool in our template editor, and find the line of event data that refers to the “Tracking Number”
  4. Click on that, and see that it provides a code slug for you to insert into your template
  5. Copy the code slug, and paste it into your template!

These instructions are covered in the help doc linked, but hopefully that gives you further clarity. Reply back if you have any other questions!

Badge

Hello team Klaviyo,

after following the docs, I did find the code for tracking number. We currently use bigcommerce and shipstation.

{{ event.extra.shipments.0.tracking_number }}

 

 

We tried to place it in an <a>tag, yet the link wasn’t working.

<a class="button1" href="{{ event.extra.shipments.0.tracking_number }}">Tracking</a>

 

We prefer not showing the code number but to link them directly to the usps website.

Is this possible?

Userlevel 6
Badge +4

Hello @salamiadil

Glad the tips that @ksanfelipe provided helped in locating that tracking number syntax!

Do you happen to only use USPS for shipping? Since that dynamic syntax is only going to return the actual tracking number and not a link/URL inclusive of that tracking number, your best option would be to amend the {{ event.extra.shipments.0.tracking_number }} syntax as part of USPS’s tracking link. For example: www.tools.usps.com/go/TrackConfirmAction.action?tLabels={{ event.extra.shipments.0.tracking_number }}

This would return the USPS’s tracking site with the amended tracking number and perform the query with that specific customer’s tracking to return your desired results. 

Other URL prefixes you can use to create these dynamic URL links for tracking:

Hope this helps!
-David

Reply