Skip to main content

Repeat a block of items in your emails

💡 Good to know
Our Dynamic list option is now called Repeat block and is available in the Drag & Drop editor.

In this article, we will explain how to use the Repeat block feature to insert a single block of items that will automatically repeat itself and iterate over all items within a single variable.

You can repeat a block in:

  • an email receipt email to display all the items your client has purchased,
  • an abandoned cart email to display all the items that were left in your client's cart,
  • an RSS campaign to automatically display a series of blog articles,
  • etc.
❗️ Important
After adding your placeholders in your email, you must enable the Repeat block feature for each section that contains a placeholder to ensure that your email template can display multiple products and interpret data sent by your website to Sendinblue.

Before you start

What is the Repeat block feature?

To repeat a block, you have two options:

Thanks to the Repeat block feature, you can add lists of items within a single block in your emails. For example, you can send an abandoned cart email with the list of items left in your client's cart or an order confirmation with all the items your client just bought.

The Repeat block feature works as follows:

  1. You insert transactional parameters placeholders in an email template, e.g. {{ item.name }} and {{ item.price }}.
  2. The transactional parameters are retrieved through an API call or through an Automation workflow triggered by an event.
  3. The placeholders are dynamically populated with information specific to each recipient during the sending of the transactional email. The pattern will be repeated for as many items as you'd like, and the number of items displayed will adapt in each email.

Here is an example of what a repeatable block looks like in the Drag & Drop Editor and what it can look like once populated with the data of a recipient who purchased 4 items: 

repeat-block-example.png example-repeat-block-content.png

Step 1: Insert your transactional parameters placeholders

You first need to decide what transactional parameters placeholders you want to add to your email. It can be the name and price of products purchased by your clients, the shipping costs, etc.

To insert your transactional parameters placeholders in your email template:

  1. Drag and drop a Text block into your email template.
  2. Within the body of the text, type in the transactional parameters placeholders that correspond to the information that you want to mention in your email (name, price, variant, etc.).
    Find the list of predefined transactional parameters placeholders to use in your emails in Customize your emails using transactional parameters.
    text-block.png
💡 Good to know
The placeholders will be replaced by red tags in the email template.

Step 2: Repeat a block

The procedure is different according to the editor you're using:

1️⃣ Enable the Repeat block feature

To enable the Repeat block feature in your email template:

  1. Once you have added your placeholders, hover over the block you want to repeat.
  2. Click the Repeat block icon.
    mceclip12.png
    💡 Good to know
    Make sure you hover over the block. If you click inside the block, the Repeat block option won't be available.

2️⃣ Fill in the repeatable block information

DDE_repeat-block_EN-US.png

  • In the Repeat for field, input the plural version of the first word of your placeholder, e.g. for the section containing the placeholder {{ item.name }} enter items. If you have connected your website to Sendinblue using one of our plugins, the name is items by default.
  • In the Variable alias field, input the first word in your placeholder, e.g. for the section containing {{ item.name }} the variable is item. If you have connected your website to Sendinblue using one of our plugins, the name is item by default.

If you are not using a Sendinblue plugin or if you are using other transactional parameters, you can find this information in your event logs. Learn how to find this data in our article Customize your emails using transactional parameters.

3️⃣ Set a limit of items

If necessary, you can choose to limit the number of items displayed in the emails sent. To do so, input the number of maximum items you want to display in the Limit field.

DDE_repeat-block-limit_EN-US.png

4️⃣ Save your template

After filling out the repeat block pop-up window, click Add loop to save it. The Repeat block icon of your block becomes green when active:

DDE_repeat-block-active_EN-US.png 

⏩ What's next?

🤔 Have a question?

If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.

💬 Was this article helpful?

1 out of 6 found this helpful