> For the complete documentation index, see [llms.txt](https://docs.videsk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videsk.io/es-developers/webhooks/helpers/if.md).

# #if

Este tipo de helper te permite generar una estructura basado en condiciones, esto es útil si la estructura debe variar dependiendo de algún valor de tipo `Boolean`.

#### Datos de ejemplo

```json
{
  "isOnline": true,
  "isAvailable": false,
  "data": [{ "id": "61d3905e6ee6a2321c88f7af" }, ...],
}
```

## Ejemplos de uso

{% hint style="info" %}
Ten en cuenta que el valor a comparar solo puede ser tipo `Boolean`.
{% endhint %}

{% tabs %}
{% tab title="if" %}
**Sintaxis**

```handlebars
{{#if isOnline}}
  {{parser data}}
{{/if}}
```

**Resultado**

```json
[{ "id": "61d3905e6ee6a2321c88f7af" }, ...]
```

{% endtab %}

{% tab title="if/else" %}
**Sintaxis**

```handlebars
{{#if isAvailable}}
  {{parser data}}
{{else}}
 { message: "The user is not available" }
{{/if}}
```

**Resultado**

```json
{ message: "The user is not available" }
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.videsk.io/es-developers/webhooks/helpers/if.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.
