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

Conditional Logic Working Examples

Basic Structure:

Scenario: Render only if Opportunity stagename is ‘Closed Won’:

<!--RENDER='{{!Opportunity.stagename}}' == 'Closed Won' -->
  This is opportunity is currently in the Prospecting phase. 
<!--ENDRENDER-->

Scenario: Render ‘No phone number on record. Please update.’ if contact phone number is missing. Otherwise, display the phone number.

<!--RENDER='{{!Contact.Phone}}' == 'NULL' -->
  No phone number on record. Please update.
<!--ENDRENDER-->
<!--RENDER='{{!Contact.Phone}}' != 'NULL' -->
  Phone number: {{!Contact.Phone}}
<!--ENDRENDER-->

Scenario: Render ‘This contact is marked active.’ if Contact record is active.

<!--RENDER='{{!Contact.IsActive__c}}' == 'True' -->
  This contact is marked active.
<!--ENDRENDER-->

AND / OR Structure:

Scenario: Render only if Opportunity stagename is ‘Closed Won’:


Scenario: Render ‘No phone number on record. Please update.’ if contact phone number is missing. Otherwise, display the phone number.


Scenario: Render ‘This contact is marked active.’ if Contact record is active.


Scenario: Add special terms for customers in restricted regions with active agreements.


Scenario: Escalation or special reporting for high-impact cases.


Scenario: Add fulfillment or onboarding sections only when both monetary and readiness conditions are met.


Scenario: Show a message if the customer is in CA or NV and either has an active contract or a pending renewal.


Scenario: Display partner-specific compliance, data handling, or NDA sections.

Nested Structure:

Scenario: Specialized clauses for California Healthcare companies.


Scenario: Post-sale documentation where deeper sections only apply when prerequisites exist.


Scenario: Multi-level logic based on contract type, term length, and settings.


Scenario: Progressive detail based on available phone data.


Scenario: Complex account summaries in executive-level reports.


Scenario: Escalation or RCA documentation.


Scenario: Automated pricing or approval sheets.


Scenario: Line-item logic inside S-Docs loops.


Scenario: Shipping detail blocks or packing slips.


Scenario: Billing, compliance, or financial management templates. (4 Levels Deep)

CONTAINS Structure:

Scenario: Include a greeting paragraph if the contact’s name contains “Tim”.


Scenario: Highlight special handling instructions if the opportunity description does not contain the word “Urgent”.


Scenario: Show a refund clause if any case comment mentions “Refund”.


Scenario: Include financial compliance instructions for accounts in industries containing the word “Finance”.


Scenario: Add a note if a product in the quote contains “Professional” in its name.

Complex Solution:

Scenario:

You want to generate a customer communication that includes:

1

Only for active accounts.

2

If the account is in California or New York AND either has a “Premium” contract or the account name contains “Enterprise”.

3

Include a special note if the opportunity description contains “Urgent”.

4

Nested logic: inside that, include a custom greeting if the contact’s title contains “Manager”.


Complex Nested RENDER Example

Last updated

Was this helpful?