# Use Conditional Logic

Use this section when you need to control template output with `RENDER` statements.

Conditional logic lets you show or hide text, clauses, and sections based on Salesforce data.

Use it when one template needs to adapt to record values instead of branching into multiple template versions.

{% hint style="info" %}
Start with the tutorial if you are new to `RENDER`. Use the how-to guide for common build patterns. Use the reference when you need exact syntax, operators, and structure.
{% endhint %}

### Start with the path that fits your goal

If you are learning conditional logic for the first time, start with the Quick Start tutorial.

If you already know the output you need, jump to the how-to guide.

If you need exact behavior details, use the Developer's Hub reference.

<table data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Conditional Logic Tutorial</strong></td><td>Learn the core render pattern, null checks, AND and OR logic, and common starter examples.</td><td><a href="/spaces/v7v0UNK83URKB2C83QVU/pages/chK9y5UzaQStqP6DGPti">/spaces/v7v0UNK83URKB2C83QVU/pages/chK9y5UzaQStqP6DGPti</a></td></tr><tr><td><strong>Conditional Logic (How-to)</strong></td><td>Jump to task-based guidance for render syntax, nesting, and common template use cases.</td><td><a href="/pages/rFdp897h9imjckyT7oFc">/pages/rFdp897h9imjckyT7oFc</a></td></tr><tr><td><strong>Conditional Logic Reference</strong></td><td>Use the reference for exact operators, syntax rules, and structural details.</td><td><a href="/spaces/qNhwNwsut3uqS2daHMHX/pages/KTjGeFTnK7SItCIUGRlz">/spaces/qNhwNwsut3uqS2daHMHX/pages/KTjGeFTnK7SItCIUGRlz</a></td></tr></tbody></table>

### What you can do with conditional logic

* show or hide sections based on field values
* combine equality, null, AND, OR, and contains checks
* nest conditions when output depends on earlier logic
* keep one template flexible across multiple record states

### Browse by topic

* [Conditional Logic (How-to)](/sdocs/advanced-template-logic/conditional-logic/conditional-logic-how-to.md)
* [Handle Escaped Characters in RENDER Statements](/sdocs/advanced-template-logic/conditional-logic/handle-escaped-characters-in-render-statements.md)
* [How to Conditionally Show/Hide Table Columns](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-conditionally-show-hide-table-columns.md)
* [How to Display Different Values Based on Conditions](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-different-values-based-on-conditions.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/sdocs/advanced-template-logic/conditional-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
