Create Context Dimensions

Context dimensions are variables that describe the values that can be used in a context rule condition.

For more information about context dimensions, see Context Dimensions.

  1. In Vlocity Product Console, in the Rules area, next to Context Dimension, click Create The plus icon for Create.
  2. On the New Context Dimensiontab, enter the following information.
    • Name is the context dimension name.

      Note
      Note

      You cannot use spaces in a context dimension name due to rules parsing engine requirements.

    • Code is the code that refers to the rule when creating custom expressions. Use a unique but meaningful code, so that it is easy to read custom expressions. For more information about custom expressions, see Child Rules and Expression Modes and Custom Expressions.

      Note
      Note

      You cannot use spaces in a context dimension code due to rules parsing engine requirements.

    • Description describes the context dimension's purpose.

    • Condition Weight helps the TightestMatchInterface weigh rules for price list entries and child price lists. Product and promotion rules do not use condition weight.

    • Data Type describes the context dimension data type, for example Text, Number, Date, DateTIme, or Boolean.

    • Domain Type describes how rule condition values appear when creating a rule condition.

      • Picklist: Select rule condition values from a Vlocity picklist.

      • Object Lookup: Select a specific record from an sObject.

      • Type In: Enter free form strings.

    • Object specifies the sObject to look up when the Domain Type is Object Lookup.

    • Vlocity Picklist specifies the picklist to use when the Domain Type is set to Picklist. If you are using a Vlocity picklist as the domain type, you must create the picklist before creating a context dimension. You cannot use Salesforce picklists in context rules.

    • Picklist Selection Mode specifies whether to allow the user to select a single value or multiple values from the Vlocity picklist.

      Note
      Note

      The context rule service supports only single values.

    • Cacheable Mode; When this option is checked, cacheable jobs (that is, jobs that populate the API Cache) will use this Context Dimension. If this option is not selected, the Context Dimension will not be cached, and therefore will not available to Digital Commerce APIs.

    • Default Value specifies the value that will be used for the Context Dimension (and passed to the Context Rules) when the input context parameters do not have a given value. The value is used in the case of tightest match for price list entries. If this field is left empty, then the value will be passed as null.

      Note
      Note The Default Value field present in the Context Dimension is used only in the Digital Commerce (DC) APIs.
    • Values for caching specifies the list of possible values for this dimension. For each of these values, the Cacheable Jobs (for example, the Populate API Cache job) will cache a response.During runtime, if the input context parameter is passed a value that is not present in this list, the CPQ engine will evaluate the response on the fly and then cache the result.

    • Active specifies whether this context dimension is active or not.

    • Effective From is the start date of the period during which rules can use the context dimension.

    • Effective Until is the end date of the period at which rules can no longer use the context dimension.

  3. Click Save

After creating your context dimension, the next step is to create a context mapping. For more information on creating context mappings, see Creating Context Mappings.

Some example context dimensions include: