Transform rules: rename, combine, format

Clean and reshape a field's value with simple, stackable transforms: trim, case, find and replace, default if empty, prepend, append, and UTM tags.

Transform rules: rename, combine, format

What a transform is

A transform is a small rule that changes a field's value on the way out. You stack transforms in order, and each one runs on the result of the one before it. So you can trim spaces first, then fix the casing, then add a prefix, in that order.

Transforms live next to each mapped field in the Fields tab. Click "Add transform" under a field to open its transform list, then add as many as you need. The label on the button shows how many are applied (for example "2 applied").

The transforms you can add in Fields

Each transform does one job. Stack them to build up exactly the value you want.

  • Default if empty: if the value is blank, use a fallback you type. Example: a missing Brand becomes "Generic". A non-empty value is left untouched.
  • Trim spaces: remove leading and trailing whitespace. Useful for columns that come with stray spaces.
  • lowercase: turn the value all lower case. Example: "NEW" becomes "new".
  • UPPERCASE: turn the value all upper case. Example: "new" becomes "NEW".
  • Title Case: capitalize the first letter of each word and lowercase the rest. Example: "summer DRESS" becomes "Summer Dress".
  • Prepend text: add text to the front. Example: prepend "https://shop.com" to a relative path.
  • Append text: add text to the end. Example: append " - Free Shipping" to a title.
  • Find and replace: swap one piece of text for another, everywhere it appears. Example: find "&" and replace with "and".
  • Add UTM tags: append tracking parameters to a link. This is covered in its own article.

Example: clean up a messy title

Say your source titles come in as " summer DRESS " with extra spaces and shouty casing, and you want them to read "Shop: Summer Dress".

Add these transforms in order to the Title field, and the result builds up step by step.

  1. 1Add "Trim spaces" so it becomes "summer DRESS".
  2. 2Add "Title Case" so it becomes "Summer Dress".
  3. 3Add "Prepend text" with value "Shop: " so it becomes "Shop: Summer Dress".

Order matters

Because transforms run top to bottom, the same set in a different order can give a different result. Trim before you prepend, or you may copy the stray spaces into the middle of your value. Fix casing before you append fixed text you want to keep as-is.

If a transform does not seem to do anything, check the order and the live sample shown for the field. The sample reflects the saved mapping, so save and re-preview to see the latest result.

More advanced reshaping

The Fields tab covers the everyday cleanups above. For richer reshaping, MartechFlow also supports combining several columns into one value, formatting numbers to a fixed number of decimals, swapping coded values for friendly ones (a value map), and computing a discount percentage. Some of these are surfaced in the Output tab's "Build from pieces" and column tools.

To rename a column entirely (a different output header), use the Output tab to add a custom column or override a channel column. See Build your output feed (custom columns).

Questions

Can I apply more than one transform to a field?

Yes. Add as many as you like. They run in the order shown, each on the result of the previous one. Use the list under the field to reorder or remove them.

Does "Default if empty" overwrite real values?

No. It only fills in when the value is blank. A value that already has content passes through unchanged.

Will find and replace match part of a word?

Find and replace swaps every occurrence of the exact text you type. So finding "and" would also change "sandals". Make your find text specific (for example include surrounding spaces) to avoid surprises.

How do I combine two columns, like brand and title?

Use the Output tab's "Build from pieces" mode, where you write a template like "{brand} {title}" that joins fields and text. See Static values and built-from-pieces templates.

Ready to try it?

Start free, no credit card. Your first feed can be live in minutes.

Start free