Skip to main content

Overview

If you want to customize your email design with different data, Splio allows you to do that by following a specific syntax that is detailed in different guides in this section. In this guide, we are focusing on the data around “transactions” (orders or abandoned carts) and we call this a “transactional loop”. The syntax you will find in this article is to be used in the HTML Editor. For more details on how to insert this syntax in Message Builder, you can refer to this guide, and for ready-to-use examples, this one.

Transactional loops can be used only in the campaigns that use orders and abandoned carts as populations:

Using order loops for purchase confirmation

Use the ORDER keyword to refer to orders. Such a loop is processed once for every product found on the order and is useful for post-purchase campaigns.

Explanation:

  1. The platform goes over the loop once for every product in the current order (that is, every order line).

  2. Each time it goes through the loop, data from the product fields (name, brand, price, image) is added to the current message.

  3. You can add any field of the order outside of the loop as shown in the example with the order ID (first line).

Exclude products from an order loop

You need to make sure that when you display all products found on an order, you never show certain products (free products for example).

Explanation:

The instructions to display a product image and its name are enclosed not only in a loop but also between {SPLIO IF} and {SPLIO ENDIF}. Whenever the external_ID of the product equals 987153, 777787, 777781, or 227526, or if the product type is box, Splio will not display them. (Because all the negative conditions must be met to display the product.)

Using abandoned cart loops

You can refer to abandoned carts using the BASKET keyword. This creates a loop that is then processed once for each product placed in the current abandoned cart.

Explanation:

  1. Splio processes the loop once for every product (item) in the current basket (abandoned cart).

  2. Each item becomes a table cell, and every 3 cells are gathered into a table row.

  3. The name, brand, and price data are written into the cell, and a product image is added too.

  4. Once all products have been displayed, the total value of products in the cart is written below in a separate row.