# Rule action: Maximum length

### Use cases

{% hint style="info" %}
Shorten product titles

Use the **maximum length** action to shorten/trim the length of values in your product data. Some channels, like Google Ads and Marktplaats, require fields such as "title" to have a character limit.
{% endhint %}

### Shorten product titles (to 30 characters)

Using **maximum length**, you can cut off the title at 30 characters so every title fits the export channel's maximum length.

{% stepper %}
{% step %}

### Add a rule with the Maximum length action

* Create or edit a rule where you want to shorten the product title.
* Add a THEN action and choose the **Maximum length** action.
  {% endstep %}

{% step %}

### Configure the maximum length

* Set the maximum length to 30 characters (or the limit required by your channel).
* Choose how the text should be trimmed:
  * Trim directly: cut the title directly after 30 characters.
  * Trim on words: trim the title after the last complete word that fits within the 30 character limit.
    {% endstep %}

{% step %}

### Result

The THEN (and AND) statements will produce the trimmed titles according to your configuration.
{% endstep %}
{% endstepper %}

Images showing the configuration and resulting trimmed titles:

<figure><img src="/files/8f41beec553e000d849a104a6451d40bd31ef800" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/27f3e5c0a1745076ad445782b9faf2c53631f6aa" alt=""><figcaption></figcaption></figure>


---

# 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://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-maximum-length.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.
