You are also able to use the capabilities of Product Catalog Updates by using Emarsys Scripting Language. This enables you, for example, to add products from an abandoned cart into a email campaign even when you want to use the HTML editor.
You can create similar emails with the HTML editor too:
Be aware that HTML editor based, triggered marketing email campaigns are limited to using Product Sets as a product source as opposed to the Personalization Rules available for VCE editor.
- Go to Channels > Email Campaigns, select your campaign, then click Edit.
- Go to Content Creation.
- Once you finished creating the source code of your email and decided where you want to insert your Product Catalog Update based personalizations, build your ESL code.
You have the following options:
- Adding multiple personalizations where each personalization is using data from the first product from the product catalog
- Adding a single personalization where the personalization is using data from a specified from the catalog
Using multiple personalizations
To use multiple product set based personalization, create an ESL loop.
The following example will show the link, image and title for the first product catalog item in the email.
The general structure is the following:
{% foreach item in product_catalog.<Product_set_name>() %}
"{{ item['any_available_field_in_the_Product_catalog'] }}"
{% endforeach %}
The possible product set names are the following:
- Fast Cart:
abandoned_cart
- Price Drop:
price_drop
- Back in stock:
back_in_stock
An example with some HTML formatting:
{% foreach item in product_catalog.abandoned_cart() %}
<tr>
<td align="center"><a href="{{ item['link'] }}" target="_blank"><img src="{{ item['image'] }}" width="320"
height="320"></a></td>
</tr>
<tr>
<td align="center"><span style="font-size: 18px; line-height:1.6em; color: #444444;">{{ item['title'] }}<br>{{
item['price'] }}</span></td>
</tr>
</table>
</td>
</tr>
{% endforeach %}
Using a single personalization
When using single personalizations, you can define which product's data you want to display in the email.
The following example will show the title of the first product from the Abandoned Cart product set of the contact receiving the email.
The general structure is the following:
{{product_catalog.<Product_set_name>()[0].any_available_field_in_the_Product_catalog}}
Example:
{{product_catalog.abandoned_cart()[0].title}}
This type of personalization can be used in Push messages and SMS as well.
Special field names
The Price Drop product set has the {{ item['old_price'] }} unique field name. This personalization will display the last higher price for the product.
The Abandoned Cart product set has the {{ item['quantity'] }} unique field name. This personalization will display how many of the first type of product were left in the cart of the contact.
The data for these fields is generated and not stored in the product catalog itself.
For more tips with ESL regarding product personalization, check Questions about the Emarsys Scripting Language.