In many transactional automations, such as order confirmations, delivery confirmations, or abandoned cart messages, you need to display information that contains multiple items. This could, for example, be a list of products in an order, where each product has a name, price, quantity, image, and link.
To display this type of data, you use the Loop function in the editor.
How do you add product data in automations?
You access the Loop section by pressing Command + Shift + L on Mac or Ctrl + Shift + L on PC.
Then you choose which data source to use. In transactional messages, it is most common to use a Custom Field, since order data is usually sent to a Custom Field, often as a JSON field, for example “Order.Products,” when an order is sent to Rule.
With / you can select Loop values to display, for example, product name, quantity, or price in an order confirmation or saved cart.
To display content from a member field, such as product name or price, you write fieldname.number, where the number indicates which product is displayed (e.g., brand.1 for the first product, brand.2 for the next, and so on).
It is important that the field name matches exactly what is sent to the Custom Fields in the member profiles. If it does not match, no value will be displayed.
Loop values can also be used in images and buttons.
For images, enter the value in the image’s URL field using the format [LoopValue:image.1], where “image” is the name of the image field in the product data. If the field has a different name, use that name instead.
For buttons, select “Link to” and then “Link from loop,” and enter, for example, url.1 to get the link from the first product.
Examples of transactional automations
Abandoned cart
Abandoned cart is a follow-up message that is sent to someone who has added items to their cart and then left the website without completing a purchase. These messages work to remind customers of products they left in their cart, in order to entice them back to purchase what they were already so close to buying.
Before we show step by step how to set up such an automation, it is good to know the following:
The products need to be submitted from your e-commerce provider via an API call. Either there is an integration to Rule or you can use a third party for this that submits the data to Rule.
The fields and data sent in differ between different e-commerce providers. For example, if you have Magento, the field can be sent to Rule as "OrderNumber", if you perhaps have Centra, the field can be sent as "Order", make sure you know what fields are coming in as in Rule.
Set up abandoned cart:
Name the automation
Choose tag 'CartInProgress'
Create your email or SMS
Schedule them for after how long the communication should be sent after a customer has abandoned their cart
Activate the email or SMS
Activate the entire loop
It is worth mentioning that as long as the Cartinprogress call is correctly set up via API/Integration, the flow will be interrupted if the customer places an order before the email regarding the abandoned cart is sent.
In other words, you do not have to worry about the customer receiving a message about an abandoned cart if they have already completed it.
Receipt automations (Order confirmation/Delivery confirmation)
One of the most common but also most important transactional emails is receipts. In order for Rule to send receipts, we need the "Event" that an order has been placed. Then the tag OrderCompleted is added to the subscriber, as well as order data. All of this is set up automatically when the E-commerce integration is in place.
Name the automation loop
Choose trigger OrderCompleted, or Ordershipped depending on which automation you are setting up
Set timing for your communications
Activate the communication
Activate the entire automation loop





