PREREQUISITE : Dynamic Content

Allows the user to create dynamic content statements without needing to know the syntax. 

A new syntax has been created in the system which allows developers to keep all content and logic within one document.


  • ##FirstName##
  • ##FirstName Format="Firstlettercapital"##
  • ##FirstName Default=“Customer"##
  • ##FirstName Format="Firstlettercapital" Default=“Customer"##

Data Types for Format

  • Email – No formatting options
  • Text – ALLCAPS, lowercase, Firstlettercapital, EachWordFirstLetterCapital
  • Number – WholeNumber, OneDecimal, TwoDecimal
  • Date – MM/dd/yyyy, MM-dd-yyyy, MMMM dd, yyyy, MMM dd, yyyy

Dynamic Content Syntax.

 if (field[FieldName] operator “value” ) { “Content” }
else if (field[FieldName] operator “value” ) { “Content” }
 else { “Content” }

Logic Breakdown (Part 1)

if (field[FieldName] operator “value” ) 

  • FieldName has to match the one in CONNECT, Operators are different depending on the Field type (i.e. Email, Text, Date, Number) 
  • You can have as many else if’s as needed

Logic Breakdown (Part 2)

Email/Text Operators:

==, !=, begins_with, contains, not_contain, is_empty, not_empty 

Number/Date Operators:

==, !=, greater, greater_or_equal, less, less_or_equal, is_empty, not_empty 

AND/OR Statements:

if ((field[ ] ) && (field[ ] )) 

if ((field[ ] ) || (field[ ] ))

if (((field[ ] ) && (field[ ] )) || (field[ ] ))

For Each Statements:

Use the for.each statement by itself:

for.each({"test data"})
for.each({block "<table><tr><td>Some text</td></tr></table>"})
for.each({image: "<img src="http://imagefile.jpg">"})

Or combined with an IF statement:

if(condition) {block "for.each({"test data"})"}
if(condition) {block "for.each({block "<table><tr><td>Some text</td></tr></table>"})"}
if(condition) {block "for.each({image: "<img src="http://imagefile.jpg">"})"}

Content Types

Text: Should only contain text, no HTML.


{ “Here is some text” }

Image: Should only contain an image tag.


{ image”<img src=“http://imagefile.jpg”>” }

Block: Can contain anything including code.

Example :

{ block”<table><tr><td>Some text</td></tr></table>” }

Web and Text Versions

Web versions

  • Continue to use the ##webversionurl## tag and Connect will handle the rest.
  • If the client would like different content on their web version vs email message, you can use the following:

if (content[type] == “email” ) or if (content[type] == “webversion”)

Text Versions

  • Use the “Auto Generate Text Version” option in CONNECT or leave it to the AM.
  • No separate text version logic required.