> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/developer-hub/template-configuration-and-styling/conditional-logic-reference.md).

# Conditional Logic Reference

Learn how to build, nest, and troubleshoot S-Docs conditional logic. Start with structure, then move into working examples you can reuse.

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/tree/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="/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-structure.md">Conditional Logic Structure</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="/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-in-microsoft-templates-docx-pptx-xlsx.md">Conditional Logic In Microsoft Templates (DOCX, PPTX, XLSX)</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="/developer-hub/template-configuration-and-styling/conditional-logic-reference/conditional-logic-working-examples.md">Conditional Logic Working Examples</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sdocs.com/developer-hub/template-configuration-and-styling/conditional-logic-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
