Interaction Studio Classic Only
Please note, the contents of this article are intended for customers using Interaction Studio (formerly Evergage Classic). Do not adjust your beacon version to downgrade or upgrade.
This article details how to enable dynamic message content.
Enable Dynamic Campaign Content
Insert Dynamic User Content
Once you enable dynamic campaign content, you can insert it directly into a message.
Add a Fallback Value
If a user doesn't have a value for this field and it returns null or an empty string, the message text won't be shown. But you can add a fallback value as add a second parameter in the event that there isn't a user value.
Dynamic Catalog Content
If you use the Interaction Studio Catalog with your site, you can use Interaction Studio campaigns to promote items. On a B2C site, items can be products, categories, brands, or styles. On a content site, items can be articles, blogs, authors, or keywords. In most cases, the items that a particular message promotes can be configured in Message Settings on the Promoted Content tab.
However, in some cases, the Promoted Content tab will not provide the configurability needed for very specific or advanced requirements and you need to use advanced dynamic message content (ADMC) syntax instead, which is added in the message HTML, accessible selecting the Message Source Code tab. For more information, please see Use Advanced Dynamic Message Content .
Using the rules you configure on the Promoted Content tab, Interaction Studio will display a list of up to ten of the top products in the visitor's favorite category sorted by the number of times they have been viewed globally. This list can be accessed within the HTML content of the message using the ${items} variable. Using the #foreach loop, Interaction Studio will generate a list item until the maximum list of items has been reached. Be aware that if the defined minimum number of items are not returned, the message will not display. If no minimum or maximum is defined, Interaction Studio will return up to ten items that meet the rules you have configured either in the Promoted Content tab or ADMC code in the message HTML.
For example:
These are the most popular products in your favorite category: <ul> <!-- #foreach ( $product in $items )--> <li><a href=”${product.url}”>${product.name}</a></li> <!-- #end --> </ul>
If you only want to promote a specific number of items in your message, you can use an array syntax instead. For example, use the following syntax to promote only the top three products (notice that the first item is referenced with an index value of 0, not 1):
These are the most popular products in your favorite category: <ul> <li><a href=”${items[0].url}”>${items[0].name}</a></li> <li><a href=”${items[1].url}”>${items[1].name}</a></li> <li><a href=”${items[2].url}”>${items[2].name}</a></li> </ul>
When the message displays, all Items that are referenced in the message will be marked as promoted for campaign attribution purposes.
Formatting Numbers
Typically, prices are the only numbers you need formatted. There are two options you can use to format them using the message HTML.
Option 1
The simpler option formats the price with the default dataset currency symbol using the default dataset locale:
$tools.formatPrice(${item.price})
If the default dataset currency is US dollars and the default dataset locale is US, the formatted currency would look like:
$1,234.50
And for Euros with a French locale:
1 234,50 €
Option 2
The other option is to format the number only using a fixed number of digits after the decimal point. Then, the currency symbol or word can be added as part of the message. For example:
$tools.formatNumber(${item.price}, 0) ¥
Which would display as:
1,234 ¥