1. Home
  2. Adding Products Guide

Adding Products Guide

Before you start

Please note, that this guide does NOT describe including products inside the Picasso template editor.

Adding Products in general

For personalization purposes, Samba algorithms automatically attach products’ details to a email content delivered to a specific customer. How does Samba know, where exactly in a template will be those product details presented?

Samba uses variables as dynamic directives for product representation inside the email templates. Prior to sending it to a specific customer, variables are automatically replaced for product attributes (link to image, link to product, product name and description) etc. Variables are called Merge Tags and must be used in specific format – {{merge_tag_example}}. They use double bracket to indicate where the variable definition starts ‘{{‘ and ends ‘}}’.

Adding Merge Tags for Products

There are multiple ways to add Merge Tag  to the template. 

1/ Either you write them manually. This requires knowledge, which Merge Tags can be used in which template type. The section below in this article covers the topic of differences among template types.

2/ Choosing from the list of Merge tags

This image has an empty alt attribute; its file name is adding-products-guide-mustache-context.gif


3/ If Merge Tag is a variable that represents link, you can choose from the list of Special links.

Here is a list of product related attributes that can be represented by Merge Tag variables. Merge Tags representing these properties will be replaced with the data from your platform data feed.

  • Title – Name of the product/ product variant
  • Price – Current  price or the price after discount
  • Price Before – Price of the product before the discount
  • URL – The link (path) to a product presented on the e-commerce platform.
  • Image – Alternate text, which is used when the image is not loaded in a delivered email for some reason.
  • Description – Detailed information about the product
  • Brand – Name of the product’s brand 

This is the minimum. Additional properties are listed in a specification of specific template.

Product Images and placeholders

Placeholders (example below) represent the size of the final product image and place, where the image of specific product will be replaced.

Size of the image and product ID can be specified through the property panel on the right side.

URLs for the image placeholder has to be copy-pasted and changed according to desired product ID and image size.

Best Practice Tip

The fastest way to start with product related attributes (via placeholders and Merge Tags) is to start with either existing template with Merge Tags present in the content or our prepared “default” template.

Product attributes visibility

Some product attributes might not be specified in your data feed. For example not every product is in a discount, and it can also be only temporary state. If the product ends up discounted, presenting original price before the discount is desirable. 

For that matter we can to use additional Merge Tag, which present the value, only if it exists. In the example above, it is the situation when product is currently discounted.

It’s required to use special opening (#) an closing (/) directives inside the Merge Tags. Here is an example considering the usecase mentioned above.


any information with conditional visibility, e.g. 3,456czk


Anything that is in between Merge Tags {{#main_product_price_before}} and {{/main_product_price_before}} will be visible only if the value for main_product_price_before exists.

This can be applied to any Merge Tags in any template type.

Adding Specific Product

Attributes of specific product can be added only manually. We are working on a interface dedicated to adding the entire product with labels, picture and links in a few clicks.

Before Sending

It’s beneficial to check, whether the template is valid. There is a possibility of multiple problems.

Duplicates and missing values

Make sure that the Merge Tags variables are not duplicated. Merge Tag variable with the same name will include the same value in one email template. Assigning {{product2_title}} where Product 1 Title suppose to be will cause confusion.

Ignore this warning, if the duplication is intentional. Sometimes you do want to use a Title of the specific product in an introduction paragraph. This is completely OK.

Final look

Send the test email to your email address to see the product pictures and real product attributes represtented by Merge Tags. Note that the products are filled based on the filtering criteria and/or our A.I. algorithms

Preview the template and test responsivity by switching between desktop and mobile preview.

Template Types

Template types and formats

Samba Drag & Drop editor uses 5 different Template types:

    1. Segmentation Template
    2. Personalization Template
    3. Repeated Orders (Trigger) Template
    4. Abandoned Cart (Trigger) Template
    5. Shopping Intention (Trigger) Template

Please note, that the Picasso editor is not compatible with Drag & Drop template types. Picasso templates use different logic for adding products and for content management in general. 

Template specific Merge Tags for products

Which Merge Tag should be used to represent the product? It depends on the type of the template. Samba supports 5 types (segmentation, personalization and 3 trigger types). 

1/ Segmentation template don’t use any Merge Tags for products

2/ Personalized Template Merge Tags 

3/ Every trigger template type slightly varies in available Merge Tags variables.

     3a/ Abandoned Cart Merge Tags

     3b/ Shopping Intention Merge Tags

     3c/ Repeated Orders Merge Tags

Switching to different template type

Type of the template can be changed after the template is created. Prior to switch, make sure that the Merge Tag variables are relevant for the particular type are included in the template. Otherwise validation will throw errors and template cannot be saved.

Converting HTML to Drag&Drop and vice versa

Be aware that HTML templates cannot be edited in a Drag & Drop designer since they were created in editors with different representation of the template structure. When you convert Drag&Drop type to HTML, the reverse action is not possible.

This post is also available in: Čeština (Czech)

Updated on January 17, 2020

Was this article helpful?