You are here:
Setting Context Rule Conditions
Context rules can have one or more rule conditions. Rule conditions can be either:
-
Simple: A condition that compares a context dimension value to a context mapping value.
-
Function: A condition that compares the function's output to a static value.
To set context rule conditions:
-
Specify one or more rule conditions.
- In the sidebar, click Rule Conditions.
- In the Rule Conditions facet, click Add Condition.
- Select Simple or Function.
- For simple rule conditions, enter the following information in the General Properties area.
Property
Value
Description
Code
String
The code by which you refer to this rule condition. Use the code when creating custom expressions. For more information, see Expression Modes and Custom Expressions.
ImportantBecause the rule condition code is used to create custom expressions, the code should be unique, descriptive, and contain no spaces.
Context Dimension
Select a context dimension using the Context Dimension Lookup dialog box.
Specifies the context dimension to use with this rule condition.
Operator
-
>
-
>=
-
<
-
<=
-
==
-
!=
-
<>
-
LIKE
-
NOT LIKE
-
INCLUDES
-
EXCLUDES
Specifies the operator the context rule service uses to compare the Value property to the context mapping.
Value
Depending on the context dimension domain type, the Value property displays different selections.
-
If the domain type is Type In, the Value property displays a text box that enables you to enter a free form string value.
-
If the domain type is Object Lookup, the Value property displays a lookup dialog box that you specified in the context dimension.
-
If the domain type is Picklist, the value property displays the Vlocity picklist you specified in the context dimension.
Specifies the value the context rule service uses to compare to the context mapping.
TipIf the context dimension is
Fail Level
-
Hard Fail
-
Soft Pass
-
Soft Fail
Fail Level is not implemented currently in Industries Cart.
Failure Message
String value
This message is not currently displayed in Industries Cart. Instead, set the failure message on the rule set. For more information about failure messages, see Failure Messages.
- Click Save.
-
For function rule conditions, enter the following information in the General Properties area.
Property
Value
Description
Code
String
The code by which you refer to this rule condition. Use this code when creating custom expressions. For more information, see Expression Modes and Custom Expressions.
ImportantBecause rule condition code is used to create custom expressions, the code should be unique, descriptive, and contain no spaces.
Vlocity Function
Select a function using the Vlocity Function Lookup dialog box.
Specifies the function to use for this rule condition. After it is selected, the function's input and output arguments display in the Rule Condition dialog box.
Operator
-
>
-
>=
-
<
-
<=
-
==
-
!=
-
<>
-
LIKE
-
NOT LIKE
-
INCLUDES
-
EXCLUDES
Specifies the operator the context rule service uses to compare the Value property to the function's output.
Value
String value
Specifies the value the context rule service uses to compare to the function's output.
Fail Level
-
Hard Fail
-
Soft Pass
-
Soft Fail
Fail level is not implemented currently in Industries Cart.
Failure Message
String value
This message is not currently displayed in Industries Cart. Instead, set the failure message on the rule set. For more information about failure messages, see Failure Messages.
-
- In the Function area of the Rule Condition dialog, the input and output arguments of the function are displayed. Depending on the function's input arguments' domain types, you can specify values in Object Lookup, Context Dimension, Type in, or Vlocity Picklist.
- Save your changes.
After creating the context rule, the next step is to create a rule set. For more information about creating rule sets, see Creating Rule Sets.

