PSP Strategy Conditions Module

The Strategy Conditions module lets users define special conditions based on which some prices will be ignored or taken with lower priority. Conditions are applied at the very end of the calculation, after exceptions. This feature does not, however, differentiate between independent and dependent prices in a dependent price list. Independent prices are fetched and paired with dependent ones after applying conditions.

To set a condition, there are these requirements: condition order, condition expression, and the rule to be applied.

Condition Expression Syntax

In general, a condition expression has the form of left-hand side operand operator right-hand side operand. For example, Cost+.margin<MINIMUM_MARGIN_PRICE. A suggestion is to think of the left-hand side strategy as the main strategy for the given condition.

Left-hand Side Operand

The left-hand side of the expression must always be a property of a given strategy. The supported properties are:

  • Gross price of the strategy: <some strategy name>.price.

    • Example: Cost+.price, RRP.price, etc.

  • The margin of the strategy: <some strategy name>.margin.

    • Example: Cost+.margin, RRP.margin, etc.

The strategy can be any calculated strategy or exception.

Do not use parentheses with strategy names like this: (Cost+.price), (RRP).price. The correct format is Cost+.price or RRP.price.

Operator

Supported operators are: "<" (less than), ">" (greater than), "=" (equals). 

Right-hand Side Operand

The right-hand side of an expression may be either property of a strategy or PriceCalculator's parameter. 

  • Gross price of the strategy: <some strategy name>.price.

    • Example: Cost+.price, RRP.price, etc.

  • The margin of the strategy: <some strategy name>.margin.

    • Example: Cost+.margin, RRP.margin, etc.

  • PriceCalculator's parameter: parameter name

    • Example: MINIMUM_MARGIN_PRICE, DISCOUNT, etc.

In addition, the right-hand side may be modified by a certain multiplier. The syntax is to wrap the right-hand side operand into parenthesis "(...)", add an asterisk character and a string parsable to BigDecimal. Example of a condition expression using multiplier:

  • Cost+.price<(RRP.price * 2)

  • Cost+.price<(MINIMUM_MARGIN_PRICE * 2)

Also, custom values from additionalParameters and additionalOptionalParameters are accepted.

The strategy name needs to be written explicitly. This is the case when using Dependent PL/PG and "Cost+ (Independent Type Strategy)" and "Cost+" are two different strategies.

Rules

Name

Description

Syntax

Name

Description

Syntax

Skip

Remove the strategy on the left-hand side from the strategy list.

(skip)

Fallback

Move the left-hand side strategy to the last position of the strategy list.

(fallback)

Move behind

Move a strategy after another strategy.

$strategyName1<$strategyName2

Example: "Cost+<RRP", which mean moving Cost+ strategy after RRP strategy.

Wildcards

To manage a large number of strategies in one go, there is the wildcard “{any}". The condition with wildcard will be applied to every strategy and exception in the strategy list. At the place of a wildcard, strategy name will be inserted.

Example: "{any}.margin<MINIMUM_MARGIN"

Configuration

Set Module Status

Set the module status in the PriceSettingModules PP table where the module names is PSP_STRATEGY_CONDITION_MODULE.

Set Condition

To set a strategy condition, set it in the StrategyConditions PP. To learn more about it, see https://pricefx.atlassian.net/wiki/spaces/ACC/pages/4998696718.