Formulas - Logical


CONTENTS OF THIS ARTICLE

Create a new logical formula

Logical formulas are used to control the flow of calculation based on custom defined conditions.

To create a new logical formula, create a new formula (as described in the Formulas section) and click on “Logical operation” at the lower part of the screen.

New block should appear:


Click on "Logical operation #1" to continue editing.

The following block should appear:

Operation

Operation icons determine which comparation should be applied to the operand:- equal

- not equal

- greater than or equal

- greater than

- less than or equal

- less than

- within range

- no operation


Operands

If you choose any operation save for “no operation”, you should choose an operand. Operands can be:

  • P – Parameter – these are predefined values taken directly from the Offer screen. This list currently cannot be changed. The list of parameters is provided separately.
  • $ - Variables – these are the values users create and define by themselves. For more about creating custom variables, please refer to Rules section.


In case you selected Parameter, some of them may be Complex parameters. If that is the case, you will need to specify which property is to be used in your formula. The list of properties available for each Parameter is provided in the Parameters section.

Likewise, if you wish to restrict the selection, you can use Filters to filter by, for example, tariff group, or option type. The list of filters is also provided in the Parameters section.


Comparators

After you choose the Operand, you should choose the Comparator. There are several types of comparator:

  • $ - Variables – you can use any variable in the system, including those parameters which are not Complex parameters.
  • # - enter any number
  • T – enter any text
  • B – True or False

- enter any date

If you choose the operation “within range”, you will need to provide the lower and the upper limit of your range:

Range values can be either number or date (see previous symbols).

“No operation” is used for cases when no other condition is met (“the default case”).


Results

When you define the conditions, you should also define the result. Result can be defined in two ways:

  •  $ - Variable – if the defined conditions are met, assign the Value to the selected variable. Here only the variables defined in this particular rule can be used (see Rules section)
  • </> - Formula – if the defined conditions are met, execute the selected Formula. Formula must be created in the current rule, and positioned after the calling (i.e. current) formula. There is no limit to the number of logical branches you can create, e.g. you can create a formula that calls another formula, that calls another formula… and so on, until you achieve the level of complexity you require for your calculation.


When you choose the desired result, click “Add result” to add it to formula.

No changes to your formula are committed until you click “Save formula”.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article