> For the complete documentation index, see [llms.txt](https://soporte.optiwe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soporte.optiwe.com/chatbots/estructura-basica.md).

# Estructura Básica

El primer paso es escribir la estructura principal que contendrá todas las acciones del chatbot:

```xml
<?xml version="1.0" encoding="utf-8"?>
<root>    
...

</root>
```

Los <img src="/files/U2dAVINfS9jXvwhDROUY" alt="" data-size="line"> representan los elementos del menú que luego se irá desplegando entre los root

### **Elementos de una estructura básica:** <a href="#estructuraprincipal" id="estructuraprincipal"></a>

* Cabecera del menú principal: <mark style="background-color:red;">`<options id="Menu_principal" header="_________">`</mark>    &#x20;
* Opción de menú :`<option text="_______">` &#x20;
* Acción a ejecutar luego de elegir una opción: <`action type="_____"/>`   &#x20;

Los elementos se organizan como bloques unos dentro de otros:

<figure><img src="/files/nixvBiP4en97iLM1cAI4" alt=""><figcaption></figcaption></figure>

### Ejemplo

<pre class="language-xml"><code class="lang-xml">&#x3C;?xml version="1.0" encoding="utf-8"?>
&#x3C;root> 

<strong>&#x3C;options id="Menu_principal" header="¿̣Con cual de estas opciones te puedo ayudar? Seleccioná la opción escribiendo el número correspondiente👇">      
</strong>
 &#x3C;option text="Necesito un presupuesto">         
  &#x3C;action type="hand-over"/>    
 &#x3C;/option>
 
 &#x3C;option text="Quiero hablar con un representante">        
  &#x3C;action type="hand-over"/>    
 &#x3C;/option>   
  
&#x3C;/options>
&#x3C;/root>
</code></pre>

{% hint style="warning" %}
Siempre que se abre un comando, sea del tipo que sea, también debe cerrarse:

* **Apertura < > : Ej \<root>  /  \<options>**
* **Cierre \</> :Ej \</root>     / \</options>**
  {% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://soporte.optiwe.com/chatbots/estructura-basica.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
