Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reformatted examples using code blocks

pixdevelopers
When you enable and  use Dynamic Message Content , you can insert placeholders into a message that will be replaced in real-time with the corresponding values for the receiving visitor. You configure this on the  Promoted Content  tab in  Message Settings . 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. 



Panel
borderColor#ccc
titleColor#404040
borderWidth1
titleBGColor#f4f5f7
titleThis Article Explains

This section details the variables used for advanced dynamic messages.



Panel
borderColor#ccc
titleColor#404040
borderWidth1
titleBGColor#f4f5f7
titleSections in this Article

Table of Contents
maxLevel2


Users

Code Block
${user.id}                           => ID <String>


${user.userName}
 
                     => Name <String>


${user.userNameOrAnonLocation}       => Name OR 'user from City, State' <String>


${user.accountType}                  => Account Type <String>


${user.emailAddress}                 => Email Address <String>

--User Location--

Code Block
${user.location.postalCode}          => Zip Code <String>


${user.location.city}                => City <String>


${user.location.metro}               => Metro Area <String>


${user.location.metroCode}           => Metro Code <Integer>


${user.location.region}              => State/Region <String>


${user.location.stateProvinceCode}   =
> State
> State/Region Code <String> (shorthand)


${user.location.country}             => Country <String>


${user.location.countryCode}         => Country Code <String> (shorthand)


${user.location.organization}        => Organization <String>


${user.location.industry} 
 
           => Industry <String>


${user.location.naicsCode}           => North American Industry Classification System Code <Integer>


--User Custom--

Code Block
${user.attributes._________}         => Custom Attribute (Use dropdown in editor for specific ID)


Items

Things that count as items:

  • Products
  • Articles
  • Blogs
  • Tags
  • Categories

--Basic--

 

Note

Must have intended item query selected in message settings

 


Code Block
${item}                              => Item Object <Object>


${items}                             => Array of Item Objects <Array>


${items[0]}...${items[9]}            => Item In Array <Object>


${page.item}                         => Current Page Item Object <Object>


${page.category}                     => Current Page Category <Object>


                                        OR Category of Current Page Item <Object>





${item.name}                         => Name <String>


${item.id}                           => ID <String> OR <Integer>


${item.url}                          => URL <String>


${item.imageUrl}                     => Image URL <String>


${item.description}                  => Description <String>


${item.categories}                   => Categories Objects <Array>


${item.tags}                         => All tag Objects <Array>

--Products only--

Code Block
${item.price}                        => Price <Integer> 

// NOTE: Unformatted, see utilities below.


${item.priceDescription}             => Price Description <String>


${item.listPrice}                    => List Price <Float> 

// NOTE: Unformatted, see utilities below.


${item.inventoryCount}               => Inventory Count <Integer>


${item.brands}                       => Brand tag objects <Array>


${item.classes}                      => Class tag objects <Array>


${item.styles}                       => Style tag objects <Array>


${item.genders}                      => Gender tag objects <Array>

--Blog & Article Only--

Code Block
${item.subTitle}                     => Subtitle <String>

--Promotion Only--

Code Block
$tools.bandit.imageToServe(${item}) => Fetches the imageUrl for the proper content zone and dimension as dictated by the message's dynamic content


Advanced-- Build item query in message

--Query Type: global/user interchangeable--

Code Block
${tools.global...}                   => Query Global Statistics


${tools.user...}                     => Query User Statistics





${tools.global.products...}          => Query Products


${tools.global.articles...}          => Query Articles


${tools.global.blogs...}             => Query Blogs


${tools.global.categories...}        => Query Categories


${tools.global.brands...}            => Query Brands


${tools.global.styles...}            => Query Styles


${tools.global.authors...}           => Query Authors


${tools.global.keywords...}          => Query Keywords

--Query: default array length min 1 max 5--

Code Block
${tools.global.products.viewCount()}      => Top Viewed By Count <Array>


${tools.global.products.viewTime()}       => Top Viewed By Time <Array>


${tools.global.products.cartCount()}      => Top Added To Cart By Count <Array>


${tools.global.products.cartValue()}      => Top Added To Cart By Currency Value <Array>


${tools.global.products.purchaseCount()}
 
  => Top Purchased By Count <Array>


--Global only--

Code Block
${tools.global.products.publishedDate()}  => Most Recent Published <Array>

--User only--

Code Block
${tools.user.products.viewed()}           => Most Recently Viewed <Array>


${tools.user.orders.currentItems()}       => Products In Cart <Array> 

// NOTE: Evergage does not currently track cart removals.


${tools.user.orders.currentValue()}       =
> Total
> Total Value In Cart 
<Float> 
<Float> 
// NOTE: Unformatted, see utilities.


Item Options

Code Block
ex. ${tools.user.products.viewCount(${itemOptions...})


ex. ${itemOptions.optionOne().optionTwo().optionThree()}


---Sizes---

Code Block
${itemOptions.minItems(<Integer>)}    Minimum Returned Or Message Hidden


${itemOptions.maxItems(<Integer>)}    Maximum Returned (MAX: 10)

---Filters---

Code Block
${itemOptions.withCategory(<CategoryID>)}


${itemOptions.withBrand(<BrandID>)}


${itemOptions.withBrandAnyOf([<BrandID1>,<BrandID2>,...])}


${itemOptions.withGender(<GenderID>)}


${itemOptions.withGenderAnyOf([<GenderID1>,<GenderID2>,...])}


${itemOptions.withKeyword(<KeywordID)}


${itemOptions.withKeywordAnyOf([<KeywordID1>,<KeywordID2>,...])}


${itemOptions.withAuthor(<AuthorID)}


${itemOptions.withAuthorAnyOf([<AuthorID1>,<AuthorID2>,...)}


${itemOptions.withContentClass(<ContentClassID>)}


${itemOptions.withContentClassAnyOf([<ContentClassID1>,<ContentClassID2>,...])}


${itemOptions.withStyle(<StyleID>)}


${itemOptions.withStyleAnyOf([<StyleID1>,<StyleID2>,...])}


${itemOptions.withItemClass(<ItemClassID>)}


${itemOptions.withItemClassAnyOf([<ItemClassID1>,<ItemClassID2>,...])}


${itemOptions.whereCreated(<TimeObject>)}


${itemOptions.wherePublished(<TimeObject>)}


--Look Back Period--

Code Block
${itemOptions.time(<TimeObject>)}


++Time Object++

Code Block
  ${time.today()}


  ${time.thisWeek()}


  ${time.thisMonth()}


  ${time.allTime()}


  ${time.since(<MMDDYYYY>)}


  ${time.lastNDays(<Integer>)}

--Conditional Options--

Code Block
${itemOptions.whereName()...}


${itemOptions.whereDescription()...}


${itemOptions.whereUrl()...}


${itemOptions.whereImageUrl()...}


${itemOptions.wherePriceDescription()...}


--Conditionals--

Code Block
${itemOptions.whereName().exists()}


${itemOptions.whereName().doesNotExist()}


${itemOptions.whereName().contains(<String>)}


${itemOptions.whereName().doesNotContain(<String>)}


--Sorting--

Code Block
${itemOptions.displaySort(<SortOptions>)}


${itemOptions.descending()}


++Sort Options++

Code Block
  ${productSort.name()}


  ${productSort.price()}


  ${articleSort.name()}


  ${articleSort.publishedDate()}


  ${blogSort.name()}


  ${blogSort.publishedDate()}


--Inclusions--

Code Block
${itemOptions.includeItemsBeingViewed()}


${itemOptions.includeItemsInCart()}


--Exclusions--

Code Block
${itemOptions.excludePurchasedItems()}

${itemOptions.excludeViewedItems()}


--Mark As Promoted--

Code Block
${itemOptions.promote()}               Default: OFF


Utilities

--Set Variables--

#set 
Code Block
#set (${variableName} = $...)


--Loops--

Code Block
#foreach (${variableName} in <Array>)


...


#end


--Format Price--

Code Block
$tools.formatPrice(<Float>)

$tools.formatNumber(<Float>, <Int Number of Fractional Digits>)

Hidestuff