Transformation Blocks


Transformation Blocks received a big upgrade in May 2024

Check out what's new here!

Transformation Blocks are used to run a special type of rule called a Formula, used to create new Custom Variables. These can be used to calculate helper variables from the various data inputs to use in your rules, perform basic math, and run our Inline Functions to transform strings, lists, numbers and more.

As an example, say you have both customer.debt and customer.income as input fields, and you want to calculate "debt to income ratio" to use in a few different rules, without writing out a formula in each rule.

You can add a Transformation block, and then add new Variables in each row

Descriptive Notes

Leaving notes on your variables is a great way to avoid confusion. They can help your teammates see why you're calculating things the way you are, and can be invaluable when you return to the workflow in the future and are looking for context.

If you leave a note for a variable, it will also be visible under autocomplete. So if a user starts typing dti_ratio in any future rule, they'll see the note you left explaining what that variable represents and how to use it.

Using Transformation Blocks Effectively

When your Workflow runs, it will evaluate the rows in your Transformation block from top to bottom. If you want to have complex calculations with multiple steps, we recommend breaking those into a few rows to make testing easier. You can use or modify any of the variables used in earlier rows of the Block - in the example above, notice how ltv uses the home_amount variable created in the row above.

Note: before your Variables become visible under autocomplete, you'll need to click Save. It's a good idea to click Save after each row you add or edit.

Testing your Transformation Block

You can test how each row in your Transformation Block will be evaluated using test inputs - select the Testing tab from the info panel on the right, and update the input values you'd like to try via the text box that appears.

Next, select the variable you'd like to evaluate from the drop down, and click Test

If you're testing rows that depend on prior rows, you may need to assign values to those variables in the input screen of the Testing panel.

(Old Version) Transformation Blocks prior to May 2024

Let's create a new Formula rule, and create a new Custom Variable called dti_ratio

We can then set this equal to our customer's debt/income, to create a new value for use in our rules. We can use any standard mathematical operators, as well as any of the Inline Functions

Once you've saved, the new custom variable dti_ratio will be available under autocomplete in all subsequent rules in your Workflow.

Testing Formula Rules

You can test your Formula rules by clicking on the testing panel on the right of the Rule Editor. You can edit the sample input fields, and then click "Test" at the bottom to make sure your Formula returns what you'd expect. Click Save when you're done