PREREQUISITE : Dynamic Content

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

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


Syntax


  • ##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.


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

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:
==, !=, >, >=, <, <=, is_empty, not_empty 


  • AND/OR Statements:
if ((field[ ] ) && (field[ ] )) 


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


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


Content Types


Text: Should only contain text, no HTML.


Example:

{ “Here is some text” }


Image: Should only contain an image tag.


Example:

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


Block: Can contain anything include 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.