# Conditional Logic Reference

Use this section when you need exact syntax for S-Docs conditional logic.

These reference pages help you build `RENDER` statements, structure nested conditions, and start from working patterns.

{% hint style="info" %}
If you need a first walkthrough, start with [Getting Started with Conditional Logic](broken://spaces/WKNnJmhJBQwhdk5WBFsi/pages/91KlVIBfV6FJYvedmQ5y).

If you need task-based guidance, use [Conditional Logic (How-to)](https://github.com/kvantiem-sdocs/Developer-Hub-Documentation/blob/main/advanced-template-logic/conditional-logic/conditional-logic-how-to.md).

If you already have template logic and need exact syntax or examples, stay in this reference set.
{% endhint %}

{% hint style="success" %}
**Recommended flow**

If you are new to conditional logic references, read these pages in order:

1. [Conditional Logic Structure](/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-structure.md)
2. [Conditional Logic in DOCX Templates](/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-in-microsoft-templates-docx-pptx-xlsx.md)
3. [Conditional Logic Working Examples](/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-working-examples.md)

Start here when you want the fastest path from syntax to working output.
{% endhint %}

Start with one of these reference paths:

<table data-card-size="large" data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-card-target data-type="content-ref">Target</th></tr></thead><tbody><tr><td><strong>Conditional Logic Structure</strong></td><td>Learn the required tags, supported operators, nesting rules, and how each part of a render block works.</td><td><a href="/pages/aYlYfCOn0elKwgezQxJV">/pages/aYlYfCOn0elKwgezQxJV</a></td></tr><tr><td><strong>Conditional Logic in DOCX Templates</strong></td><td>Use the correct square-bracket syntax for RENDER blocks and merge fields in DOCX templates.</td><td><a href="/pages/lZpcxKNSszCMYagUonpU">/pages/lZpcxKNSszCMYagUonpU</a></td></tr><tr><td><strong>Conditional Logic Working Examples</strong></td><td>Start from working patterns for null checks, AND/OR logic, nested render blocks, and substring matching.</td><td><a href="/pages/Vf865ZTTxTieKoeHX1eG">/pages/Vf865ZTTxTieKoeHX1eG</a></td></tr></tbody></table>


---

# 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/developer-hub/template-configuration-and-styling/conditional-logic-reference.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.
