# 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: 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://soporte.optiwe.com/chatbots/estructura-basica.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.
