# 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="https://2284933970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZvPG7TUJJaLgP81riNAt%2Fuploads%2FPPzxjrbMGlEAm7eIk3TD%2Fimage.png?alt=media&#x26;token=63c40965-197f-43f6-884d-06e506a94272" 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="https://2284933970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZvPG7TUJJaLgP81riNAt%2Fuploads%2FXILjpgeF2ihpra0v29dy%2Festrucutra%20basica.png?alt=media&#x26;token=23a7beaa-8dac-4d2a-8b1d-b47a012a79a5" 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 %}
