Order Express Formulas
Contents
- 1 Overview
- 2 Valid Tokens
- 3 Usage
- 3.1 Accounts
- 3.2 Aggregation
- 3.3 Categories
- 3.4 Collections
- 3.5 Conditionals
- 3.6 Constants
- 3.7 Dates and Time Spans
- 3.8 Infix Notation
- 3.9 Modifications
- 3.10 Nested Formulas
- 3.11 Pricing and Upcharges
- 3.12 Products
- 3.13 Product Lines and Options
- 3.14 Quotes
- 3.15 Specials
- 3.16 Style Options and Selections
- 3.17 Tags
- 3.18 Variables
- 4 Rules and Formulas
- 5 Result Negation
- 6 Valid Operators
- 7 Examples
Overview
Order Express utilizes a robust expression system designed by eVision Services which allows for the conditional availability and pricing and of items. These formulas are stored within the database in the Formulas
, PricingRules
, FinalValidationRules
and StyleOptionRules
table. Formulas are primarily written in postfix notation, but include a number of keywords that can be used to retrieve information about the item being evaluated or priced (such as how a product can be priced differently based on which styles are applied to it).
Valid Tokens
These keywords are considered to be "valid" keywords/tokens within the Rules Engine. Each of the keywords are shown as links which will take you to their usage instructions.
-
A:
- Special -
ACCOUNT:
- Account -
ACCOUNTVARIABLE:
- Account Variable -
C:
- Category -
COLLECTION:
- Collection -
COUNT:
- Count -
D:
- Modification -
DATETIME:
- Date -
E:
- Finished End Option Group -
EVERY:
- Every -
F:
- Formula -
H:
- Hinging Option Group -
I:
,=>
, and,
- Conditional -
IF:
and=>
- Infix Conditional -
INFIX:
- Infix -
L:
- Product Line -
LIMIT:
- Limit -
M:
- Variable Price Code -
MAX:
- Max -
MIN:
- Min -
N:
- Style Option Selection Count -
O:
- Style Option -
P:
- Product -
Q:
- Style Option Selection -
QUOTE:
- Quote -
QUOTEVARIABLE:
- Quote Variable -
R:
- Price -
S:
- Style Option Category -
SOME:
- Some -
SUM:
- Sum -
T:
- Tag -
TIMESPAN:
- Time Span -
U:
- Upcharge -
V:
- Variable -
VAR:
- Context Variable -
W:
- Modification Variable -
X:
- Constant -
Z:
- Evaluation
Usage
Accounts
Tokens: ACCOUNT:
Format: ACCOUNT:[property_or_variable_code]
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the [property_or_variable_code]
parameter must match either the VariableCode
column in the OEVariables
table or a property on the Account
object.
Aggregation
Tokens: COUNT:()
, MAX:()
, MIN:()
, SUM:()
Count
Tokens: COUNT:
, (
, ,
, )
Format: COUNT:([atoms])
or COUNT:[count_greater_or_equal_to]([atoms])
The value for [atoms]
is a comma separated list of atoms to test against. Returns the number [atoms]
that return true. The value of [count_greater_or_equal_to]
changes the return type of this atom into a boolean, where the result is true if the number of [atoms]
is greater or equal to the value supplied. Atoms that use the TOKEN:(,)
format are not supported in the list of atoms.
Maximum Value
Tokens: MAX:
, (
, ,
, )
Format: MAX:([atoms])
The value for [atoms]
is a comma separated list of atoms of which to find the largest value.
Minimum Value
Tokens: MIN:
, (
, ,
, )
Format: MIN:([atoms])
The value for [atoms]
is a comma separated list of atoms of which to find the smallest value.
Summation
Tokens: SUM:
, (
, ,
, )
Format: SUM:([atoms])
The value for [atoms]
is a comma separated list of atoms to add together.
Categories
Tokens: C:
, S:
Product and Modification Categories
Tokens: C:
or Category:
Format: C:[product_category_display_id]
or C:[modification_category_display_id]
The value for the [product_category_display_id]
parameter should match the ProductCategoryDisplayID
in the ProductCategories
table. The value for the [modification_category_display_id]
parameter should match the ModificationCategoryDisplayID
in the ModificationCategories
table.
Style Option Categories
Tokens: S:
or StyleOptionCategory:
Format: S:[style_option_category_display_id]
or S:[style_option_category_name]
The value for the [style_option_category_display_id]
parameter should match the StyleOptionCategoryDisplayID
in the StyleOptionCategories
table. The value of [style_option_category_name]
should match the ShortName
in the StyleOptionCategories
table. The boolean value indicating whether there is a selected style option category excludes special style options.
Collections
Tokens: COLLECTION:
, (
, ,
, )
Format: COLLECTION:([atoms])
or [[atoms]]
Used to return a collection of atom values. The value for [atoms]
is a comma separated list of atoms to evaluate.
Conditionals
Tokens: EVERY:
, I:
, LIMIT:
, SOME:
Every Condition
Tokens: EVERY:
or ALL:
, (
, ,
, )
Format: EVERY:([atoms])
The value for [atoms]
is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the TOKEN:(,)
format are not supported in the list of atoms.
Conditional Expressions
Tokens: I:
or Conditional:
, =>
, ,
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. Atoms that use the TOKEN:(,)
format are not supported in the true or false expressions; they are however, supported in infix conditionals.
Limits
Tokens: LIMIT:
, (
, ,
, )
Format: LIMIT:([atoms])
or LIMIT:[maximum]([atoms])
The value for [atoms]
is a comma separated list of atoms to test against. The value of [maximum]
indicates the threshold at which the result will be true (greater than [maximum]
). If no [maximum]
is supplied, it is assumed 0
. Atoms that use the TOKEN:(,)
format are not supported in the list of atoms.
Some Conditions
Tokens: SOME:
or ANY:
, (
, ,
, )
Format: SOME:([atoms])
The value for [atoms]
is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the TOKEN:(,)
format are not supported in the list of atoms.
Constants
Tokens: X:
or Constant:
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.
Boolean
Tokens: None
Format: [boolean]
The value must be a string representation of a boolean. Valid values are true
or false
(case-insensitive).
Decimal
Tokens: X:
, Constant:
or None
Format: X:[decimal]
or [decimal]
The value must be a string representation of a number.
String
Tokens: X:
, Constant:
or None
Format: X:"[string]"
or "[string]"
The value can be any string (enclosed in double quotes).
Dates and Time Spans
Tokens: DATETIME:
, TIMESPAN:
Dates
Tokens: DATETIME:
Format: DATETIME:[datetime]
, DATETIME:"[datetime]"
, DATETIME:Now
, or DATETIME:UtcNow
The value for [datetime]
is a string representation of a date, or one of two keywords: Now
or UtcNow
. Now
will return the users local time, where as UtcNow
will return the users local time with the UTC offset applied. When writing infix expressions, enclose the [datetime]
in double quotes, in order to distinguish operators such as /
or -
from date delimiters. See here for valid formats.
Time Spans
Tokens: TIMESPAN:
Format: TIMESPAN:[timespan]
or TIMESPAN:"[timespan]"
The value for [timespan]
is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the [timespan]
in double quotes, in order to distinguish the -
which indicates a negative. See here for valid formats.
Infix Notation
Tokens: INFIX:
, IF:
Infix Expressions
Tokens: INFIX:
or MATH:
or =
Format: INFIX:[expression]
The value for [expression]
is an expression/formula written in infix notation. Uses a subset of the available operators: *
, /
, +
, -
, <
, >
, <=
, >=
, /U
, *U
, &&
, ||
, !=
, ^
, %
, ==
, ??
. When using the =
token to denote an infix expression, it must be the first character in the formula.
Infix Conditional Expressions
Tokens: IF:
or InfixConditional:
or ELSEIF:
, =>
or THEN:
or ELSE:
Format: IF:[conditional]
or IF:[conditional]=>[expression_if_true]
or IF:[conditional]=>[expression_if_true]=>[expression_if_false]
or
IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses infix notation throughout. 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 (or if [expression_if_true]
is omitted, 1
when pricing, otherwise true
). If it evaluates to false
and [expression_if_false]
is omitted, 0
is returned when pricing, otherwise false
; the [expression_if_false]
parameter is executed if supplied. The conditionals can be chained by using an ELSEIF:
in the false expression.
Modifications
Tokens: D:
or Modification:
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. To check for special modifications, use A:D:?
.
Modification Product
Tokens: D:P:
, D:P:D:
, Modification:Product:
or Modification:Product:Modification
Format: D:P:[product_display_id]
or D:P:D:[modification_display_id]
The value for the [product_display_id]
parameter should match the ProductDisplayID
in the Products
table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format D:P:D:[modification_display_id]
is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.
Modification Product Tags
Tokens: D:P:T:
or Modification:Product:Tag:
Format: D:P:T:[tag_name]
Used to determine if the modification is attached to a product that is tagged as the value specified in the [tag_name]
parameter.
Modification Product Categories
Tokens: D:P:C:
or Modification:Product:Category:
Format: D:P:C:[product_category_display_id]
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the [product_category_display_id]
parameter.
Nested Formulas
Tokens: F:
or Formula:
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
.
Pricing and Upcharges
Tokens: R:
, U:
, M:
Prices
Tokens: R:
or Price:
Format: R:[price_type]
or R:[pricing_rule_label]
Used to obtain the price for the current item. Only four values are valid for the [price_type]
parameter. These values are BOOK
, LIST
, PREMIUM
or BASE
. BOOK
is the calculation of the first summary group in the sequence (ProductLineSummaryGroups
), where as LIST
is the price with no formula applied. If [pricing_rule_label]
is supplied, it executes the pricing rule with a name of [pricing_rule_label]
. The value for [pricing_rule_label]
should match PricingRuleLabel
.
Upcharges
Tokens: U:
or Upcharge:
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.
Variable Price Codes
Tokens: M:
or VariablePriceCode:
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.
Products
Tokens: P:
or Product:
Format: P:[product_display_id]
or P:?
The value for the [product_display_id]
parameter should match the ProductDisplayID
in the Products
table. The format P:?
is the equivalent of asking if the current item being evaluated is a product. To check for special products, use A:P:?
.
Product Modifications
Tokens: P:D:
or Product:Modification:
Format: P:D:[modification_display_id]
or P:D:?
The value for the [modification_display_id]
parameter should match the ModificationDisplayID
in the Modifications
table. The value returned will be true if the product being evaluated has a modification attached to it where the modification's display id matches. The format P:D:?
is the equivalent of asking if the current product has any modifications attached to it.
Product Modification Categories
Tokens: P:D:C:
or Product:Modification:Category:
Format: P:D:C:[modification_category_display_id]
The value for the [modification_category_display_id]
parameter should match the ModificationCategoryDisplayID
in the ModificationCategories
table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.
Product Lines and Options
Tokens: E:
, H:
, L:
Finished End Option Groups
Tokens: E:
or FinishedEndOptionGroup:
Format: E:[finished_end_group_option_code]
The value for the [finished_end_group_option_code]
parameter should match the FinishedEndOptionGroupCode
in the FinishedEndOptionGroups
table.
Hinging Option Groups
Tokens: H:
or HingingOptionGroup:
Format: H:[hinging_option_group_code]
The value for the [hinging_option_group_code]
parameter should match the HingingOptionGroupCode
in the HingingOptionGroups
table.
Product Lines
Tokens: L:
or ProductLine:
Format: L:[product_line_name]
The value for the [product_line_name]
parameter should match the LineName
in the ProductLines
table.
Quotes
Tokens: QUOTE:
Format: QUOTE:[property_or_variable_code]
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the [property_or_variable_code]
parameter must match either the VariableCode
column in the OEVariables
table or a property on the Quote
object.
Specials
Tokens: A:
or Special:
Format: A:?
The format A:?
is the equivalent of asking if the current item being evaluated is a special. This includes special products and special modifications (and styles). When evaluating StyleOptionRules
, will return true if any of the currently selected style options is a special.
Special Product
Tokens: A:P:
or Special:Product:
Format: A:P:?
The format A:P:?
is the equivalent of asking if the current item being evaluated is a special product.
Special Modification
Tokens: A:P:
or Special:Modification:
Format: A:D:?
The format A:D:?
is the equivalent of asking if the current item being evaluated is a special modification.
Special Style Options for a Given Category
Tokens: S: and A:
or StyleOption: and Special:
Format: S:[style_option_category_display_id]:A:?
or S:[style_option_category_name]:A:?
To check if a special style option is selected for a given category, use the format S:[style_option_category_display_id]:A:?
or S:[style_option_category_name]:A:?
.
Style Options and Selections
Tokens: O:
, Q:
, N:
Style Options
Tokens: O:
or StyleOption:
Format: O:[style_option_display_id]
or O:[style_option_tag_name]
The value for the [style_option_display_id]
parameter should match the StyleOptionDisplayID
in the StyleOptions
table. The value of [style_option_tag_name]
should match the StyleOptionTag
in the StyleOptionTags
table.
Style Option Selections
Tokens: Q:
or StyleOptionSelection:
Format: Q:[style_option_display_id]
or Q:[style_option_tag_name]
The value for the [style_option_display_id]
parameter should match the StyleOptionDisplayID
in the StyleOptions
table. The value of [style_option_tag_name]
should match the StyleOptionTag
in the StyleOptionTags
table. Functionally equivalent to the O:
token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.
Style Option Selection Count
Tokens: N:
or StyleOptionSelectionCount:
Format: N:[style_option_category_display_id]
or N:[style_option_category_name]
The value for the [style_option_category_display_id]
parameter should match the StyleOptionCategoryDisplayID
in the StyleOptionCategories
table. The value of [style_option_category_name]
should match the Name
in the StyleOptionCategories
table.
Tags
Tokens: T:
or Tag:
Format: T:[tag_name]
Used to determine if the current item is tagged as the value specified in the [tag_name]
parameter. When the formula is being used as a price rule for a modification, the check is made on the product the modification is attached to (the equivalent of D:P:T:[tag_name]
).
Variables
Tokens: ACCOUNTVARIABLE:
, VAR:
, V:
, W:
, QUOTEVARIABLE:
Account Variables
Tokens: ACCOUNTVARIABLE:
Format: ACCOUNTVARIABLE:[variable_code]
Used to obtain the value of a account variable for the account the current item is associated with. The value for the [variable_code]
parameter must match the VariableCode
column in the OEVariables
table.
Context Variables
Tokens: VAR:
or ContextVariable:
Format: VAR:[variable_name]
or [variable_name]
or VAR:[variable_name]=[variable_value];[expression]
or
VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]
Used to get or set the value of a variable during formula evaluation. The value for the [variable_name]
can be any valid variable name (a-zA-Z0-9). The value for [variable_value]
can be any valid formula. If a variable has not first been set, when evaluating a quote product this functions the same as product variables; similarly, when evaluating a quote product modification, this functions the same as modification variables.
Product Variables
Tokens: V:
or Variable:
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:
or ModificationVariable:
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. When pricing a quote product modification, the value is first checked against any ModificationPrompts
with a matching OEVariable
.
Quote Variables
Tokens: QUOTEVARIABLE:
Format: QUOTEVARIABLE:[variable_code]
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the [variable_code]
parameter must match the VariableCode
column in the OEVariables
table.
Rules and Formulas
Formulas
Located in the Formulas
table. Used to validate the availability of modifications, finished ends, hinging, and so on. The F:
token uses the Formulas
table. In the case of validating modification availability, return true if the modification is available.
Final Validation Rules
Located in the FinalValidationRules
table. Used to validate a quote before its status is changed to submitted. The F:
token uses the Formulas
table. The rule should return false if the validation fails and a message needs to be presented to the user.
Pricing Rules
Located in the PricingRules
table. Used to calculate pricing. The F:
token uses the PricingRules
table.
Style Option Rules
Located in the StyleOptionRules
table. Used in evaluating the availability of style options.
Excludes
Tokens: <X>
Format: [atoms]~<X>~[excluded_atoms]
If any [atoms]
are selected, [excluded_atoms]
are excluded. The inverse is also true, if any [excluded_atoms]
are matched, [atoms]
are excluded. Valid atoms start with T:
, O:
, S:
or Q:
.
Excludes X of Y
Tokens: < >
Format: [atoms]~<[count]>~[additional_atoms]
If [count]
or more [atoms]
and or [additional_atoms]
are selected, [atoms]
and [additional_atoms]
are excluded. Valid atoms start with T:
.
Formula
Tokens: <F>
Format: [style_selection_atoms]~<F>~[formula]
If [formula]
evaluates to true, [style_selection_atoms]
are excluded. Valid style selection atoms start with T:
, O:
, S:
or Q:
. The [formula]
can use all tokens. The F:
token uses the Formulas
table.
Values (Min, Max, Effect Conditions)
Usable in OEPromptItems
and ModificationPrompts
: MinValue
, MaxValue
, MinFractionalValue
; ModificationVariableEffects
: Value
, EffectConditionFormulaID
, EffectType
. If the EffectType
is a modification (e.x.: D:123
), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected. The F:
token uses the Formulas
table.
Result Negation
To negate the result of an operation append a !
after the token and before the token value. This works for both boolean and decimal results. In the case of a decimal, this is the equivalent of multiplying by -1
.
Valid Operators
String
+
- Concatenate
=
- Case Insensitive Equality
==
- Case Sensitive Equality
!
- Case Insensitive Inequality
!=
- Case Sensitive Inequality
<
- Ordinal Less Than
>
- Ordinal Greater Than
<=
- Ordinal Less Than or Equal To
>=
- Ordinal Greater Than or Equal To
??
- Second Value if First is Null
Number (Decimal)
+
- Add
-
- Subtract
*
- Multiply
/
- Divide
^
- Exponential
%
- Modulo
*U
- Multiply and Apply Ceiling on the Product
/U
- Divide and apply Ceiling on the Quotient
<
- Less Than
>
- Greater Than
<=
- Less than or Equal To
>=
- Greater Than or Equal To
=
or ==
- Equality
!
or !=
- Inequality
|
or ||
- Either Value is Greater Than Zero
&
or &&
- Both Values are Greater Than Zero
??
- Second Value if First is Less Than or Equal To Zero
Boolean
|
, ||
, -
, /
, %
or ??
- Either Value is True
&
, &&
, +
, *
or ^
- Both Values are True
=
or ==
- Equality
!
or !=
- Inequality
#
- Logical Not (One True Value and One False Value)
Collection
+
- Add
-
- Remove
|
or ||
- Returns the first collection with the elements from the second collection that do not exist in the first added
&
or &&
- Returns the elements that existing in both collections
=
or ==
- Returns true if the values in the two collections match in value and sequence
!
or !=
- Returns true if the values in the two collections do not match match in value and or sequence
??
- Second Value if First is Null
Examples
Aggregate Atoms
COUNT:(O:12,O:34,O:56)
- Returns the number of style options that match
COUNT:2(O:78,O:99,O:100)
- Returns true if two or more of the style options match
MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)
- Returns F:PRICE_PER_SQ_FEET_WxD
if it is greater than V:MIN_CHARGE
, otherwise returns V:MIN_CHARGE
SUM:(R:LIST,F:FINISHED_END_UPCHARGE)
- Returns the sum of list price and F:FINISHED_END_UPCHARGE
. Same as R:LIST~F:FINISHED_END_UPCHARGE~+
SUM:(R:LIST,F:!DISCOUNT)
- Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)
Conditional Atoms
LIMIT:1(O:123,O:456,O:789)
- Returns true if more than one style option matches
ANY:(T:IsTall,T:IsTallCorner)
- Returns true if an item is tagged with IsTall or IsTallCorner. Same as SOME:(T:IsTall,T:IsTallCorner)
or T:IsTall~T:IsTallCorner~|
ALL:(T:IsBase,O:Framed,O:Cherry)
- Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry
Math and Infix Atoms
MATH:1+2*3/(4+5)
- Returns the numeric value 1.666...
=2+4*8/(10+22)
- Returns the numeric value 3
=-2+4-2*-2
- Returns the numeric value 6
INFIX:R:LIST+F:FINISHED_END_UPCHARGE
- Same as R:LIST~F:FINISHED_END_UPCHARGE~+
IF: V:ROS_H <= 9.6875 => R:BOOK => R:BOOK * 2
- Same as I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~<==>R:BOOK,R:BOOK~X:TWO~*
IF: V:ROS_H <= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H > 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2
-
- Logically the same as
if (V:ROS_H <= 9.6875) { return R:BOOK; } if (V:ROS_H > 20) { return R:BOOK * 3; } return R:BOOK * 2;
IF: (P:? && V:WS_UPCHARGE) || (D:? && W:WS_UPCHARGE) || A:? => F:UPCHARGE
-
- Same as
I:P:?~V:FINISH_UPCHARGE~&~D:?~W:FINISH_UPCHARGE~&~A:?~|~|=>F:UPCHARGE,X:ZERO
=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)
-
- Same as
U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*
Context Variable Atom
var: x = 10; y = 5; z = x * y; x + y + z
- Returns the numeric value 65
IF: ANY:(VAR:WS_UPCHARGE,A:?) => F:UPCHARGE
- Same as IF: (P:? && V:WS_UPCHARGE) || (D:? && W:WS_UPCHARGE) || A:? => F:UPCHARGE
var: u = U:FINISH; IF: u < .1 THEN: 173 ELSEIF: u < .2 THEN: 217 ELSEIF: u < .3 THEN: 269 ELSEIF: u < .4 THEN: 329 ELSEIF: u < .5 THEN: 398 ELSEIF: u < .6 THEN: 476 ELSE: 563
-
- Same as
IF: U:FINISH < .1 THEN: 173 ELSEIF: U:FINISH < .2 THEN: 217 ELSEIF: U:FINISH < .3 THEN: 269 ELSEIF: U:FINISH < .4 THEN: 329 ELSEIF: U:FINISH < .5 THEN: 398 ELSEIF: U:FINISH < .6 THEN: 476 ELSE: 563
Collection Atom
INFIX: [1,2,3,4] + 5
- Returns a collection with the elements 1, 2, 3, 4, and 5
INFIX: [1,2,3,4] - 4
- Returns a collection with the elements 1, 2, and 3
INFIX: [1,2] + [2,3]
- Returns a collection with the elements 1, 2, 2, and 3
INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)
- Returns true
INFIX: [1,2] || [1,4]
- Returns a collection with the elements from the first collection, and the elements from the second collection no included in the first: 1, 2, and 4
INFIX: [1,2] && [1,4]
- Returns a collection with the elements that exist in both collections: 1
Date Time and Time Span Atoms
Quote:DateModified > (DateTime:UtcNow - TimeSpan:30)
- Returns true if the quote was modified withing the last 30 days.
DateTime:"4/27/2016" + TimeSpan:1
- Returns the date 4/28/2016
Negation
I:P:7206=>F:!PRODBSD6FinalValidationRule,TRUE
- Same as I:P:7206=>F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE
T:!IsMolding
- Returns true if an item is not tagged with IsMolding
=! true
- Returns false
Style Option Formulas
T:KK~<F>~AccountVariable:NOT_FOR_KK
- Exclude KK if the account has a true value for the variable NOT_FOR_KK
T:Cabinet Order~<F>~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != "Cabinet Order"
-
- Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.
Tokenless Constants
I:V:EXTENDED_STILE_R~3~<==>92,114
- Same as I:V:EXTENDED_STILE_R~X:THREE~<==>X:NINETYTWO,X:ONEHUNDREDFOURTEEN
Back To Developer Page