Order Express Pricing Rules
Contents
Overview
Order Express utilizes a robust expression system designed by eVision Services which allows for the conditional pricing of items. These pricing rules are stored within the database in the PricingRules
table. Rules are written in postfix notation, but includes a number of keywords that can be used to retrieve information about the item being priced (such as how a product can be priced differently based on which styles are applied to it.
Unimplemented Keywords
These keywords are considered to be "valid" keywords/tokens within the Rules Engine but currently have no implementation for pricing rules, and are thus not available for usage in pricing rules.
-
C:
- Category -
E:
- Finished End Option Group -
H:
- Hinging Option Group -
N:
- Style Option Selections Count -
L:
- Product Line -
Q:
- Style Option Selection -
S:
- Style Category
Implemented Keywords
The following keywords have a defined meaning within pricing rules and can be used. Each of the keyboards are shown as links which will take you to their usage instructions.
-
A:
- Special -
F:
- Formula -
I:
,=>
, and,
- Conditional -
O:
- Style Option -
P:
- Product -
D:
- Modification -
M:
- Variable Price Code -
R:
- Price -
T:
- Tag -
U:
- Upcharge -
V:
- Variable -
W:
- Modification Variable -
X:
- Constant
Usage
Specials
Tokens: A:
Format: A:?
The format A:?
is the equivalent of asking if the current item being evaluated is a special (product).
Nested Formulas
Format: F:[parameter]
Executes the pricing rule with a name of [parameter]
. This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.
The value for [parameter]
should match PricingRuleLabel
.
Conditional Expressions
Tokens: I:
, =>
, ,
Format: I:[conditional]=>[expression_if_true],[expression_if_false]
Conditional expressions are defined using the above tokens. When these tokens are found within the expression, the expression is split into multiple parts. The [conditional]
parameter is always executed to determine if it evaluates to a true
or false
value. If this evaluates to true
, the [expression_if_true]
parameter is executed. If it evaluates to false
, the [expression_if_false]
parameter is executed.
Style Options
Tokens: O:
Format: O:[style_option_display_id]
The value for the [style_option_display_id]
parameter should match the StyleOptionDisplayID
in the StyleOptions
table.
Products
Tokens: P:
Format: P:[product_display_id]
, P:[product_id]
or P:?
The value for the [product_display_id]
parameter should match the ProductDisplayID
in the Products
table. Similarly, if [product_id]
is used, it should match the ProductID
. The format P:?
is the equivalent of asking if the current item being evaluated is a product.
Modifications
Tokens: D:
Format: D:[modification_display_id]
or D:?
The value for the [modification_display_id]
parameter should match the ModificationDisplayID
in the Modifications
table. If the current item being evaluated is a modification, the value returned will be true if the modification's display id matches. If the current item being evaluated is a product, the value returned will be true if the product has a modification attached to it where the modification's display id matches. The format D:?
is the equivalent of asking if the current item being evaluated is a modification.
Variable Price Codes
Tokens: M:
Format: M:[variable_code]
Used to obtain the price for the current item. The value specified for the [variable_code]
parameter is used, alongside the current price group, to obtain the price for the current item. The value for the [variable_code]
parameter must match the Code
column in the OEVariablePriceCodes
table.
Prices
Tokens: R:
Format: R:[price_type]
Only three values are valid for the [price_type]
parameter. These values are BOOK
, LIST
, and PREMIUM
.
Tags
Tokens: T:
Format: T:[tag_name]
Used to determine if the current item is tagged as the value specified in the [tag_name]
parameter.
Upcharges
Tokens: U:
Format: U:[style_option_category_short_name]
Used to obtain the price of an upcharge for the style option category that matches the [style_option_category_short_name]
parameter for the current item. The value for the [style_option_category_short_name]
must match the ShortName
column in the StyleOptionCategories
table.
Variables
Tokens: V:
Format: V:[variable_code]
Used to obtain the value of a product variable for the current item. The value for the [variable_code]
parameter must match the VariableCode
column in the OEVariables
table.
Modification Variables
Tokens: W:
Format: W:[variable_code]
Used to obtain the value of a modification variable for the current item. The value for the [variable_code]
parameter must match the VariableCode
column in the OEVariables
table.
Constants
Tokens: X:
Format: X:[constant_name]
or X:[decimal]
Used to obtain the value of constant. The value for the [constant_name]
parameter must match the ShortName
column in the Constants
table. If [decimal]
is used, the value must be a string representation of a number.