> 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 %}
