You are here:
Context Rule Components
You build context rules by combining context rule components. Over time, this will establish a library of components that can reduce overall development time and expedite new development.
The context rules framework consists of the following reusable components:
-
Rule sets contain one or more context rules, and are applied to products, promotions, price lists, and price list entries. See Rule Sets.
-
Context rules are analogous to entity filters in the advanced rules framework. Context rules determine when a rule set applies in Industries Cart. See Context Rules.
-
Context dimensions are variables that describe the possible values to use in a rule condition. You can reuse context dimensions across multiple rule conditions. The rules engine compares context dimensions to data that comes from an sObject, a function, or a static value defined in the context mapping. See Context Dimensions.
-
Context mappings enable the rules engine to compare context dimension variables to data stored in sObjects, calculated using a function, or entered during design-time in a specified context scope. Salesforce Industries Communications, Media, and Energy caches context mappings in the session cache. See Context Mapping.
-
Context scopes describe the relational path from a root sObject, such as an Order, to related sObjects. Context mappings use context scopes to pinpoint the fields on the sObjects or compute data to match with context dimension variables so the Context Rule Service engine can evaluate them. See Context Scopes.
-
Functions are used in context mappings. You can invoke custom implementations to provide additional logic and processing. See Functions for Rules.
-
Object level rules assign penalty rules for contracts. See Creating Object Level Rules.
-
Context actions can be used with penalty rules to apply a fee when a promotion or contract is canceled. Context actions enable you to specify either a flat fee using a pricing element on a price list or calculate a fee by invoking a custom implementation. See Creating Context Actions.
You combine context rule components to create logical expressions that the rules engine can evaluate. For example:
Context Rule Condition = true WHEN {{Context Dimension}} == {{Context Mapping[Context Scope.Source Expression]}}
- Context Rules
Context rules determine when a rule set applies in Industries Cart. Context rules are analogous to entity filters in the advanced rules framework. - Creating Context Mappings
Context mappings allow the rules engine to compare context dimensions to data stored in an sObject, calculated using a function, or entered during design time within a specified context scope. Create context mappings in Vlocity Product Console. - Rule Sets
A rule set is a logical grouping of one or more context rules. Use a rule set to designate how the grouped context rules are expressed in a logical expression and how they are used in Industries Cart. - Create Qualification Rule Sets
Create qualification context rules as rule sets in Vlocity Product Console using reusable context rule components. - Context Dimensions
Context dimensions are variables that describe the possible values to use in a context rule condition. You can reuse context dimensions across multiple rule conditions. Context dimensions are linked to one or more context mappings. The rules engine compares them to the linked context mappings. - Context Scopes
Context scopes describe the relational path from a root sObject, such as an Order, to related sObjects. Context mappings use context scopes to identify the fields on the sObjects or computed data that is matched with context dimension variables. The Context Rule Service evaluates the information. - Create Context Actions
Use context actions with penalty rules to apply a fee when a promotion or contract is canceled. Context actions enable you to specify a flat fee using a pricing element on a price list.

