Klaviyo: Intergration with the app [TOC] ### Integration Steps 1. Install [Trackingmore](https://apps.shopify.com/trackingmore "Trackingmore") Shopify App 2. Make sure you have an active Klaviyo account 3. In Klaviyo, go to Account → Settings → API Keys → [**Public API Key**](https://www.klaviyo.com/account#api-keys-tab "Public API Key"), copy it 4. Open TrackingMore Integrations tab, paste to Klaviyo **Public API Key**, click Connect. 5. Once enter Klaviyo API Key, you can use TrackingMore event metrics to trigger a flow. ### Understanding Variables Trackingmore Events are coming with **currentStatuses** & **substatus** for each shipment, which are powerful segmentation triggers for Klaviyo Flows. Below it's a simple example we recommend.  Variable name: currentStatus | currentStatus|Description| | :------------ | :------------ | | Pending | Package tracking information is no available yet, or courier is awaiting package| | Transit | Courier has picked up package from shipper, the package is on the way to destination | | Out for Delivery | Also known as "Out For Delivery", courier is about to deliver the package, or the package is wating for addressee to pick up | | Delivered | The package was delivered successfully | | Expired | No tracking information for 30days for express service, or no tracking information for 60 days for postal service since the package added | | Failed Attempt | Also known as "Failed Attempt", courier attempted to deliver but failded, usually left a notice and will try to delivery again | | Exception | Package missed, addressee returned package to sender or other exceptions | Variable name: substatus |substatus| Description | | :-------- | :--------- | | delivered001| Package delivered successfully | | delivered002 | Package picked up by the addressee | | delivered003 |Package received and signed by addressee | | delivered004 | Package was left at the front door or left with your neighbour | |undelivered001| Address-related issues | | undelivered002 | Receiver not home | | undelivered003 | Impossible to locate the addressee | | undelivered004 | Undelivered due to other reasons | |exception004| The package is unclaimed | | exception005 | Other exceptions | | exception006 | Package was detained by customs | | exception007 | Package was lost or damaged during delivery | | exception008 | Logistics order was cancelled before courier pick up the package | | exception009 | Package was refused by addressee | | exception010 | Package has been returned to sender | | exception011 | Package is beening sent to sender | |pickup001| The package is out for delivery | | pickup002 | The package is ready for collection | | pickup003 | The customer is contacted before the final delivery | |transit001| Package is on the way to destination | | transit002 | Package arrived at a hub or sorting center | | transit003 | Package arrived at delivery facility | | transit004 | Package arrived at destination country | | transit005 | Customs clearance completed | ### Available data inside Klaviyo events | Property name | Template tag| Example | | :------------ | :------------ | :------------ | | CarrierName | {{ event.CarrierName }} | UPS | | CarrierContact | {{ event.CarrierContact }} | 1 234 567 8900 | | TrackingCode |{{ event.TrackingCode }} | RA123456789CN | | OrderNumber | {{ event.OrderNumber }} | #1234 | | CurrentStatus |{{ event.CurrentStatus }} | Delivered | | Substatus | {{ event.Substatus}} | delivered001 | | ExpectedDeliveryDate | {{ event.ExpectedDeliveryDate }} | 2021/10/22 | | LastestCheckpointTime | {{ event.LastestCheckpointTime }} | 2021/10/22 21:16 | | TransitTime | {{ event.TransitTime }} | 7 | | OrderEmail | {{ event.OrderEmail}} | example@email.com | | OrderPhone | {{ event.OrderPhone }} | +1 234 567 8900 | | ProductNames | {{ event.ProductNames }} | IPod Nano, Iphone12 | | FirstName | {{ event.FirstName }} | Bob | | last_name | {{ event.LastName }} | Norman | | TrackingPagelink | {{ event.TrackingPagelink }} | https://your-store.myshopify.com/apps/trackingmore/?order=12345&email=customer-email| | CarrierTrackingLink | {{ event.TransitTime }} | http://www.fedex.com/Tracking?language=english&tracknumbers=61290980851223631052 | | FulfillmentCreatedDate | {{event.FulfillmentCreatedDate}} | 2021/10/22 | | ShippingAddress | {{ event.ShippingAddress }} | 2259 Park Ct | | ShippingCity | {{ event.ShippingCity }} | Drayton Valley | | ShippingCountry | {{ event.ShippingCountry }} | Canada | ### Advanced In addition to the basic information about the order, the **LineItems** field contains an array of information about each line item in the order. You can reference this data for building templates, branching logic based on package contents, and so on. This is stored in a 0-indexed array, so you can easily access an individual item or loop over it to get the entire contents. | Property name | Template tag | Example | | :------------ | :------------ | :------------ | | ProductName | {{ event.LineItems.0.ProductName }} | IPod Nano | | Quantity | {{ event.LineItems.0.Quantity }} | 1 | | VariantImage | {{ event.LineItems.0.VariantImage }} | https://shopify.com/path/to/image-variant.jpg | | Price | {{ event.LineItems.0.Price }} | 50 | | VariantName | {{ event.LineItems.0.VariantName }} | IPod Nano - Pink | | SKU | {{ event.LineItems.0.SKU }} | IPOD-342-N |