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.
After saving our graph, we'd click on the new Transformation Block, and add a new Rule of type Formula
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.
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.