Calling the Business Formulas

After you configured a data set, a formula expression in the editor, and activated the formula, you can use the formula in a journey or entity form.

Calling Formulas in a form-driven flow (no code)

  1. Open Innovation Studio, open the main menu and select Digital Experience > Digital Journeys > Form Driven Flows.
  2. Open the form driven flow you wish to work on.
  3. Select the Actions tab, then click Insert.
  4. Click Insert and select the call formula with data mapping and select the formula you wish to execute and he mapping you have done.
  5. Click ''Save'' and then click ''Save and reload''.
  6. Continue to add as any as you have or need.
  7. Open each step and add the action by clicking the ''Flow control''.
  8. In the section ''Actions to be performed'' add the action that calls the formula.
  9. Click the Save and Reload button.

Track form driven flows that are using a specific formula

After you configure a form driven flow to call a formula, the form will be listed in the Form Tracking tab of the formula's edit form.

Call formulas using server side scripts

Formulas can be called from server side scripts using the following method:

Copy
/**
 * Call formula by name
 * @param formulaName is the name of the formula
 * @param input is the input that must be provided in order to compute the formula
 * @param options are the formula runtime options of type IFtosRunFormulaOption. A property that can be set here is referenceDate if you need to call a past version of the formula
 * @return the object with the calculated values
*/
server.formulas.runFormula(formulaName: string, input: any, options: any): any

 

 

For more information, see the Server SDK Reference Guide.