Mesa Transform

Mesa Transforms convert the payload sent from the previous step into a form that the next step expects. Most the time, a Transform will automatically be created for your when you select an output or add a new step based on what that step is expecting. Of the three different types of Transforms, the Mapping Transform is the most common. If you need fine-tuned logic, you can customize the script for every Transform.

Mapping Transform

The Mapping Transform is by far the most common type of transform. The first column represents the payload key that the next step will receive. The Value column represents the the value that the key will have. The value can be a hard-coded string (like VIP or 20.99), or a liquid-style token ({{source.order_name}}) that will be replaced by the corresponding value from the payload during execution. When you click into each column, an autocomplete will appear with suggested tokens based on the previous and next steps in the Automation.

Transform also supports array fields, through using square parentheses. For example, to get the name of each line item on a Shopify order, you can use the token {{source.line_items[].title}} . For the destination ensure an array field is also specified, for example {{lineItems[].title}}

This mapping, from our Add Infinite Options Line Items to Google Sheet template maps order data to the columns expected by the Google Sheets: Add Row to Sheet step.

Editor Transform

The Editor Transform lets you create a JSON, HTML, or text payload. It supports liquid-style tokens ( {{source.order_name}}).

Script Transform

The Script Transform allows fine-tuned logic in a JavaScript script. Enter a human-readable description of what the script is doing, and then click Edit Code to start writing your JavaScript.  Read our Technical Documentation for more details about writing scripts.