Skip to content

Shopify variables

A WhatsApp template has placeholders such as {{1}} and {{2}}. When you set up an auto message, you choose what goes in each one. This page lists what’s available.

When you choose a template for an auto message, LoopChat lists every placeholder in the order customers read them: Header, then Body, then Footer, then Button URLs. Each one is labelled with where it appears, for example Body — Variable {{1}}.

Fill each one from the variable list or with fixed text. The list beside the form is grouped into From this event, Computed — fetched on send, Contact fields and System, and only shows what that auto message receives.

Clicking a variable inserts its full name, for example {{playbook-trigger.orderDetails.name}}. The tables below use the short part after playbook-trigger..

For Order Placed, Order Confirmed, COD Confirmation, Order Cancelled and WhatsApp catalogue orders.

Variable Contains
orderDetails.name The order name, for example #1001
orderDetails.id The order ID
orderDetails.total_price The order total
orderDetails.total_price_formatted The total with currency, ready to show
orderDetails.currency The currency
orderDetails.item_count How many items
orderDetails.product_names The products ordered
orderDetails.product_url A link to the product
orderDetails.discount_codes_used Discount codes used
orderDetails.status Order status
orderDetails.financial_status Payment status
orderDetails.fulfillment_status Fulfilment status
orderDetails.note The order note
orderDetails.order_status_url A link the customer can open to track the order

Put orderDetails.order_status_url in a link button. It saves the customer asking where’s my order? later.

Order Cancelled also has cancelReason.

Variable Contains
orderDetails.customer.first_name First name
orderDetails.customer.last_name Last name
orderDetails.email Email address
orderDetails.customer.phone Phone number

For Order Shipped, Out for Delivery, Order Delivered and Return to Origin.

Variable Contains
fulfillmentDetails.tracking_company The courier
fulfillmentDetails.tracking_number The tracking number
fulfillmentDetails.tracking_url The tracking link
fulfillmentDetails.status Shipment status

These auto messages also have orderDetails.name, orderDetails.total_price, orderDetails.total_price_formatted and the customer details above.

Variable Contains
checkoutDetails.abandoned_checkout_url The link back to the customer’s cart
checkoutDetails.total_price The cart total
checkoutDetails.total_price_formatted The total with currency
checkoutDetails.item_count How many items
checkoutDetails.product_names The products in the cart
checkoutDetails.customer.first_name The customer’s first name

The cart link is the whole point of this message. Put it in a link button so going back is one tap.

For Refund Issued: refundDetails.amount_formatted, refundDetails.amount, refundDetails.order_id, refundDetails.note and refundDetails.status, plus the order and customer details.

For New Customer: customerDetails.first_name, customerDetails.last_name, customerDetails.email and customerDetails.phone.

Under Computed — fetched on send, LoopChat looks these up at the moment the message is sent: the customer’s number of orders, total spent and tags.

Available everywhere, from the LoopChat contact:

Variable Contains
contact.name Contact name
contact.phone_number Phone number
contact.email Email address
contact.custom_fields.<field> Any of your custom fields

Available everywhere. Handy for deadlines and dates:

Variable Contains
system.date Today, as YYYY-MM-DD
system.time The current time
system.datetime A readable date and time
system.date+1, system.date+7, system.date+30 Tomorrow, in a week, in a month
system.date-1, system.date-7 Yesterday, a week ago
system.time+30m, system.time+1h Times from now
system.weekday, system.year, system.month, system.day Parts of today’s date

system.date+1 is how you write please confirm by tomorrow without typing a date that goes out of date.

On timed auto messages (abandoned cart, review request and repeat purchase), each reminder has a discount code box, and you can use {{coupon}} in the template to show it. Other auto messages can’t add a discount code.

  • Fill every placeholder. An empty one leaves a gap in the message.
  • Check the preview against a real order. The field that looks right in the form is the one that’s empty on a real order.
  • Use the first name, not the full name. It reads like a message, not a database.
  • Put links in buttons, not the message. People tap buttons far more than links in text.