A mapping's transform is a chain of operations separated by |,
applied to the value in order, left to right. Operations that take an argument use a colon, e.g.
prepend:SKU-; operations
with multiple arguments separate them with a comma, e.g.
replace:old,new.
Operations
| Syntax | Effect |
|---|---|
| trim | Strips leading and trailing whitespace. (strip is an alias for the same operation.) |
| uppercase | Converts the value to upper case. |
| lowercase | Converts the value to lower case. |
| prepend:value | Adds value before the current value. |
| append:value | Adds value after the current value. |
| default:value | Substitutes value only when the current value is empty. |
| static:value | Replaces the value unconditionally with value, ignoring the source. |
| replace:from,to | Replaces every occurrence of from with to. |
| number_format:decimals | Formats a numeric value to a fixed number of decimal places (default 2 if omitted). |
| currency:CODE | Writes a number as a Google-style price with two decimals and an ISO 4217 code, for example 29.99 USD. Leave the code out (currency) to use the feed's currency. Empty and non-numeric values are left as they are. |
| yes_no | Writes true/false values (1/0, yes/no) as Google's yes or no, for attributes such as identifier_exists. |
| plain_text | Removes HTML tags and decodes entities, so a description such as <p>Soft <b>cotton</b></p> becomes Soft cotton. OpenAI product feeds require plain-text descriptions. |
| chatgpt_availability | Writes availability in OpenAI's spelling: preorder becomes pre_order and in stock becomes in_stock. Values it does not recognise are left unchanged. |
Examples
trim | uppercase
Cleans whitespace, then upper-cases the value — useful for normalizing an identifier column.
prepend:SKU-
Turns 1042 into SKU-1042.
default:0
Fills a blank price or quantity field with 0 instead of leaving it empty.
replace:USD, | trim | prepend:$
Turns USD 19.99 into $19.99. Spaces around replace arguments are trimmed, so strip the code first, then clean up the leftover space.
number_format:2
Formats a price like 19.9 as 19.90.