You may want to calculate helper variables based on other data fields as part of your workflow. A classic example would be financial ratios in a credit workflow. We can create these easily, using a formula rule


Say we had a simple credit decisioning workflow that pulled three fields from a credit bureau about each customer: total mortgage debt, total car debt, and total credit card debt (revolving debt). In addition we capture the customer income during their request for a line of credit.

Let's build a credit decision workflow that looks at the debt_to_income ratio for this customer. We can create a helper variable to calculate this ratio, and then use it in future rules.

From our simple credit workflow, we would enter Edit Mode, and drag a Transformation block onto the graph.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/34be31e2-8c18-490f-86e2-882e8c2cf29d/Screen_Shot_2021-06-17_at_12.54.57_PM.png

After saving our graph, we'd click on the new Transformation Block, and add a new Rule of type Formula

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0b470c62-8f6e-4530-9689-ad160933a942/Screen_Shot_2021-06-17_at_12.57.39_PM.png

We'll put a name in the Output cell. For example, let's use debt_to_income

Next, enter a formula in the formula box. You can use any basic mathematical operators, as well as any of the fields suggested by autocomplete.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/df6e219d-7b6c-41c8-89ed-64f1a0bdb60f/Screen_Shot_2021-06-17_at_12.59.11_PM.png

Check your Syntax. Then assuming everything looks good, click Save. Now you can write rules that refer to debt_to_income just like any other property of a customer.