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
          Compatibility Rules

          Compatibility Rules

          Compatibility rules are also known as configuration rules or validation rules. Compatibility rules determine if a product combination is valid. Using compatibility rules, you can define that, when a product is added to the cart, related products are added with it. You can also automatically add, automatically remove, or recommend products based on other products in the cart.

          Compatibility rules run on Order Line Item objects—Opportunity Line Item, Quote Line Item, or Order Line Item. The rule actions involve product relationships.

          Compatibility rules define the relationship between products to ensure that the correct combination of products is added to the cart. Compatibility rules use the ProductValidationInterface and associated implementations to execute definitions in the Product Relationship object. For more information about product relationships, see

          The validation interface and implementation are triggered when products are added to an order. Compatibility rule implementations include:

          • ValidationRulesFlowImplementation

            Use ValidationRulesFlowImplementation when using a flow with Compatibility Rules included.

          • ValidationRulesImplementation

            Use ValidationRulesImplementation when using advanced Compatibility Rules, including those that should be run conditionally.

          • ProductRelationshipValidationImpl (deprecated)

            Use ProductRelationshipValidationImpl when using standard Compatibility Rules with soft relationships— requires or excludes.

          Note
          Note

          With the ValidationRulesImplementation, you must also use a flow that includes a custom action with the class name UnconditionalProductValidation.

          For more information about interfaces and implementations, see the Interfaces, Implementations, and ServicesInterfaces, Implementations, and Services.

          Compatibility Rule Process Diagram

          A Trigger Event invokes a ValidationRulesImpl class, which invokes a Flow containing Advanced Rules. Advanced Rules have Entity Filters and Conditional Actions.

          Example compatibility rules include:

          • VOIP requires Office Internet.

          • Office Internet excludes Business Video Service when the download speed is less than 100 Mbps.

          • Office Internet automatically adds free installation for high-priority accounts in California.

          • VOIP requires Office Internet only if the customer doesn’t already have Office Internet.

          • Automatically add an iPhone case when the customer adds two or more iPhones to the cart.

          You can also create compatibility rules based on product attributes, for example, exclude Product B if Internet speed is less than 100Mbps. For more information about product attributes, see Product Attributes.

          Before you create a compatibility rule, you must create an entity filter that defines the conditions. The entity filter must be run on the same object type as the rule. For more information about entity filters, see

          Create a Compatibility Rule

          Compatibility Rules determine if a product combination is valid. Using Compatibility Rules, you can define that, when a product is added to the cart, related products are added with it. You can also automatically add, automatically remove, or recommend products based on other products in the cart.

          Compatibility Rules are also known as Configuration Rules or Validation Rules.

          In the example, Gold accounts are automatically given a free case when they order an iPhone 6.

          To create a Compatibility Rule:

          1. Create the necessary Product Relationships. For more information, see Create a Product Relationship.

            In this example, create a Product Relationship for the Apple iPhone 6 that automatically adds an iPhone case.

          2. Create the necessary Entity Filters. For more information, see About Build Rules and Entity Filters

            In this example, create an Entity Filter that returns the Gold accounts.

            • The Entity Filter Name is Parent Order Account Gold.

            • The Filter on Object Name is Order Product<OrderItem>.

            • Active is selected.

            • The Type is Qualification.

          3. Create the necessary Entity Filter conditions. For more information, see Entity Filters.

            In this example, the condition finds the Gold accounts.

            • The Type is Field.

            • The Field/Attribute Name is Order.Account.vlocity_cmt_vCustomerPriority.

            • The Operator is = (equal sign).

            • The Value is Gold.

          4. Click the Vlocity Rules tab.
          5. Click New.
          6. Enter the following information:
            • Rule Name is the name of the Rule. Enter a descriptive name so you can easily remember what the Rule does.

            • From the This defines picklist, select the Rule type, for example, Configuration.

            • From the Rule that applies to picklist, select the object to which the Rule applies, for example, Order Product<Order Item>.

            • From the And is picklist, select if the rule is Active or Inactive.

            • In the Description field, enter a description of what the Rule does.

            Example rule for adding an iPhone case to an iPhone purchase.
          7. Scroll down to the Filters and Actions section.
            The Filters list in the Rule Builder.
          8. Click the Filters button.
          9. In the Filters and Actions list, locate the Entity Filter. Click the Add to Rule Filter link to the right of the filter to add.
          10. Click the Actions button.
          11. In the Filters and Actions list, click the Add to Rule Action link to the right of the action to add.
          12. Scroll to the top of the page and click Save.

            Rule Builder, Compatibility Rule

            The Vlocity Rule Builder shows a rule for adding an iPhone case to an iPhone purchase.

          Test a Compatibility Rule

          You can test Compatibility Rules by adding products to the cart in the Opportunity, Order, or Quote Manager. You can create a new Opportunity, Order, or Quote from the appropriate Account and add items to the cart.

          For example, ordering an iPhone 6 from a Gold Account should add a free case.

          Note
          Note

          Before you can test Rules, you must ensure that Vlocity is using the appropriate interface implementation. For more information, see "Set an Implementation" in Interfaces, Implementations, and Services.

          To test a Compatibility Rule:

          1. Click the Orders tab.
          2. Create a new Order.
          3. On the Order detail page, scroll down to the Order Manager.
          4. Add the product that should activate the Compatibility Rule.
          5. Confirm that the appropriate message appears or action has been taken.
           
          Loading
          Salesforce Help | Article