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

Conditional Logic Structure

Basic Model

<!--RENDER='<merge field>' == '[Value]' -->
  [Conditional Content]
<!--ENDRENDER-->

Complex Model

<!--RENDER='<merge field>' == '[Value]' -->
  This message is for an active account.
  <!--RENDER1=( ('<merge field>' == '[Value]' || '<merge field>' == '[Value]') 
               && ('<merge field>' == '[Value]' || '<merge field>' CONTAINS '[Value]') ) -->
    Special terms apply for your account based on location and contract status.
    <!--RENDER2= <merge field> <= [Value] -->
      Note: This opportunity is marked as urgent. Immediate action is recommended.
    <!--ENDRENDER2-->
    <!--RENDER2='<merge field>' != '[Value]' -->
      Dear Manager, we have tailored recommendations for your review.
    <!--ENDRENDER2-->
  <!--ENDRENDER1-->
<!--ENDRENDER-->

1. <!--RENDER='<merge field>' == '[Value]'-->

Purpose

Start of a conditional block. S-Docs evaluates the expression and only renders the block if the condition is true.


2. [Conditional Content]

Purpose

Text or sections that are included in the generated document only when the render condition evaluates to true.


3. <!--ENDRENDER-->

Purpose

Closes a RENDER block. It must match every RENDER tag.


5. ==, !=, >, <, >=, <=, CONTAINS, NOT CONTAINS

Purpose

Comparison operators inside render conditions.

Operator
Meaning

==

Equal

!=

Not equal

>

Greater than

<

Less than

>=

Greater than or equal

<=

Less than or equal

CONTAINS

String contains substring

NOT CONTAINS

String does not contain substring


7. &&, ||, ()

Purpose

Used for combining multiple conditions into one render statement.

  • && — AND (both conditions must be true)

  • || — OR (either condition can be true)

  • () — Used to group multiple expressions


6. RENDER1, RENDER2, RENDER3

Purpose

Nesting multiple conditions under one condition. Each nested level must have an incremented name (e.g., RENDER1, RENDER2) and be paired with a matching ENDRENDER1, ENDRENDER2, etc.

Please note the following:

  • Nested blocks require incremented naming (RENDER1, RENDER2, etc.). Each nested level must have a unique name.

  • They must be properly paired with matching ENDRENDER1, etc.

  • All RENDER tags must have a corresponding ENDRENDER, and nested blocks cannot skip levels.


Summary Table

Component
Syntax / Example
Purpose / Description

RENDER Tag

<!--RENDER='<merge field>' == '[Value]' -->

Starts a conditional block. S-Docs evaluates the expression and renders the block only if the condition evaluates to true.

Conditional Content

[Conditional Content]

Text or sections included in the generated document only when the render condition evaluates to true.

ENDRENDER Tag

<!--ENDRENDER-->

Closes a RENDER block. Every RENDER must have a matching ENDRENDER.

Nested RENDER Tags

RENDER1, RENDER2, RENDER3 ENDRENDER1, ENDRENDER2

Used for nested conditional logic inside a parent RENDER block. Each level represents a deeper condition.

Comparison Operators

==, !=, >, <, >=, <=

Compare values in render conditions (equality, inequality, numeric comparisons).

Substring Operators

CONTAINS, NOT CONTAINS

Evaluate whether a string contains (or does not contain) a specified substring.

Logical Operators

&&, |

Combines multiple conditions.

Parentheses

( )

Groups multiple expressions to control evaluation order in complex conditions.

Full Example

Last updated

Was this helpful?