codeRule action: Maximum length

Use cases

circle-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.

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.

1

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.

2

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.

3

Result

The THEN (and AND) statements will produce the trimmed titles according to your configuration.

Images showing the configuration and resulting trimmed titles:

Last updated

Was this helpful?