1. How to set formula based credit limit or expression as credit limit?

You can set a formula based credit limit (expression) for a rule in two ways.

2. How to create an expression?

You can assign the outcome of an expression as the credit limit. Click on ‘build expression’ button to open expression builder.

The expression builder screen has two category listings:

Variables list – List of variables that can be used in expression

Operators list – to be used along with variables in building an expression

You can choose a variable category, select the variable and click ‘Add variable’ icon. The selected variable will be added to the expression view text area.

Similarly choose the operator category, select the operator and click ‘Add operator’ icon. The selected operator will be added to the expression view text area.

After you finish creating the expression, click on ‘Evaluate’ button below the text area to validate the expression for any syntax or logical errors. This would also run this expression on all companies in your workspace to return minimum, maximum and average value in your workspace. This is to help you fine tune your expression parameters.

If there are any errors in the expression, you will be alerted to check for errors.

3. What are the operators & functions supported in expression builder?

Following operators are supported in expression builder

CASE statement

The following operators and functions are supported within the CASE block.

Operators / Functions supported in Case block

Examples

IS NULL

CASE WHEN (Employees) IS NULL THEN 1000 ELSE 1500 END

Is not NULL

CASE WHEN (Employees) IS not NULL THEN 1000 ELSE 1500 END

Like – supports usage of SQL wildcards (%, _)

CASE WHEN (D&B Rating) Like '%A' THEN 1000 ELSE 1500 END

Is not equal to (<>)

CASE WHEN (Employees)<>15 THEN 1000 ELSE 1500 END

Is less than or equal to (<=)

CASE WHEN (Assets - Total) <= 1500 THEN 10000 ELSE 20000 END

Is greater than or equal to (>=)

CASE WHEN (Sales) >= 15000 THEN 10000 ELSE 20000 END

Min (set of variables, expressions)

CASE WHEN (Sales) >= 15000 THEN MIN (10000, (Assets - Total), (Assets - Current) + (Current Dollars) ) ELSE 20000 END

Max (set of variables, expressions)

CASE WHEN (Sales) >= 15000 THEN MAX (10000, ((Assets - Total) / 3), (Assets - Current) + (Current Dollars) ) ELSE 20000 END

Avg (set of variables, expressions)

CASE WHEN (Sales) >= 15000 THEN 10000 ELSE AVG (20000, (Assets - Total), (Assets - Current)) END

Round (expression, length)

CASE WHEN (Assets - Total) <= 15 THEN 10 ELSE Round ((Requested Amount), 2) END