Conditional Content is Content that is displayed based on specific conditions. Like a merge field, you add a code or reference number to your template, and then data from Salesforce is merged. The code or reference number is called a Condition set, and rather than merge data from a field, the Email tool merges in a separate paragraph based on those conditions.
Condition Sets are accessed by selecting a Section and then navigating to the Condition Sets accordion on the Content tab or by clicking the Condition Sets button on the section header icon:
A 'Default Version' is created automatically. This version will display if no other conditions are created or met. Select Add Condition Set to add another condition for the section. Editing a Condition Set will highlight the section in the canvas. Each Condition Set provides options to Clone, Edit, and View.
The system evaluates each Condition set in the order they are listed. You can drag and drop the Condition Sets to change the order. Section Labels indicate which version of the Condition Set you are viewing in the Canvas, and the related Condition Set will display in blue in the right-hand pane.
Note: The Section header will display as follows:
Example:
TOP BANNER FOR CITY… | CONDITION: NEW YORK (3)
Select other Condition sets to preview them in the Canvas:
Note: Multi-select picklists will populate Conditional Content if a student matches One or Multiple values defined in the Condition Set.
For additional information on Condition Sets, see Adding Conditional Content to an Email Template, Writing a condition set in Email, Portal, or Group Assignment
If you are using the 'legacy email' interface, you must enable Content blocks in Email Preferences:
Note: This section covers the legacy TargetX Email tool. For details on the different versions of TargetX Email tools, see Understanding the TargetX Email Tools.
The TargetX Email tool is designed with the power of the TargetX Builder's intuitive user interface and advanced query engine.
Notes:
When writing Condition sets for Email, the following operators are supported. Operators vary depending on which Object is selected:
Note: Blank values are supported by:
These will look to match null/blank values in the system. To query against a blank, leave the final value box empty. All other operators require an input value to save your query.
When adding conditions, you can include multiple criteria lines by clicking the to add and the
to remove.
You can use the Advanced Expression editor to support additional filter logic. Each criteria line in the Condition Set is given a numerical value using advanced expressions. The Advanced Expression editor then uses that number in a boolean expression.
For example, if your query had the following criteria and you wanted to look for EITHER Pennsylvania or New York students who had the listed majors and were interested in Main Campus, you could use advanced logic.
Criteria:
Advanced Expression Logic:
( {1} OR {3} ) AND {2} AND {4}
When adding advanced logic, you must surround all criteria numbers with curly brackets { } and use parentheses to group. The following are examples of how to write advanced logic:
This section applies ONLY to writing condition sets in Portal and Group Assignment. For information on writing Condition sets for Email, see Writing a condition set in Email.
The TargetX Portal and Group Assignment tools are all designed with the power of the TargetX Builder's intuitive user interface and advanced query engine.
Notes:
If the default condition set contains criteria, all other Condition sets within the same template section should also have unique criteria before saving. Only the default condition set can have no criteria.
Treat merge fields as case-sensitive to prevent rendering issues when building complex condition sets. Example:
Incorrect:
&tfa_63={{ ID }}
Correct:
&tfa_63={{ Id }}
When writing Condition sets for these tools, the following operators are supported, with product-specific operators noted where necessary. Operators will vary depending on which Object is selected:
‘value1’,’value2’,’value3’
Notes:
Note: When entering a single value as criteria, do NOT use' around the value.
When adding conditions for Checkbox fields, you can use true [for checked] or false [for unchecked] values.
When adding conditions for Lookup fields, must use Salesforce Record IDs for the values and not the name of the record or any other field on the record. If you want to use the name of the related record or the value from another field on the related record, you first need to create a formula field that references the field from the lookup object.
For example, if your Group Assignment criteria are on the Contact object and you want to use the Name of the Account associated with the Contact, you would need to create a formula field on the Contact object with a formula of Account.Name.
For similar criteria using the Account's CEEB Code, the formula would be Account.TargetX_SRMb__ceeb_code__c.
When adding conditions, you can include multiple criteria lines by clicking the to add and the
to remove.
You can use the Advanced Expression editor to support additional filter logic. Each criteria line in the Condition Set is given a numerical value using advanced expressions. The Advanced Expression editor then uses that number in a boolean expression.
For example, if your query had the following criteria and you wanted to look for EITHER Pennsylvania or New York students who had the listed majors and were interested in Main Campus, you could use advanced logic.
Criteria:
Advanced Expression Logic:
( {1} OR {3} ) AND {2} AND {4}
When adding advanced logic, you must surround all criteria numbers with curly brackets { } and use parentheses to group. The following are examples of how to write advanced logic:
Note: The NOT functionality requires adding parentheses around the criteria number, such as:
NOT({2})