> For the complete documentation index, see [llms.txt](https://university.gonexa.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.gonexa.fr/doc/en/getting-started/conditional-display/advanced-conditions.md).

# Advanced display conditions

Create advanced conditions with OR, AND, AND + OR and nest conditions to display images, tables or pictograms based on very specific criteria.

## An OR condition (at least one condition true)

Trigger a condition if one of the two criteria is met

*E.g. Display clause A if the opportunity stage is Qualification or Proposal*

The OR condition syntax works as follows:

```
{ IF { = IF "{!Objet|Champ1}" = "Valeur attendue" 1 0 } + { IF "{!Objet|Champ2}" = "Valeur2" 1 0 } > 0 "résultat si vrai" "résultat si faux" MERGEFORMAT }
```

Each sub-condition `{ = IF ... 1 0 }` returns **1** (true) or **0** (false)\
With +: 0+0=0, as soon as one equals 1 → sum > 0 → true

## An AND condition (both conditions true)

Trigger a condition if two criteria are met

*E.g. Display a clause if the deal amount is greater than or equal to €50,000 and the probability is greater than 80%*

The AND condition syntax works as follows:

```
{ IF { = IF "{!Objet|Champ1}" = "Valeur attendue" 1 0 } * { IF "{!Objet|Champ2}" = "Valeur2" 1 0 } > 0 "résultat si vrai" "résultat si faux" MERGEFORMAT }
```

Each sub-condition `{ = IF ... 1 0 }` returns **1** (true) or **0** (false)\
With \*: only 1×1=1 → product > 0 → true (otherwise always 0)

## An AND + OR condition

Trigger a condition based on one or more criteria

*E.g. Display a clause if the stage is Closed Won or Closed Lost and the Country is France or Spain*

To add a 3rd AND + OR condition, apply the same logic:

```
{ IF { = IF "{!Objet|Champ1}" = "Valeur1" 1 0 } * { IF "{!Objet|Champ2}" = "Valeur2" 1 0 } + { IF "{!Objet|Champ3}" = "Valeur3" 1 0 } > 0 "résultat si vrai" "résultat si faux" MERGEFORMAT }
```

## The nested condition (Equal, otherwise)

A nested condition consists of replacing the result text with a new, complete condition.

The syntax works as follows:

```
{ IF "{!Objet|Champ1}" = "Valeur attendue 1" "résultat si vrai 1" "{ IF "{!Objet|Champ2}" = "Valeur attendue 2" "résultat si vrai 2" "résultat si faux" MERGEFORMAT }" MERGEFORMAT }
```

If **true** → directly displays "résultat si vrai 1" (result if true 1)\
If **false** → it evaluates the 2nd condition

{% hint style="danger" %}
**Warning**

* Each nested condition has its own `MERGEFORMAT` and curly brackets `{ }`
* You can nest within the result if true, the result if false, or both
* There is no theoretical limit to the number of levels, but beyond 3-4, keep readability and maintenance in mind
  {% endhint %}

## Example condition template

**RESOURCES**

Get the advanced conditions template to download pre-made example conditions that you can customize.

[Download](https://cdn.prod.website-files.com/6266bdee7bba3ff58801d972/6a5e266e707fe4435c056be5_Exemple%20de%20conditions%20Simples.docx)


---

# 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://university.gonexa.fr/doc/en/getting-started/conditional-display/advanced-conditions.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.
