Content blocks allow user to insert dynamic content in their email by creating a dynamic variable that displays information relative to the information retrieved for a specific record type in Datamart. These variables are user created and defined.
What is the difference between Content Rule and Content block?
- The immediate difference is the way these two types of variables are displayed on the HTML document.
- ##Variable## (content rule variable)
- ###Variable### (content block variable)
- A Content Rule applies to the whole email and allows for 1 conditional rule to affect multiple variables in the message. A Content Block is a single condition and a single variable affecting a single block or object in the message.
How to use Content Blocks?
- Go to Compose > Email Message > Create new message > Standard > HTML.
- Since, this article primarily focuses on Content Blocks, we will deal with HTML, Preview and Test tab.
- In the HTML tab, select Insert Dynamic Content button.
- A window will display like one shown below:
This helps user in customizing how the content that will be displayed by the content block variable.
1. Name: Provide a name to dynamic variable. This will be inserted into the HTML section (Image shown below - highlighted by yellow border).
2. CONNECT allows user to program the entire logic by switching to HTML mode from Design mode. (Example shown below)
3. Copy: New content block can be created from previously created ones simply by selecting drop down list next to Copy option.
- Important: When copying previous variable logic, current logic will be discarded. Also, name the content block different than the parent block.
Insert: Click this button to insert the dynamic variable in email message.
Cancel: Click on the button to discard current dynamic variable creation.
Now, we have to add the logic for insertion of content. This is done using if/else statements.
- If a record has the field Division equivalent to “Food Services” then “Gloves on Sale!” will be displayed in the email.
Result in preview tab
- Else if Division is equal to “Cleaning” then “New Microfiber Mops” will be displayed.
Result in preview tab:
- Finally, an else statement which means if none of the above statement applies then the following text is displayed: “15% Off Select Items”.
Result in preview tab:
- Also, the else if or else statement could be removed by clicking
Dynamic content block variable also supports image, text and block of code.
To insert an image:
To insert a block:
User could further edit the Block by selecting Edit button. The following window will be displayed:
- User has the option to test their block using Preview or by creating test deployment.