For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. Highlight the text block or the component template placeholder within the template body.

  2. Click the Insert Conditional Logic icon to enable the Visibility panel.

  3. Enter a descriptive name for the conditional block in the naming field to provide a clear reference for future template authors.

  4. Select the + Click to Add a Condition button to open the Add Visibility Condition menu.

  5. 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.

  6. 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

  1. Enter the target value in that the field must evaluate against the operator to trigger the condition.

Example of a text area configured with multiple conditional visibility criteria.

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

Last updated

Was this helpful?