Difference between revisions of "Order Express Pricing Rules"
m (Added links and headings for all keywords.) |
m (Fixed headings.) |
||
Line 3: | Line 3: | ||
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 <code>PricingRules</code> table. Rules are written in [[wikipedia:Reverse Polish Notation|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. | 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 <code>PricingRules</code> table. Rules are written in [[wikipedia:Reverse Polish Notation|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. | ||
− | === Keywords | + | == Keywords == |
+ | |||
+ | === 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 considered to be invalid. | These keywords are considered to be "valid" keywords/tokens within the ''Rules Engine'' but currently have no implementation for pricing rules, and are thus considered to be invalid. | ||
Line 17: | Line 19: | ||
* <code>W:</code> - Modification Variable | * <code>W:</code> - Modification Variable | ||
− | === Keywords | + | === Implemented Keywords === |
* <code>F:</code> - [[#Nested_Formulas|Formula]] | * <code>F:</code> - [[#Nested_Formulas|Formula]] | ||
Line 29: | Line 31: | ||
* <code>X:</code> - [[#Constants|Constant]] | * <code>X:</code> - [[#Constants|Constant]] | ||
− | === Nested Formulas === | + | === Usage === |
+ | |||
+ | ==== Nested Formulas ==== | ||
Format: <code>F:[parameter]</code> | Format: <code>F:[parameter]</code> | ||
Line 35: | Line 39: | ||
Executes the pricing rule with a name of <code>[parameter]</code>. This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces. | Executes the pricing rule with a name of <code>[parameter]</code>. This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces. | ||
− | === Conditional Expressions === | + | ==== Conditional Expressions ==== |
Tokens: <code>I:</code>, <code>=></code>, <code>,</code> | Tokens: <code>I:</code>, <code>=></code>, <code>,</code> | ||
Line 43: | Line 47: | ||
Conditional expressions are defined using the above tokens. When these tokens are found within the expression, the expression is split into multiple ''parts''. The <code>[conditional]</code> parameter is ''always'' executed to determine if it evaluates to a <code>true</code> or <code>false</code> value. If this evaluates to <code>true</code>, the <code>[expression_if_true]</code> parameter is executed. If it evaluates to <code>false</code>, the <code>[expression_if_false]</code> parameter is executed. | Conditional expressions are defined using the above tokens. When these tokens are found within the expression, the expression is split into multiple ''parts''. The <code>[conditional]</code> parameter is ''always'' executed to determine if it evaluates to a <code>true</code> or <code>false</code> value. If this evaluates to <code>true</code>, the <code>[expression_if_true]</code> parameter is executed. If it evaluates to <code>false</code>, the <code>[expression_if_false]</code> parameter is executed. | ||
− | === Style Options === | + | ==== Style Options ==== |
Tokens: <code>O:</code> | Tokens: <code>O:</code> | ||
Line 51: | Line 55: | ||
The value for the <code>[style_option_display_id]</code> parameter should match the StyleOptionDisplayID in the <code>StyleOptions</code> table. | The value for the <code>[style_option_display_id]</code> parameter should match the StyleOptionDisplayID in the <code>StyleOptions</code> table. | ||
− | === Variable Price Codes === | + | ==== Variable Price Codes ==== |
Tokens: <code>M:</code> | Tokens: <code>M:</code> | ||
Line 59: | Line 63: | ||
Stored in the table <code>OEVariablePriceCodes</code> | Stored in the table <code>OEVariablePriceCodes</code> | ||
− | === Prices === | + | ==== Prices ==== |
Tokens: <code>R:</code> | Tokens: <code>R:</code> | ||
Line 67: | Line 71: | ||
Only two values are valid for the <code>[price_type]</code> parameter. These values are <code>BOOK</code> and <code>LIST</code>. | Only two values are valid for the <code>[price_type]</code> parameter. These values are <code>BOOK</code> and <code>LIST</code>. | ||
− | === Tags === | + | ==== Tags ==== |
Tokens: <code>T:</code> | Tokens: <code>T:</code> | ||
Line 75: | Line 79: | ||
Used to determine if the current item is tagged as the value specified in the <code>[tag_name]</code> parameter. | Used to determine if the current item is tagged as the value specified in the <code>[tag_name]</code> parameter. | ||
− | === Upcharges === | + | ==== Upcharges ==== |
Tokens: <code>U:</code> | Tokens: <code>U:</code> | ||
Line 83: | Line 87: | ||
Used to obtain the price of an upcharge for the style option category that matches the <code>[style_option_category_short_name]</code> parameter for the current item. The value for the <code>[style_option_category_short_name]</code> must match the <code>ShortName</code> column in the <code>StyleOptionCategories</code> table. | Used to obtain the price of an upcharge for the style option category that matches the <code>[style_option_category_short_name]</code> parameter for the current item. The value for the <code>[style_option_category_short_name]</code> must match the <code>ShortName</code> column in the <code>StyleOptionCategories</code> table. | ||
− | === Variables === | + | ==== Variables ==== |
Tokens: <code>V:</code> | Tokens: <code>V:</code> | ||
Line 91: | Line 95: | ||
Used to obtain the value of a variable for the current item. The value for the <code>[variable_code]</code> parameter must match the <code>VariableCode</code> column in the <code>OEVariables</code> table. | Used to obtain the value of a variable for the current item. The value for the <code>[variable_code]</code> parameter must match the <code>VariableCode</code> column in the <code>OEVariables</code> table. | ||
− | === Constants === | + | ==== Constants ==== |
Tokens: <code>X:</code> | Tokens: <code>X:</code> |
Revision as of 12:58, 14 August 2014
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.
Keywords
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 considered to be invalid.
-
C:
- Category -
E:
- Finished End Option Group -
H:
- Hinging Option Group -
N:
- Style Option Selections Count -
P:
- Product -
L:
- Product Line -
Q:
- Style Option Selection -
S:
- Style Category -
W:
- Modification Variable
Implemented Keywords
-
F:
- Formula -
I:
,=>
, and,
- Conditional -
O:
- Style Option -
M:
- Variable Price Code -
R:
- Price -
T:
- Tag -
U:
- Upcharge -
V:
- Variable -
X:
- Constant
Usage
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.
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.
Variable Price Codes
Tokens: M:
Format: M:[]
Stored in the table OEVariablePriceCodes
Prices
Tokens: R:
Format: R:[price_type]
Only two values are valid for the [price_type]
parameter. These values are BOOK
and LIST
.
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 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]
Used to obtain the value of constant. The value for the [constant_name]
parameter must match the ShortName
column in the Constants
table.