<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.evisionservices.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.evisionservices.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gwilliams</id>
		<title>eVision - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.evisionservices.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gwilliams"/>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Special:Contributions/Gwilliams"/>
		<updated>2026-04-20T19:51:43Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.1</generator>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2021-02-02T21:28:00Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Length ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LENGTH:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LENGTH:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms lengths to add together.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
==== Product Token Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P: :&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product: :&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[token]:[value]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When evaluating against a &amp;lt;code&amp;gt;QuoteProductMod&amp;lt;/code&amp;gt;, gets the result from the product the modification is attached to by evaluating the &amp;lt;code&amp;gt;[token]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[value]&amp;lt;/code&amp;gt; specified.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2019-05-03T13:33:31Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Product Token Value */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
==== Product Token Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P: :&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product: :&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[token]:[value]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When evaluating against a &amp;lt;code&amp;gt;QuoteProductMod&amp;lt;/code&amp;gt;, gets the result from the product the modification is attached to by evaluating the &amp;lt;code&amp;gt;[token]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[value]&amp;lt;/code&amp;gt; specified.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2019-05-03T13:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Products */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
==== Product Token Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P: :&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product: :&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[token]:[value]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When evaluating against a &amp;lt;code&amp;gt;QuoteProductMod&amp;lt;/code&amp;gt;, gets the result from the product the modification is attached to by evaluating the &amp;lt;code&amp;gt;[token]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; specified.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-05-04T12:23:09Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Special Style Options for a Given Category */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-05-04T12:12:50Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Style Option Selection Count */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

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

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-05-04T11:06:48Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Special Style Options for a Given Category */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-05-03T22:06:33Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Special Modification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-05-03T22:00:51Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Special Style Options for a Given Category */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mod, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2018-03-19T15:29:11Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Number (Decimal) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt; - [[#Permissions|Permission]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the list of atoms.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Dates and Time Spans ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dates ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;DATETIME:[datetime]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:&amp;quot;[datetime]&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DATETIME:Now&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DATETIME:UtcNow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; is a string representation of a date, or one of two keywords: &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Now&amp;lt;/code&amp;gt; will return the users local time, where as &amp;lt;code&amp;gt;UtcNow&amp;lt;/code&amp;gt; will return the users local time with the UTC offset applied. When writing infix expressions, enclose the &amp;lt;code&amp;gt;[datetime]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish operators such as &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; from date delimiters. See [https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
==== Time Spans ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;TIMESPAN:[timespan]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TIMESPAN:&amp;quot;[timespan]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; is a string representation of a time span. When writing infix expressions and wishing to provide a negative time span, enclose the &amp;lt;code&amp;gt;[timespan]&amp;lt;/code&amp;gt; in double quotes, in order to distinguish the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; which indicates a negative. See [https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2 here] for valid formats.&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;PERMISSION:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;PERMISSION:[code]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PERMISSION:[context].[code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;OEConfigurationCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;OEConfigurations&amp;lt;/code&amp;gt; table. The optional &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; represents the context of the permission, the default being &amp;lt;code&amp;gt;UserType&amp;lt;/code&amp;gt; if one is not provided - which indicates that the permission should be returned for the currently logged in user. Other options for &amp;lt;code&amp;gt;[context]&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;ProjectStatus&amp;lt;/code&amp;gt;, which checks against the current user and the status of the project; &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;, checks against the permissions' default value. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Project:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;. In the context of pricing, this will always be false, since the quote item being run through the formula helper is a product or a mode, and not a style option.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProjectVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and Apply Ceiling to the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*R&amp;lt;/code&amp;gt; - Multiply and Round the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt; - Divide and Round the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*D&amp;lt;/code&amp;gt; - Multiply and Apply Floor to the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; - Divide and Apply Floor to the Quotient&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[&amp;quot;Option 1&amp;quot;,&amp;quot;Option 2&amp;quot;]&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option 1&amp;quot; and &amp;quot;Option 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COLLECTION:(&amp;quot;Option A&amp;quot;,&amp;quot;Option B&amp;quot;)&amp;lt;/code&amp;gt; - Returns a collection with the elements &amp;quot;Option A&amp;quot; and &amp;quot;Option B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Date Time and Time Span Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quote:DateModified &amp;gt; (DateTime:UtcNow - TimeSpan:30)&amp;lt;/code&amp;gt; - Returns true if the quote was modified withing the last 30 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DateTime:&amp;quot;4/27/2016&amp;quot; + TimeSpan:1&amp;lt;/code&amp;gt; - Returns the date 4/28/2016&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:!1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns false if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back To [[Developer Page]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-05-04T15:29:20Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Valid Tokens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;DATETIME:&amp;lt;/code&amp;gt; - [[#Dates|Date]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;TIMESPAN:&amp;lt;/code&amp;gt; - [[#Time_Spans|Time Span]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:30:41Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Collection Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: ([1,2,3,4] + 5) == ([1,2,3,4,5,6] - 6)&amp;lt;/code&amp;gt; - Returns true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:29:58Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Collection Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] == [1,2]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:24:39Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Valid Operators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
=== Collection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Returns the first collection with the elements from the second collection that do not exist in the first added&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Returns the elements that existing in both collections&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Returns true if the values in the two collections match in value and sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Returns true if the values in the two collections do not match match in value and or sequence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:16:14Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Collection Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections: 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:16:01Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Collection Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - 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&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections; 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T18:15:12Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Collection Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] + 5&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 3, 4, and 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2,3,4] - 4&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] + [2,3]&amp;lt;/code&amp;gt; - Returns a collection with the elements 1, 2, 2, and 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] || [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements from the first collection, and the unique elements from the second: 1, 2, and 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX: [1,2] &amp;amp;&amp;amp; [1,4]&amp;lt;/code&amp;gt; - Returns a collection with the elements that exist in both collections; 1&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T15:41:38Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Valid Tokens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T15:41:02Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Collections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COLLECTION:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[atoms]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to return a collection of atom values. The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to evaluate.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T12:33:37Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Valid Tokens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-04-18T12:32:36Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Valid Tokens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COLLECTION:&amp;lt;/code&amp;gt; - [[#Collections|Collection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_-_Advanced_Troubleshooting</id>
		<title>Order Express - Advanced Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_-_Advanced_Troubleshooting"/>
				<updated>2016-03-02T15:22:25Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Duplicate DbProviderFactories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Force the table-of-contents to appear even if there are fewer than 4 categories on this page. --&amp;gt;&lt;br /&gt;
__FORCETOC__ &lt;br /&gt;
&lt;br /&gt;
== Standalone Version ==&lt;br /&gt;
[[File:OrderExpressStandaloneDownload.png|thumbnail|Standalone Version Download]]&lt;br /&gt;
[[File:OrderExpressStandaloneExexecutable.png|thumbnail|Locating the Executable]]&lt;br /&gt;
In order to debug certain issues, eVision Support may provide you with a link to download a ''Standalone Version'' of Order Express.  This version of Order Express does not require installation and is primarily used to identify whether an issue is caused by a broken installation, or with Order Express directly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the link that was provided to you by eVision Support&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the ''Download'' button on the page and save the file to your desktop&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Extract the downloaded file to a folder. (Note: Ensure the file is not marked as &amp;quot;Blocked&amp;quot; before you perform the extraction.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the folder and locate the executable file for the application&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the program loads up successfully, the issue is the result of the installation routine.  Perform the ''Extended (Full) Uninstall'' on the [[Uninstalling_Order_Express|Uninstalling Order Express]] page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the program does '''not''' load successfully, the cause of the issue is within the application.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that you communicate the results of this test back to eVision Support for additional troubleshooting steps.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Standalone Version Will Not Connect ==&lt;br /&gt;
[[File:OrderExpress_Standalone_Unblock1.png|thumbnail|Opening the &amp;quot;Properties&amp;quot; window]]&lt;br /&gt;
[[File:OrderExpress_Standalone_Unblock2.png|thumbnail|Unblocking the file]]&lt;br /&gt;
There exists a security feature within Windows that can sometimes prevent Standalone Versions of Order Express from working correctly.  Files that are downloaded from an non-trusted web location are marked as &amp;quot;Blocked&amp;quot; by default, preventing them from retrieving content from the internet.  The solution for this issue is to &amp;quot;unblock&amp;quot; the downloaded file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on the file that was downloaded from the internet.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select &amp;lt;code&amp;gt;Properties&amp;lt;/code&amp;gt; from the context menu.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find the &amp;lt;code&amp;gt;Unblock&amp;lt;/code&amp;gt; button at the bottom of the dialog, and click it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The file can now be opened.  If the file is a zip file, it can now be extracted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the blocked file is a zip file, it ''must'' be unblocked prior to extracting it, or you will likely encounter issues with the unzipped files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Duplicate DbProviderFactories == &lt;br /&gt;
&lt;br /&gt;
Due to an issue in certain software, you may receive the following error:&lt;br /&gt;
&amp;lt;code&amp;gt;The 'DbProviderFactories' section can only appear once per config file.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This occurs because the [[Machine.config]] file on the computer contains erroneous information and must be fixed by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Locate the &amp;lt;code&amp;gt;machine.config&amp;lt;/code&amp;gt; file.  Refer to the [[Machine.config]] article for instructions on locating it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once found, make a backup of the file and put it in a safe location.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the original file in a text editor and search for &amp;lt;code&amp;gt;&amp;lt;DbProviderFactories&amp;gt;&amp;lt;/code&amp;gt;.  This text should appear more than once.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compare your file to the block of text below. If the file contains text that matches this, delete the text.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system.data&amp;gt;&lt;br /&gt;
  &amp;lt;DbProviderFactories&amp;gt;&lt;br /&gt;
    &amp;lt;add name=&amp;quot;IBM DB2 for i5/OS .NET Provider&amp;quot; invariant=&amp;quot;IBM.Data.DB2.iSeries&amp;quot; description=&amp;quot;.NET Framework Data Provider for i5/OS&amp;quot; type=&amp;quot;IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/DbProviderFactories&amp;gt;&lt;br /&gt;
&amp;lt;/system.data&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that the file is saved before exiting the text editor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The issue should now be resolved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Log Errors == &lt;br /&gt;
[[File:Order-Express-Has-Stopped-Working.png|thumbnail|Error Dialog]]&lt;br /&gt;
Order Express may occasionally crash without allowing the user to describe and submit the error to the support team.  &lt;br /&gt;
&lt;br /&gt;
When this occurs, the user will need to retrieve the log files and submit them manually.&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Press the &amp;quot;Windows&amp;quot; key, or click the &amp;quot;Start&amp;quot; button in the bottom-left corner of the screen.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Windows-key.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Once on the Start screen, type the text &amp;lt;code&amp;gt;Event Logs&amp;lt;/code&amp;gt;.  A search box should display as you begin typing.&amp;lt;br /&amp;gt;&lt;br /&gt;
Wait for the search results to appear.&amp;lt;br /&amp;gt;&lt;br /&gt;
Click the top entry, which should read &amp;lt;code&amp;gt;View event logs&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Search-event-logs-windows8.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
In the window that appears, click the arrow to the left of &amp;lt;code&amp;gt;Windows Logs&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-default.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Select the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; entry.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-windows.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
In the list shown in the middle of the window, locate the most recent entry that meets the following criteria:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;It uses the &amp;lt;code&amp;gt;Error&amp;lt;/code&amp;gt; Icon: [[File:Event-logs-error-icon.png]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;Source&amp;lt;/code&amp;gt; column should contain &amp;lt;code&amp;gt;.NET Runtime&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Right-click on that entry, select &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;, and then select &amp;lt;code&amp;gt;Copy Details as Text&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-dot-net-runtime-copy.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
At this point, the contents of the error log are on your clipboard, and can be pasted into any text editor.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Open a text editor (such as Notepad), and use the &amp;lt;code&amp;gt;Paste&amp;lt;/code&amp;gt; command to insert the error details.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Save the text document, and attach it to an email to our support team.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Order Express]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_-_Advanced_Troubleshooting</id>
		<title>Order Express - Advanced Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_-_Advanced_Troubleshooting"/>
				<updated>2016-03-02T15:22:02Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Duplicate DbProviderFactories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Force the table-of-contents to appear even if there are fewer than 4 categories on this page. --&amp;gt;&lt;br /&gt;
__FORCETOC__ &lt;br /&gt;
&lt;br /&gt;
== Standalone Version ==&lt;br /&gt;
[[File:OrderExpressStandaloneDownload.png|thumbnail|Standalone Version Download]]&lt;br /&gt;
[[File:OrderExpressStandaloneExexecutable.png|thumbnail|Locating the Executable]]&lt;br /&gt;
In order to debug certain issues, eVision Support may provide you with a link to download a ''Standalone Version'' of Order Express.  This version of Order Express does not require installation and is primarily used to identify whether an issue is caused by a broken installation, or with Order Express directly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the link that was provided to you by eVision Support&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the ''Download'' button on the page and save the file to your desktop&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Extract the downloaded file to a folder. (Note: Ensure the file is not marked as &amp;quot;Blocked&amp;quot; before you perform the extraction.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the folder and locate the executable file for the application&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the program loads up successfully, the issue is the result of the installation routine.  Perform the ''Extended (Full) Uninstall'' on the [[Uninstalling_Order_Express|Uninstalling Order Express]] page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the program does '''not''' load successfully, the cause of the issue is within the application.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that you communicate the results of this test back to eVision Support for additional troubleshooting steps.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Standalone Version Will Not Connect ==&lt;br /&gt;
[[File:OrderExpress_Standalone_Unblock1.png|thumbnail|Opening the &amp;quot;Properties&amp;quot; window]]&lt;br /&gt;
[[File:OrderExpress_Standalone_Unblock2.png|thumbnail|Unblocking the file]]&lt;br /&gt;
There exists a security feature within Windows that can sometimes prevent Standalone Versions of Order Express from working correctly.  Files that are downloaded from an non-trusted web location are marked as &amp;quot;Blocked&amp;quot; by default, preventing them from retrieving content from the internet.  The solution for this issue is to &amp;quot;unblock&amp;quot; the downloaded file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on the file that was downloaded from the internet.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select &amp;lt;code&amp;gt;Properties&amp;lt;/code&amp;gt; from the context menu.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find the &amp;lt;code&amp;gt;Unblock&amp;lt;/code&amp;gt; button at the bottom of the dialog, and click it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The file can now be opened.  If the file is a zip file, it can now be extracted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the blocked file is a zip file, it ''must'' be unblocked prior to extracting it, or you will likely encounter issues with the unzipped files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Duplicate DbProviderFactories == &lt;br /&gt;
&lt;br /&gt;
Due to an issue in certain software, you may receive the following error:&lt;br /&gt;
&amp;lt;code&amp;gt;The 'DbProviderFactories' section can only appear once per config file.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This occurs because the [[Machine.config]] file on the computer contains erroneous information and must be fixed by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Locate the &amp;lt;code&amp;gt;machine.config&amp;lt;/code&amp;gt; file.  Refer to the [[Machine.config]] article for instructions on locating it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once found, make a backup of the file and put it in a safe location.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the original file in a text editor and search for &amp;lt;code&amp;gt;&amp;lt;DbProviderFactories&amp;gt;&amp;lt;/code&amp;gt;.  This text should appear more than once.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compare my file to the block of text below. If the file contains text that matches this, delete the text.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system.data&amp;gt;&lt;br /&gt;
  &amp;lt;DbProviderFactories&amp;gt;&lt;br /&gt;
    &amp;lt;add name=&amp;quot;IBM DB2 for i5/OS .NET Provider&amp;quot; invariant=&amp;quot;IBM.Data.DB2.iSeries&amp;quot; description=&amp;quot;.NET Framework Data Provider for i5/OS&amp;quot; type=&amp;quot;IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/DbProviderFactories&amp;gt;&lt;br /&gt;
&amp;lt;/system.data&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that the file is saved before exiting the text editor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The issue should now be resolved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Log Errors == &lt;br /&gt;
[[File:Order-Express-Has-Stopped-Working.png|thumbnail|Error Dialog]]&lt;br /&gt;
Order Express may occasionally crash without allowing the user to describe and submit the error to the support team.  &lt;br /&gt;
&lt;br /&gt;
When this occurs, the user will need to retrieve the log files and submit them manually.&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Press the &amp;quot;Windows&amp;quot; key, or click the &amp;quot;Start&amp;quot; button in the bottom-left corner of the screen.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Windows-key.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Once on the Start screen, type the text &amp;lt;code&amp;gt;Event Logs&amp;lt;/code&amp;gt;.  A search box should display as you begin typing.&amp;lt;br /&amp;gt;&lt;br /&gt;
Wait for the search results to appear.&amp;lt;br /&amp;gt;&lt;br /&gt;
Click the top entry, which should read &amp;lt;code&amp;gt;View event logs&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Search-event-logs-windows8.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
In the window that appears, click the arrow to the left of &amp;lt;code&amp;gt;Windows Logs&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-default.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Select the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; entry.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-windows.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
In the list shown in the middle of the window, locate the most recent entry that meets the following criteria:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;It uses the &amp;lt;code&amp;gt;Error&amp;lt;/code&amp;gt; Icon: [[File:Event-logs-error-icon.png]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;Source&amp;lt;/code&amp;gt; column should contain &amp;lt;code&amp;gt;.NET Runtime&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Right-click on that entry, select &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;, and then select &amp;lt;code&amp;gt;Copy Details as Text&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Event-logs-dot-net-runtime-copy.png|border|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
At this point, the contents of the error log are on your clipboard, and can be pasted into any text editor.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Open a text editor (such as Notepad), and use the &amp;lt;code&amp;gt;Paste&amp;lt;/code&amp;gt; command to insert the error details.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Save the text document, and attach it to an email to our support team.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Order Express]]&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-03-01T16:20:48Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Specials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, will return true if any of the currently selected style options is a special.&lt;br /&gt;
&lt;br /&gt;
==== Special Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special product.&lt;br /&gt;
&lt;br /&gt;
==== Special Modification ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Special Style Options for a Given Category ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S: and A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption: and Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-03-01T16:11:08Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Specials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;A:[token]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. This includes special products and special modifications (and styles). To detect a specific type of special, use the format &amp;lt;code&amp;gt;A:[token]&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[token]&amp;lt;/code&amp;gt; is one of the following: &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; for special products; &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; for special modifications. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-03-01T16:08:03Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Specials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;A:[atom]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-03-01T16:06:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Products */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product. To check for special products, use &amp;lt;code&amp;gt;A:P:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2016-03-01T16:06:26Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Modifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification. To check for special modifications, use &amp;lt;code&amp;gt;A:D:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-11-04T21:30:08Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: Added note on ModificationPrompts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table. When pricing a quote product modification, the value is first checked against any &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt; with a matching &amp;lt;code&amp;gt;OEVariable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-09-11T18:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Excludes X of Y */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-08-03T19:33:29Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Prices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt; is the calculation of the first summary group in the sequence (&amp;lt;code&amp;gt;ProductLineSummaryGroups&amp;lt;/code&amp;gt;), where as &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; is the price with no formula applied. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-07-30T14:19:51Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Infix Conditional Expressions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed (or if &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when pricing, otherwise &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, otherwise &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-07-30T14:16:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Infix Conditional Expressions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	<entry>
		<id>http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas</id>
		<title>Order Express Formulas</title>
		<link rel="alternate" type="text/html" href="http://wiki.evisionservices.com/index.php?title=Order_Express_Formulas"/>
				<updated>2015-07-30T14:13:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gwilliams: /* Number (Integer, Decimal, Float) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table.  Formulas are primarily written in [[wikipedia:Reverse Polish Notation|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).&lt;br /&gt;
&lt;br /&gt;
== Valid Tokens ==&lt;br /&gt;
&lt;br /&gt;
These keywords are considered to be &amp;quot;valid&amp;quot; keywords/tokens within the ''Rules Engine''. Each of the keywords are shown as links which will take you to their usage instructions.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; - [[#Specials|Special]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt; - [[#Accounts|Account]]&lt;br /&gt;
* &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt; - [[#Account_Variables|Account Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; - [[#Product_and_Modification_Categories|Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt; - [[#Count|Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; - [[#Modifications|Modification]]&lt;br /&gt;
* &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; - [[#Finished_End_Option_Groups|Finished End Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; - [[#Every_Condition|Every]]&lt;br /&gt;
* &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; - [[#Nested_Formulas|Formula]]&lt;br /&gt;
* &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; - [[#Hinging_Option_Groups|Hinging Option Group]]&lt;br /&gt;
* &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; - [[#Conditional_Expressions|Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; - [[#Infix_Conditional_Expressions|Infix Conditional]]&lt;br /&gt;
* &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; - [[#Infix_Expressions|Infix]]&lt;br /&gt;
* &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; - [[#Product_Lines|Product Line]]&lt;br /&gt;
* &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt; - [[#Limits|Limit]]&lt;br /&gt;
* &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; - [[#Variable_Price_Codes|Variable Price Code]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt; - [[#Maximum_Value|Max]]&lt;br /&gt;
* &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt; - [[#Minimum_Value|Min]]&lt;br /&gt;
* &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; - [[#Style_Option_Selection_Count|Style Option Selection Count]]&lt;br /&gt;
* &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; - [[#Style_Options|Style Option]]&lt;br /&gt;
* &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; - [[#Products|Product]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; - [[#Style_Option_Selections|Style Option Selection]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt; - [[#Quotes|Quote]]&lt;br /&gt;
* &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt; - [[#Quote_Variables|Quote Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; - [[#Prices|Price]]&lt;br /&gt;
* &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; - [[#Style_Option_Categories|Style Option Category]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; - [[#Some_Conditions|Some]]&lt;br /&gt;
* &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt; - [[#Summation|Sum]]&lt;br /&gt;
* &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; - [[#Tags|Tag]]&lt;br /&gt;
* &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; - [[#Upcharges|Upcharge]]&lt;br /&gt;
* &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; - [[#Product_Variables|Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; - [[#Context_Variables|Context Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; - [[#Modification_Variables|Modification Variable]]&lt;br /&gt;
* &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; - [[#Constants|Constant]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Z:&amp;lt;/code&amp;gt; - Evaluation&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Accounts ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNT:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNT:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable or property for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Aggregation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAX:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN:()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM:()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;COUNT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;COUNT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT:[count_greater_or_equal_to]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns the number &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; that return true. The value of &amp;lt;code&amp;gt;[count_greater_or_equal_to]&amp;lt;/code&amp;gt; changes the return type of this atom into a boolean, where the result is true if the number of &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is greater or equal to the value supplied.&lt;br /&gt;
&lt;br /&gt;
==== Maximum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MAX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MAX:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the largest value.&lt;br /&gt;
&lt;br /&gt;
==== Minimum Value ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;MIN:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;MIN:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms of which to find the smallest value.&lt;br /&gt;
&lt;br /&gt;
==== Summation ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SUM:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SUM:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to add together.&lt;br /&gt;
&lt;br /&gt;
=== Categories ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Product and Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;C:[product_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductCategories&amp;lt;/code&amp;gt; table. The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionCategory:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;S:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The boolean value indicating whether there is a selected style option category excludes special style options.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Every Condition ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;EVERY:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ALL:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;EVERY:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if all of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;I:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Conditional:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;I:[conditional]=&amp;gt;[expression_if_true],[expression_if_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Conditional expressions are defined using the above tokens.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed. Atoms that use the &amp;lt;code&amp;gt;TOKEN:(,)&amp;lt;/code&amp;gt; format are not supported in the true or false expressions; they are however, supported in [[#Infix_Conditional_Expressions|infix conditionals]].&lt;br /&gt;
&lt;br /&gt;
==== Limits ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;LIMIT:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;LIMIT:([atoms])&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LIMIT:[maximum]([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. The value of &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; indicates the threshold at which the result will be true (greater than &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt;). If no &amp;lt;code&amp;gt;[maximum]&amp;lt;/code&amp;gt; is supplied, it is assumed &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Some Conditions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;SOME:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ANY:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;SOME:([atoms])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; is a comma separated list of atoms to test against. Returns true if any of the atoms test true.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[constant_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of constant.  The value for the &amp;lt;code&amp;gt;[constant_name]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;Constants&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Boolean ====&lt;br /&gt;
&lt;br /&gt;
Tokens: None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[boolean]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a boolean. Valid values are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (case-insensitive).&lt;br /&gt;
&lt;br /&gt;
==== Decimal ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:[decimal]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[decimal]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value must be a string representation of a number.&lt;br /&gt;
&lt;br /&gt;
==== String ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;X:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Constant:&amp;lt;/code&amp;gt; or None&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;X:&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;[string]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value can be any string (enclosed in double quotes).&lt;br /&gt;
&lt;br /&gt;
=== Infix Notation ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infix Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;INFIX:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MATH:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;INFIX:[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[expression]&amp;lt;/code&amp;gt; is an expression/formula written in [[wikipedia:Infix notation|infix notation]]. Uses a subset of the [[#Valid_Operators|available operators]]: &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;. When using the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; token to denote an infix expression, it must be the first character in the formula.&lt;br /&gt;
&lt;br /&gt;
==== Infix Conditional Expressions ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;IF:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InfixConditional:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;THEN:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ELSE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;IF:[conditional]=&amp;gt;[expression_if_true]=&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF:[conditional]THEN:[expression_if_true]ELSEIF:[second_conditional]THEN:[expression_if_second_is_true]ELSE:[expression_if_all_are_false]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Infix conditional expressions are defined using the above tokens, and as the name suggests, uses [[wikipedia:Infix notation|infix notation]] throughout.  When these tokens are found within the expression, the expression is split into multiple ''parts''.  The &amp;lt;code&amp;gt;[conditional]&amp;lt;/code&amp;gt; parameter is ''always'' executed to determine if it evaluates to a &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; value.  If this evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;[expression_if_true]&amp;lt;/code&amp;gt; parameter is executed.  If it evaluates to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; is omitted, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is returned when pricing, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise; the &amp;lt;code&amp;gt;[expression_if_false]&amp;lt;/code&amp;gt; parameter is executed if supplied. The conditionals can be chained by using an &amp;lt;code&amp;gt;ELSEIF:&amp;lt;/code&amp;gt; in the false expression.&lt;br /&gt;
&lt;br /&gt;
=== Modifications ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a modification.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;D:P:D:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Modification:Product:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Modification&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The value returned will be true if the modification being evaluated is attached to a product with a matching display id. The format &amp;lt;code&amp;gt;D:P:D:[modification_display_id]&amp;lt;/code&amp;gt; is the equivalent of asking if the modification that is being evaluated is attached to a product that with a matching modification display id.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Tags ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
==== Modification Product Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;D:P:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Modification:Product:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;D:P:C:[product_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the modification is attached to a product that is included in the category as specified by the value of the &amp;lt;code&amp;gt;[product_category_display_id]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Nested Formulas ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Formula:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;F:[parameter]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executes the pricing rule with a name of &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt;.  This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;[parameter]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pricing and Upcharges ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prices ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;R:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Price:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;R:[price_type]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;R:[pricing_rule_label]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item. Only four values are valid for the &amp;lt;code&amp;gt;[price_type]&amp;lt;/code&amp;gt; parameter. These values are &amp;lt;code&amp;gt;BOOK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PREMIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BASE&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; is supplied, it executes the pricing rule with a name of &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt;. The value for &amp;lt;code&amp;gt;[pricing_rule_label]&amp;lt;/code&amp;gt; should match &amp;lt;code&amp;gt;PricingRuleLabel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Upcharges ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;U:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Upcharge:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;U:[style_option_category_short_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price of an upcharge for the style option category that matches the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; parameter for the current item.  The value for the &amp;lt;code&amp;gt;[style_option_category_short_name]&amp;lt;/code&amp;gt; must match the &amp;lt;code&amp;gt;ShortName&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Variable Price Codes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;M:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VariablePriceCode:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;M:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the price for the current item.  The value specified for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter is used, alongside the current price group, to obtain the price for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt; column in the  &amp;lt;code&amp;gt;OEVariablePriceCodes&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:[product_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ProductDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Products&amp;lt;/code&amp;gt; table. The format &amp;lt;code&amp;gt;P:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a product.&lt;br /&gt;
&lt;br /&gt;
==== Product Modifications ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:[modification_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Modifications&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;P:D:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current product has any modifications attached to it.&lt;br /&gt;
&lt;br /&gt;
==== Product Modification Categories ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;P:D:C:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Product:Modification:Category:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;P:D:C:[modification_category_display_id]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[modification_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;ModificationCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ModificationCategories&amp;lt;/code&amp;gt; table. Returns true of the product being evaluated has any modifications attached to it which match the specified modification category.&lt;br /&gt;
&lt;br /&gt;
=== Product Lines and Options ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Finished End Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;E:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FinishedEndOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;E:[finished_end_group_option_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[finished_end_group_option_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;FinishedEndOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;FinishedEndOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Hinging Option Groups ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;H:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HingingOptionGroup:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;H:[hinging_option_group_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[hinging_option_group_code]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;HingingOptionGroupCode&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;HingingOptionGroups&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Product Lines ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;L:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ProductLine:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;L:[product_line_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[product_line_name]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;LineName&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ProductLines&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Quotes ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTE:[property_or_variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable or property for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[property_or_variable_code]&amp;lt;/code&amp;gt; parameter must match either the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table or a property on the &amp;lt;code&amp;gt;Quote&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;A:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format &amp;lt;code&amp;gt;A:?&amp;lt;/code&amp;gt; is the equivalent of asking if the current item being evaluated is a special. When evaluating &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt;, it will return true if any of the currently selected style options is a special. To check if a special style option is selected for a given category, use the format &amp;lt;code&amp;gt;S:[style_option_category_display_id]:A:?&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S:[style_option_category_name]:A:?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Style Options and Selections ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Style Options ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOption:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;O:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;O:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selections ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelection:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;Q:[style_option_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:[style_option_tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptions&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_tag_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;StyleOptionTag&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionTags&amp;lt;/code&amp;gt; table. Functionally equivalent to the &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt; token, with the exception of when evaluating Style Option Rules, will check all products on the quote for the selected style.&lt;br /&gt;
&lt;br /&gt;
==== Style Option Selection Count ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;N:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StyleOptionSelectionCount:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;N:[style_option_category_display_id]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;N:[style_option_category_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value for the &amp;lt;code&amp;gt;[style_option_category_display_id]&amp;lt;/code&amp;gt; parameter should match the &amp;lt;code&amp;gt;StyleOptionCategoryDisplayID&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table. The value of &amp;lt;code&amp;gt;[style_option_category_name]&amp;lt;/code&amp;gt; should match the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;StyleOptionCategories&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tag:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;T:[tag_name]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to determine if the current item is tagged as the value specified in the &amp;lt;code&amp;gt;[tag_name]&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;D:P:T:[tag_name]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Account Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;ACCOUNTVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a account variable for the account the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Context Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;VAR:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ContextVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;VAR:[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[expression]&amp;lt;/code&amp;gt; or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VAR:[variable_name]=[variable_value];[second_variable_name]=[second_variable_value];[expression]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to get or set the value of a variable during formula evaluation. The value for the &amp;lt;code&amp;gt;[variable_name]&amp;lt;/code&amp;gt; can be any valid variable name (a-zA-Z0-9). The value for &amp;lt;code&amp;gt;[variable_value]&amp;lt;/code&amp;gt; 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|product variables]]; similarly, when evaluating a quote product modification, this functions the same as [[#Modification_Variables|modification variables]].&lt;br /&gt;
&lt;br /&gt;
==== Product Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;V:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Variable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;V:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a product variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Modification Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;W:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ModificationVariable:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;W:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a modification variable for the current item.  The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
==== Quote Variables ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;QUOTEVARIABLE:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;QUOTEVARIABLE:[variable_code]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Used to obtain the value of a quote variable for the quote the current item is associated with. The value for the &amp;lt;code&amp;gt;[variable_code]&amp;lt;/code&amp;gt; parameter must match the &amp;lt;code&amp;gt;VariableCode&amp;lt;/code&amp;gt; column in the &amp;lt;code&amp;gt;OEVariables&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Rules and Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Formulas ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. Used to validate the availability of modifications, finished ends, hinging, and so on. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. In the case of validating modification availability, return true if the modification is available.&lt;br /&gt;
&lt;br /&gt;
=== Final Validation Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;FinalValidationRules&amp;lt;/code&amp;gt; table. Used to validate a quote before its status is changed to ''submitted''. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table. The rule should return false if the validation fails and a message needs to be presented to the user. &lt;br /&gt;
&lt;br /&gt;
=== Pricing Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table. Used to calculate pricing. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;PricingRules&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Style Option Rules ===&lt;br /&gt;
&lt;br /&gt;
Located in the &amp;lt;code&amp;gt;StyleOptionRules&amp;lt;/code&amp;gt; table. Used in evaluating the availability of style options.&lt;br /&gt;
&lt;br /&gt;
==== Excludes ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;X&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;X&amp;gt;~[excluded_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are excluded. The inverse is also true, if any &amp;lt;code&amp;gt;[excluded_atoms]&amp;lt;/code&amp;gt; are matched, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Excludes X of Y ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[atoms]~&amp;lt;[count]&amp;gt;~[additional_atoms]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[count]&amp;lt;/code&amp;gt; or more &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and or &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are selected, &amp;lt;code&amp;gt;[atoms]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[additional_atoms]&amp;lt;/code&amp;gt; are excluded. Valid atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
&lt;br /&gt;
Tokens: &amp;lt;code&amp;gt;&amp;lt;F&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format: &amp;lt;code&amp;gt;[style_selection_atoms]~&amp;lt;F&amp;gt;~[formula]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; evaluates to true, &amp;lt;code&amp;gt;[style_selection_atoms]&amp;lt;/code&amp;gt; are excluded. Valid style selection atoms start with &amp;lt;code&amp;gt;T:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;O:&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;S:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Q:&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;[formula]&amp;lt;/code&amp;gt; can use all tokens. The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=== Values (Min, Max, Effect Conditions) ===&lt;br /&gt;
&lt;br /&gt;
Usable in &amp;lt;code&amp;gt;OEPromptItems&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModificationPrompts&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MinValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaxValue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinFractionalValue&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ModificationVariableEffects&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectConditionFormulaID&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt;. If the &amp;lt;code&amp;gt;EffectType&amp;lt;/code&amp;gt; is a modification (e.x.: &amp;lt;code&amp;gt;D:123&amp;lt;/code&amp;gt;), and the user is on advanced product entry with auto-mods enabled, the specified modification will automatically be selected.  The &amp;lt;code&amp;gt;F:&amp;lt;/code&amp;gt; token uses the &amp;lt;code&amp;gt;Formulas&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Result Negation ==&lt;br /&gt;
&lt;br /&gt;
To negate the result of an ''operation'' append a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Valid Operators ==&lt;br /&gt;
&lt;br /&gt;
=== String ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Concatenate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; - Case Insensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Case Sensitive Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; - Case Insensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Case Sensitive Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Ordinal Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Ordinal Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Ordinal Less Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Ordinal Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Null&lt;br /&gt;
&lt;br /&gt;
=== Number (Decimal) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; - Add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; - Subtract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - Multiply&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; - Divide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Exponential&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; - Modulo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;*U&amp;lt;/code&amp;gt; - Multiply and Apply Ceiling on the Product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt; - Divide and apply Ceiling on the Quotient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; - Less Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; - Greater Than&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt; - Less than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt; - Greater Than or Equal To&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - Either Value is Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - Both Values are Greater Than Zero&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Second Value if First is Less Than or Equal To Zero&lt;br /&gt;
&lt;br /&gt;
=== Boolean ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt; - Either Value is True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; - Both Values are True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; - Equality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; - Inequality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; - Logical Not (One True Value and One False Value)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Aggregate Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:(O:12,O:34,O:56)&amp;lt;/code&amp;gt; - Returns the number of style options that match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;COUNT:2(O:78,O:99,O:100)&amp;lt;/code&amp;gt; - Returns true if two or more of the style options match&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MAX:(V:MIN_CHARGE,F:PRICE_PER_SQ_FEET_WxD)&amp;lt;/code&amp;gt; - Returns &amp;lt;code&amp;gt;F:PRICE_PER_SQ_FEET_WxD&amp;lt;/code&amp;gt; if it is greater than &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;V:MIN_CHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:FINISHED_END_UPCHARGE)&amp;lt;/code&amp;gt; - Returns the sum of list price and &amp;lt;code&amp;gt;F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt;. Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SUM:(R:LIST,F:!DISCOUNT)&amp;lt;/code&amp;gt; -  Returns the list price minus the discount (adds the negated result of the DISCOUNT formula)&lt;br /&gt;
&lt;br /&gt;
=== Conditional Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LIMIT:1(O:123,O:456,O:789)&amp;lt;/code&amp;gt; - Returns true if more than one style option matches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ANY:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; - Returns true if an item is tagged with IsTall or IsTallCorner. Same as &amp;lt;code&amp;gt;SOME:(T:IsTall,T:IsTallCorner)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;T:IsTall~T:IsTallCorner~|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ALL:(T:IsBase,O:Framed,O:Cherry)&amp;lt;/code&amp;gt; - Returns true if the product is tagged IsBase and it has style option selections that are tagged Framed and Cherry&lt;br /&gt;
&lt;br /&gt;
=== Math and Infix Atoms ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MATH:1+2*3/(4+5)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;1.666...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=2+4*8/(10+22)&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=-2+4-2*-2&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;INFIX:R:LIST+F:FINISHED_END_UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;R:LIST~F:FINISHED_END_UPCHARGE~+&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 =&amp;gt; R:BOOK =&amp;gt; R:BOOK * 2&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:ROS_H~X:NINE_DOT_SIXEIGHTSEVENFIVE~&amp;lt;==&amp;gt;R:BOOK,R:BOOK~X:TWO~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: V:ROS_H &amp;lt;= 9.6875 THEN: R:BOOK ELSEIF: V:ROS_H &amp;gt; 20 THEN: R:BOOK * 3 ELSE: R:BOOK * 2&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Logically the same as &amp;lt;code&amp;gt;if (V:ROS_H &amp;lt;= 9.6875) { return R:BOOK; } if (V:ROS_H &amp;gt; 20) { return R:BOOK * 3; } return R:BOOK * 2;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;I:P:?~V:FINISH_UPCHARGE~&amp;amp;~D:?~W:FINISH_UPCHARGE~&amp;amp;~A:?~|~|=&amp;gt;F:UPCHARGE,X:ZERO&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=F:LIST_PREMIUM * SUM:(U:CarriageHouseVintage,U:WornEdgeTreatmentVintage,U:FlyspeckSplitsVintage,U:DistressingWormholesVintage,U:KnifeOutsVintage,U:JointCutsVintage)&amp;lt;/code&amp;gt; -&lt;br /&gt;
:Same as &amp;lt;code&amp;gt;U:CarriageHouseVintage~U:WornEdgeTreatmentVintage~+~U:FlyspeckSplitsVintage~+~U:DistressingWormholesVintage~+~U:KnifeOutsVintage~+~U:JointCutsVintage~+~F:LIST_PREMIUM~*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Context Variable Atom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: x = 10; y = 5; z = x * y; x + y + z&amp;lt;/code&amp;gt; - Returns the numeric value &amp;lt;code&amp;gt;65&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF: ANY:(VAR:WS_UPCHARGE,A:?) =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;IF: (P:? &amp;amp;&amp;amp; V:WS_UPCHARGE) || (D:? &amp;amp;&amp;amp; W:WS_UPCHARGE) || A:? =&amp;gt; F:UPCHARGE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var: u = U:FINISH; IF: u &amp;lt; .1 THEN: 173 ELSEIF: u &amp;lt; .2 THEN: 217 ELSEIF: u &amp;lt; .3 THEN: 269 ELSEIF: u &amp;lt; .4 THEN: 329 ELSEIF: u &amp;lt; .5 THEN: 398 ELSEIF: u &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Same as &amp;lt;code&amp;gt;IF: U:FINISH &amp;lt; .1 THEN: 173 ELSEIF: U:FINISH &amp;lt; .2 THEN: 217 ELSEIF: U:FINISH &amp;lt; .3 THEN: 269 ELSEIF: U:FINISH &amp;lt; .4 THEN: 329 ELSEIF: U:FINISH &amp;lt; .5 THEN: 398 ELSEIF: U:FINISH &amp;lt; .6 THEN: 476 ELSE: 563&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Negation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:!PRODBSD6FinalValidationRule,TRUE&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:P:7206=&amp;gt;F:PRODBSD6FinalValidationRule~X:TRUE~#,X:TRUE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:!IsMolding&amp;lt;/code&amp;gt; - Returns true if an item is not tagged with IsMolding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;=! true&amp;lt;/code&amp;gt; - Returns false&lt;br /&gt;
&lt;br /&gt;
=== Style Option Formulas ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:KK~&amp;lt;F&amp;gt;~AccountVariable:NOT_FOR_KK&amp;lt;/code&amp;gt; - Exclude KK if the account has a true value for the variable NOT_FOR_KK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;T:Cabinet Order~&amp;lt;F&amp;gt;~IF: Quote:ProjectUrgency.ProjectUrgencyLabel != &amp;quot;Cabinet Order&amp;quot;&amp;lt;/code&amp;gt; - &lt;br /&gt;
:Exclude style options tagged Cabinet Order if the order type Cabinet Order is not selected.&lt;br /&gt;
&lt;br /&gt;
=== Tokenless Constants ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~3~&amp;lt;==&amp;gt;92,114&amp;lt;/code&amp;gt; - Same as &amp;lt;code&amp;gt;I:V:EXTENDED_STILE_R~X:THREE~&amp;lt;==&amp;gt;X:NINETYTWO,X:ONEHUNDREDFOURTEEN&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwilliams</name></author>	</entry>

	</feed>