Articles in this section

Add a transformation to a flow step

You add a transformation to an export, lookup, or import step to restructure the data that leaves that step. This article covers the steps that apply to every transformation option: opening the Define transformation editor, choosing Rules 1.0, Rules 2.0, or JavaScript, previewing the result, and saving. It's for anyone who builds or maintains flows; writing the rules for each option is covered in that option's article.

Prerequisites:

  • You need Manage access to the integration that contains the flow. Account owners, admins, and users with Manage all have it, as do users with Custom permissions that include Manage for that integration. Monitor access can't change flows or flow steps. For details, see Manage user roles & permissions to an account.
  • The step must return sample data, so the editor can show input and preview output. The Input pane shows the result of previewing the step. If the step's request fails, the pane shows {} and an error message displays. Fix the step's settings so its preview returns data, and then reopen the editor. For a lookup, also confirm that the steps before it return data.
  • Decide which option to use. For a comparison, see Transform data in integrator.io.

Open the transformation editor

  1. Go to Build

    Build icon

    , and then select Flows.

  2. Open the flow that contains the step.
  3. On the export, lookup, or import step, select Actions elipses-button.png.
  4. Under Outgoing data, select Transformation.

The Define transformation editor opens. Under Outgoing data, Transformation is described as "Restructure data" on an export, "Restructure lookup result data" on a lookup, and "Restructure import result data" on an import. If the step already has a transformation, the description reads "Already added."

Choose a transformation option and build rules

  1. At the top of the editor, select Rules 1.0, Rules 2.0, or JavaScript. Import-result transformations offer Rules 1.0 and JavaScript.
  2. Build your rules:

Important: The step applies only the option that's selected when you save. Saving erases the rules defined in the other options. If you're testing another option, copy your existing rules somewhere safe before you save.

Preview and save

  1. Select Preview to apply your rules to the sample input and show the result in the Output pane. To preview automatically after every change, select Actions elipses-button.png in the editor header, and then select Auto preview.
  2. Compare the Output pane with the format the next step expects. Adjust your rules until they match.
  3. With the option you want selected, select Save & close. Until you make a change, the editor shows Save and Close instead. If you close the editor with unsaved changes, select Save changes or Discard changes.

The transformation runs every time the flow runs, on every record that leaves the step.

Remove a transformation

To remove a transformation, open the editor, delete its rules, and then select Save & close. To delete every Rules 2.0 rule, select Actions elipses-button.png on the toolbar, and then select Remove all rules. Remove all rules doesn't ask for confirmation, but nothing changes until you save.

After you save with no rules, the step passes records through unchanged, and Transformation no longer reads "Already added."