Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Setting Context Rule Conditions

          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:

          1. Specify one or more rule conditions.
            1. In the sidebar, click Rule Conditions.
            2. In the Rule Conditions facet, click Add Condition.
            3. Select Simple or Function.
            4. 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.

            Important
            Important

            Because 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.

            Tip
            Tip

            If 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.

          2. Click Save.
          3. 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.

            Important
            Important

            Because 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.

          4. 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.
            In the ​Function​ area of the ​Rule Condition​​ dialog, a Context Dimension value of CurrentOrder is specified.
          5. 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.

          Note
          Note Regularly check rule assignments to make sure that all associated rules are active. For information on managing inactive rules, see Troubleshoot Context Rules and GetCartProducts API Issues.
           
          Loading
          Salesforce Help | Article