Formula Builder
Last update: 19.03.2021
Formula Builder
The below diagram shows the APIFuse formula builder. There are three sections in the formula builder:
- Prebuilt formulas (left section)
- Previous steps output fields (right section)
- Formula editor (center section)
Prebuilt formulas
There are a suite of formulas categorized by data types to meet your requirements. In the left section, you will find a list of formulas for Text, Logical, Math, and Date/DateTime. You can expand each list to see more available formulas.
Prebuilt formulas may or may not accept input fields and produce an output value. For example, the currentDateTime() formula takes no input and produces the current date-time as the output value.
The Add() formula takes input1, input 2 (or more), and produces the sum of the total inputs.
To use the prebuilt formulas, click on the formula from the list and it will be added to the formula editor section. Then you can edit it to add input fields.
The below formula checks if the account Id is equal to 12345. If the account Id is 12345 then the formula returns TRUE, otherwise FALSE.
Previous steps output fields
The Formula builder automatically populates all of the output fields available from the previous workflow steps, for example, output from the trigger or other actions that are executed before the current step. You can expand individual steps to see the available output fields. Then click on the output field to use it in the formula editor as shown below.
1.
2.
3.
Formula Editor
As explained in the previous sections, you use the formula editor to build your formula that maps the field as per your workflow requirements. You can also add hardcoded values into the formula editor. Hardcoded values assigned to the input field without any modification i.e input field will have a constant value for all the workflow transactions.
Put the constant text inside double-quotes as shown in the screenshot below.