Dynamic Content Blocks
  • 04 Apr 2024
  • 4 minute read
  • Dark
    Light
  • PDF

Dynamic Content Blocks

  • Dark
    Light
  • PDF

Article Summary

Dynamic content blocks enable streamlined creation of personalized content within mailings and form communications. Dynamic content blocks can make full use of merge fields, liquid markup, and even other content blocks!

All content blocks include dynamic content block functionality. Merge fields, liquid markup, and conditional logic can be added to both new and existing content blocks in the WYSIWYG editor or from the source code by manually inserting merge field formatting (such as the {{Person-Preferred}} field).

To avoid potential errors when placing dynamic content blocks within other dynamic content blocks, refer to the Recursion within Dynamic Content Blocks section of this article.

How to Use Dynamic Content Blocks

All content blocks support dynamic content block functionality. You can edit existing content blocks to contain dynamic content or create and configure new content blocks by following the Knowledge Base article on Creating Content Blocks. You can add liquid markup and merge fields to content blocks when you create them, or you can return and add them later.

Tip

While you should create the content for a content block before adding it to a communication, including merge fields in a dynamic content block requires you to already know the names of the exports used as merge fields. The best way to be sure that your communication exports match the dynamic content block merge fields is to use the default export names when creating the dynamic content block.

For example, use {{Person-First}} instead of {{First-Name}}, since queries built upon Configurable Joins will name the export for a person's first name as "Person First" by default. Any spaces within export names will be automatically converted into hyphens.

 

Dynamic Content Blocks in Deliver Mailings

To add a dynamic content block to a Deliver Mailing, all exports used within the dynamic content block must be configured within the recipient lists for the mailing.

  1. Create or edit the mailing that will include the dynamic content block.

  2. Select Edit Recipient Lists. The Recipient Lists page appears.
    Recipient Lists Button

  3. Select an existing recipient list to edit it, or click New Query to generate a new recipient list. For more information on recipient lists, refer to the Adding a Recipient List Knowledge Base article.

  4. If editing an existing recipient list, click Edit Query to open the query editor. Otherwise, clicking New Query in the previous step will open the query editor.

  5. Click Export in the query editor to add the desired exports. Any information that will be used as a merge field or condition within the dynamic content block must be configured as an export within the recipient list.

    For example, if the dynamic content block uses conditional logic to show only information about scholarships to students with a cumulative GPA of 3.5 or higher, "Cumulative GPA" must be selected as an export.
    Export button

  6. Configure any desired filters for this communication as described in the Knowledge Base article on Adding a Recipient List.

  7. Return to the mailing and click Edit Message. On the right side of the WYSIWYG editor, all of the previously-configured exports will appear as merge fields. The names of these exports must match the names of any merge fields contained within the dynamic content blocks.

  8. Follow the guide in the Displaying Content Blocks Knowledge Base article to insert the dynamic content block into the message.

  9. Use the Display Sample Message function in the mailing editor to test that the dynamic content blocks work as expected.
    Edit message button

Dynamic Content Blocks in Form Communications

To add a dynamic content block to a form communication, all merge fields used within the dynamic content block must be added as exports for the communication.

  1. Create or edit a form that will have a dynamic content block in its communications.

  2. Click Edit Communications. The Communications summary page for the form appears.
    Edit communications button

  3. To create a new mailing, click New Mailing. To edit an existing mailing, click Edit Mailing under the mailing details.

  4. Click Edit Conditions. The Edit Conditions pop-up opens. Exclusivity Group, Exports, and Filters can be configured here.
    New mailing button

  5. Click Export to add the needed exports to the form communication. You can select from any data collected on the form, or you can join to other query bases to select other exports. Any information that will be used as a merge field or condition in the dynamic content block must be configured as an export within the recipient list. Once you have selected the exports, click Continue.
    (For example, if the dynamic content block uses conditional logic to only show information about scholarships to students with a cumulative GPA of 3.5 or higher, cumulative GPA must be selected as an export.)

  6. Make sure that the names of the exports match the merge fields in the dynamic content block. To change the name of an export, double-click on the export in the Edit Conditions pop-up.

  7. Click Save.

  8. Use the Submit Form Test function in the mailing editor to test that the dynamic content blocks work as expected.
    Export button  

Recursion in Dynamic Content Blocks

Dynamic content blocks can call other content blocks. They can also pass exports through into merge fields within those content blocks. Using a content block embedded within another content block allows for simplified generation of personalized content, but also requires creators of dynamic content blocks to understand the limits of recursion.

Content blocks are limited to two levels of recursion, meaning that a content block can contain up to two more content blocks.

First Content Block (Top Level)

OK

Second Content Block (1st Recursion)

OK

Third Content Block (2nd Recursion)

OK

Fourth Content Block (3rd Recursion)

Error

Placing too many levels of recursion within content blocks will generate the following error when attempting to save the content:

Too many recursions error

Dynamic Content Block Examples

Mailing with content block:

Mailing with content block

Content block that calls another content block:

Content block recursion

Successful mailing with both content blocks displayed:

Successful mailing


Was this article helpful?