# 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="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/ZJgqLfXytD8JPlqSw4p8/360007538399" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/pFh1lPPOp9nHvmhCok4g/360007523800" alt=""><figcaption></figcaption></figure>
