The Malomo and Sendlane Integration relies on orders to be placed in order to function. Prior to setting up an Automation, ensure you have installed the Sendlane integration successfully and you have had new orders placed after the installation. You may also place and fulfill a “fake” order to yourself to trigger Malomo data to sync to Sendlane.
How to Trigger an Automation with a Malomo Event
Within your Sendlane account, navigate to Automations.
Click New Automation.
Select Start From Scratch and name the automation.
Click + Add trigger.
Select the Custom tab
Click Custom Event
Select Malomo Custom Integration in the Store dropdown.
Select No Limit in the Limit Per Contact dropdown.
Select the desired Malomo event in the Event dropdown. See here for a list of available Malomo Event Triggers.
Click Done
You’re now ready to build out your automation using Sendlane automation actions, timing, and logic. To send order and shipment notifications to your customers, select the action Send Message and then drop the Email or Send SMS into the automation under the trigger. To learn more about using Malomo data in automation messages, see here.
Available Malomo Event Triggers
This integration supports the following Malomo events as automation triggers.
Event name | Description |
| Shopify records a new order placed by a customer. |
| Shopify records a new shipment on an order and that shipment registers in the Malomo platform. |
| Only the first scan event when the shipment is in the carrier’s possession and is en route to its destination. |
| Only the first scan event when the shipment is currently on its last mile and is en route to the destination address. |
| The local delivery vehicle has reported the package was delivered. |
| The shipment was not successfully delivered and is en route back to sender. |
| The shipment is available for pickup from the carrier’s facility such as a post office. |
| A delivery was attempted but the shipment could not be delivered. |
How to Include Malomo Data in Automation Messages
To display Malomo order and shipment data in automation messages, the message must include a set data trigger code snippet and the Malomo data tags.
Add a Set Data Trigger Tag
The first line of each message must include the tag {% set data = trigger.getCustomEventData() %}
, which allows Malomo data to be pulled into your message. Without this snippet, none of your data will load, and contacts will receive mostly or entirely blank emails.
To add this tag, drop a HTML element block in the top position of a message template and copy paste the tag below:
{% set data = trigger.getCustomEventData() %}
Add Malomo Data Tags
Customer Information Data Tags
INFORMATION | EXAMPLE OUTPUT | DATA TAG |
---|---|---|
First Name | Mister |
|
Last Name | Rogers |
|
| ||
Phone Number | 123-456-7890 |
|
Delivery Information Data Tags
INFORMATION | EXAMPLE OUTPUT | DATA TAG |
---|---|---|
Estimated Delivery Date | September 19, 2021, 9PM |
|
Actual Delivery Date | September 19, 2020 10 PM |
|
Shipping Address Information Data Tags
INFORMATION | EXAMPLE OUTPUT | DATA TAG |
---|---|---|
Ship First Name | Mister |
|
Ship Last Name | Rogers |
|
Ship Company | Malomo |
|
Ship Phone | 123-456-7890 |
|
Ship Address Line 1 | 123 Rogers Lane |
|
Ship Address Line 2 | Apt. 305 |
|
Ship City | Pittsburgh |
|
Ship Province | Pennsylvania |
|
Ship Province Code | PA |
|
Ship Zip | 46205 |
|
Ship Country Code | US |
|
Ship Country | United States |
|
Shipping Information Data Tags
INFORMATION | EXAMPLE OUTPUT | DATA TAG |
---|---|---|
Carrier Service | FedEx |
|
Tracking Number | 99812911999333 |
|
Tracking Link | "Track Package" button |
|
ORDER DETAILS
INFORMATION | EXAMPLE OUTPUT | DATA TAG |
---|---|---|
Order Number | 1012 | {{ event.extra.order.number }} |
Order Name | #1012 | {{ event.extra.order.meta.shopify_order.name }} |
Order Created at Date | July 2, 2019 5:16 PM | {{ event.extra.order.meta.shopify_order.created_at }} |
Order Note | This is a note from the Shopify order notes section. | {{ event.extra.order.meta.shopify_order.note }} |
Discount Codes | THANKYOU10 | {{ event.extra.order.meta.shopify_order.discount_codes }} |
Total Discount | 0.00 | {{ event.extra.order.meta.shopify_order.total_discounts }} |
Subtotal Price | 102.00 | {{ event.extra.order.meta.shopify_order.subtotal_price }} |
Tax Price | 7.14 | {{ event.extra.order.meta.shopify_order.tax_price }} |
Shipping Price | 2.13 | {{ event.extra.order.meta.shopify_order.shipping_price }} |
Total Price | 109.14 | {{ event.extra.order.meta.shopify_order.total_price }} |
Financial Status | PAID | {{ event.extra.order.meta.shopify_order.financial_status }} |
Total Paid | 109.14 | {{ event.extra.order.meta.shopify_order.total_price }} |
Cancelled on Date | July 1, 2019 11:03 PM | {{ event.extra.order.meta.shopify_order.cancelled_at }} |
Cancellation Reason | Refund | {{ event.extra.order.meta.shopify_order.cancel_reason }} |
Total Refunded | 56.76 | {{ event.extra.order.meta.shopify_order.total_refunded_amount }} |
LINE ITEMS
Each line item represents a product purchased by the customer who is receiving the email. You can choose to show either all the products a customer ordered or all the products for an individual shipment.
LINE ITEMS IN ORDER
We recommend using a dynamic table block in Klaviyo to show all products a customer ordered. To do this, configure the data source elements as:
Row collection: event.extra.order.meta.shopify_order.line_items Row alias: line_item
Next, you'll use these variables within your dynamic table block:
INFORMATION | EXAMPLE OUTPUT | EVENT VARIABLE |
---|---|---|
Item Title | Red Sweater | {{ line_item.title }} |
Item Quantity | 1 | {{ line_item.quantity }} |
Item Variant Title: | Long Sleeve | {{ line_item.variant.title }} |
Item Image | Shows image of product | {{ line_item.image.src }} |
Item Link | URL for PDP | {{ line_item.product.url }} |
Item Final Line Price | $102.00 | {{ line_item.final_line_price }} |
LINE ITEMS IN FULFILLMENT
We recommend using a static table block in Klaviyo to show all products in a customer's shipment. To do this, add the following code before the static product block:
{% with fulfillment=event.extra.order.meta.shopify_order.fulfillments|lookup:event.tracking_code %} {% for i in fulfillment.fulfillment_line_items %}
And add the following code after the static product block:
{% endfor %}{% endwith %}
Next, you'll use these variables within your static table block:
INFORMATION | EXAMPLE OUTPUT | EVENT VARIABLE |
---|---|---|
Item Title | Red Sweater | {{ i.line_item.title }} |
Item Quantity | 1 | {{ i.line_item.quantity }} |
Item Variant Title: | Long Sleeve | {{ i.line_item.variant.title }} |
Item Image | Shows image of product | {{ i.line_item.image.src }} |
Item Link | URL for PDP | {{ i.line_item.product.url }} |
Item Final Line Price | $102.00 | {{ i.line_item.final_line_price }} |
Event Data Tag | Description | Example |
| The URL of your shop’s order tracking page. It can be a Shopify page or Malomo-hosted page. | “https://ppeev.myshopify.com/pages/order-tracking?_m_id=001d961a-2c3b-4cee-b22c-2a3d3b64b5e8" |
| The order number assigned by Shopify | “1000” |
{{ event.extra.order.meta.shopify_order.name }} | ||
| The shipment’s original estimated delivery date provided by the carrier, if available | “2019-01-30 13:30:00” |
| Standardized tracking message with relevant shipment information | “arrived_at_destination” |
| Current tracking status of the shipment | “delivered” |
| Customer email address | “john@example.com” |
| Tracking number | “9400000000000000000000” |
| Customer first and last name | “John Smith” |
| Customer shipping address | “INDIANAPOLIS, US, 46203, IN” |
| The timestamp of the latest shipment update provided by the carrier | 2019-01-30 13:30:00 |
| The carrier’s tracking page URL | “https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=9400000000000000000000” |
| Carrier name | USPS |
| Carrier service level | First-Class Package Service |
Need help or experiencing issues with the integration? Please reach out to either the Malomo Team or Sendlane Support.