Conditional Logic in the Enhanced Editor
Conditional logic provides template authors with the ability to declaratively set visibility conditions for specific blocks of a template.
There are two primary applications of implementing conditional logic within a template:
Applying conditions to a pre-existing block of text, that may or may not include variable data, within the template.
Applying conditions to a published component template, which allows authors to maintain templates outside of parent template and call them in when generation conditions are met.
Apply Conditional Logic
To configure conditional logic for static text or text containing merge fields, follow these steps:
Highlight the text block or the component template placeholder within the template body.
Click the Insert Conditional Logic icon
to enable the Visibility panel.Enter a descriptive name for the conditional block in the naming field to provide a clear reference for future template authors.
Select the + Click to Add a Condition button to open the Add Visibility Condition menu.
Select the specific field from the Salesforce Record that will drive the rule. Note: The picklist reveals all applicable fields based on the configured base record type of the template.
Select an operator to define the relationship.
S-Docs supports the standard Salesforce operators, including:
Equals (==)
Not equals (!=)
Greater than (>)
Less than (<)
Greater than or equal to (>=)
Less than or equal to (<=)
Contains
Not contains
Enter the target value in that the field must evaluate against the operator to trigger the condition.

Pictured above: A visual indication, or highlight, is applied to template sections configured with conditional visibility rules so template authors can quickly navigate and easily maintain template rules.
Managing Multiple Conditions
When a content block requires multiple conditions, authors can configure how those rules are evaluated together using "and" or "or" logic. The enhanced template editor provides two straightforward options to handle multiple requirements:
All conditions are met: The content will display only if every specified condition evaluates to true.
Any condition is met: The content will display if at least one of the specified conditions evaluates to true.

Limitations
Nested conditional logic is not supported in the current release. All active conditions follow the overarching rule selected for that block.
In the current release, conditional logic cannot be applied to related lists. This functionality is strictly restricted to text blocks, variable merge fields, and component templates as outlined above.
Last updated
Was this helpful?

