> For the complete documentation index, see [llms.txt](https://helpcenter.channable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-es/reglas-edicion-masiva-y-enriquecimiento/como-utilizar-acciones-entonces-en-las-reglas/accion-de-regla-dividi-testo.md).

# Acción de regla: dividi testo

{% hint style="info" %}
Usado para: dividir el contenido de un campo en un carácter o palabra determinado y luego usar una o más de las partes resultantes.

Se usa en: sentencias "THEN" y sentencias "ELSE".
{% endhint %}

La regla "split text" divide un campo cada vez que aparece en él un carácter o palabra que elijas. Al usar la regla split text básicamente cortas un campo en varias partes. Luego puedes seleccionar una o más de esas partes para rellenar el campo que prefieras.

Un ejemplo: imagina que tus descripciones contienen la talla de tus productos. Puedes usar la regla split text para rellenar el campo "size" con la parte que aparece después de la palabra "size:" en tu descripción.

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/9DNMWsu0M2D9MCQ9Rhkt/channable_rules_what%20does%20each%20rule%20do%20rule%20split%20text%200.png" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Paso: Primera división — extraer todo lo que viene después de "size:"

Usa la regla "split text" para dividir la descripción en la palabra "size:" y luego selecciona la parte que la sigue para rellenar el campo "size".

Esto establecerá el campo size en toda la segunda parte (todo lo que va después de "size:").

![ejemplo de split text paso 1](https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/j3nOOkJ1XHrcyj2OHyjr/channable_rules_what%20does%20each%20rule%20do%20rule%20split%20text%201.png)
{% endstep %}

{% step %}

### Paso: Segunda división — refinar a solo "XL"

Si la segunda parte todavía contiene texto extra (por ejemplo: "XL, otra info"), añade otra regla "split text" sobre el campo "size" recién rellenado. Divide por la coma y selecciona la parte antes de la coma (primera parte) para obtener solo "XL".

Este paso adicional refina el campo size hasta el valor exacto que quieres.

![ejemplo de split text paso 2](https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/onlDQlc3SlLUGe60O9kU/channable_rules_what%20does%20each%20rule%20do%20rule%20split%20text%203.png)
{% endstep %}
{% endstepper %}


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-es/reglas-edicion-masiva-y-enriquecimiento/como-utilizar-acciones-entonces-en-las-reglas/accion-de-regla-dividi-testo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
