---
schema_version: "1"
id: ce8e693a84bbabc06420f54bbee3ac991cd5ce7680b2734b53df435de24cbd0d
title: Product Relationships
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_product_relationships_overview.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_product_relationships_overview.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: cd636591c98eec78b4a40d314ba8c0778b2bcb50f90ca1a248b44d5a2c7283cc
description: Products can be related to one another. For example, a product may require, exclude, or recommend another product. You can define relationships between products using Product Relationship objects. Product Relationship objects are then used in compatibility rules to ensure that the correct combination of products is ordered. For example, if a customer orders Product A, the interface may recommend Product B.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Product Relationships

Products can be related to one another. For example, a product may require, exclude, or recommend another product. You can define relationships between products using Product Relationship objects. Product Relationship objects are then used in compatibility rules to ensure that the correct combination of products is ordered. For example, if a customer orders Product A, the interface may recommend Product B.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note Advanced Rules Framework will clear all the existing messages in vlocity\_cmt\_\_CpqMessageData\_\_c field before processing a line item.

A product relationship is or is not conditional. If a product relationship is conditional, it is only applied under certain conditions, defined in the compatibility rules. If a product relationship is not conditional, then it always applies.

There are soft relationship types and hard relationship types.

Soft relationships include the following options:

- Recommends
- Requires
- Excludes

With versioning, the Modify Attributes, Recommends, and Excludes options apply all versions of a source product to all versions of the (target) related product.

Hard relationships include the following options.

- Automatically add
- Automatically replace
- Automatically remove

These relationship types work with versioning. For Auto-Add and Auto-Replace, when a version of a source product is added, the target product is also automatically added. The target product’s version is selected based on the reference date. See [Versioning Reference Dates](https://help.salesforce.com/s/articleView?id=ind.comms_versioning_reference_dates.htm&release=264.0.0&type=5 "For versioned products, reference dates determine which product version to use and affect the product structures. The reference dates and their use vary by object and business process. The availability of products is not based solely on the Versioning Start and End dates."). For Auto-Remove, all versions of the source product apply to all versions of the (target) related product. If you have multiple versions of related products in your cart and each has different reference dates, all versions of the related product in the cart are deleted.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note

Automatic removal relationships are especially important for Energy & Utilities Cloud. In most Orders for commercial Energy customers, child products in the bundle are unit rates, and different unit rates apply under different conditions. Rates that don't apply must be removed from the Cart.

You define product relationships in the Product Relationship object, which corresponds to the Product Relationship record detail page.

- **Product Relationship Name** is a short description of the Product Relationship.
- **Product** is a lookup to the product to evaluate.
- **Relationship Type** is the action to execute.
    
    - Soft relationships recommend, require, or exclude products.
    - Hard relationships automatically add, automatically remove, or automatically replace products.
- **Related Product** is a lookup to the product to act upon.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)
    
    Note Use this field to specify the product for a rule to act upon. Let's say you create a rule that automatically removes a product. In the Related Product field, specify the product that you want to remove.
- **Default Quantity** is the default number of products to add, delete, recommend, and so on.
- **Add Mode** specifies if the related product is a child, sibling, or root.
    
    - **asSibling** adds the related product at the same level as the current product.
    - **asChild** adds the related product as a child of the current product.
    - **asRoot** adds the related product at the root of the cart.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)
    
    Note
    
    For the **asChild** option to work, the product to be added must be defined as a child to the original product, with a default quantity of zero. You may also need to run the Product Hierarchy maintenance job. For more information, see [Administration Jobs Reference for ​Salesforce Industries Communications, Media, and Energy](https://help.salesforce.com/s/articleView?id=ind.comms_administration_jobs_reference_for__salesforce_industries_communications__media__and_energy.htm&type=5&language=en_US).
- **Context** is the context of the defined relationship.
    
    - **Bundle** specifies that the defined relationship executes only within the context of its root product.
    - **Cart** specifies that the defined relationship executes if the product is anywhere in the cart.
    
    For example, a rule specifies that adding an iPhone to the cart automatically adds the Airpod. The iPhone and Airpod are both included in the Wireless bundle. If the **Context** is **Cart**, only one Airpod will be added regardless of the number of Wireless bundles in the cart. If the **Context** is **Bundle**, then an Airpod will be added for each Wireless bundle that includes the iPhone.
- **Description** is a longer description of the product relationship.
- **Max Quantity** is the maximum number of the related product a customer can add to the original product.
- **Min Quantity** is the minimum number of the related product a customer must add to the original product.
- **Is Conditional** specifies if a relationship is or is not conditional.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)
    
    Note
    
    This option is only applicable if the UnconditionalProductValidation custom action is included in the Validation flow. For more information about flows, see [Flows.](https://help.salesforce.com/s/articleView?id=ind.comms_flow_management_in_industries_cpq.htm&release=264.0.0&type=5 "Flows define sequential processing of rules, logic, and custom processing that can be initiated by an interface implementation, specify calls to Apex, and can access any service.")

To use Product Relationship objects to their fullest extent, you must use the ValidationRulesFlowImplementation, which includes a custom action with the specified class name UnconditionalProductValidation. You can also use a custom implementation, as long as it includes the UnconditionalProductValidation class or a similar class. For more information, see Interfaces, Implementations, and ServicesInterfaces, Implementations, and Services.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note Cardinality validation isn't supported for for the Min and Max Quantities in the Advanced Rules Framework.

The Classic Cart APIs automatically identify and process only unique auto-add rules, discarding duplicates. In contrast, the Standard Cart APIs execute every rule presented, including any duplicates. Therefore, ensure your system configuration contains only unique auto-add rules to prevent over-execution by the Standard Cart APIs.

- **[Create a Product Relationship](https://help.salesforce.com/s/articleView?id=ind.comms_create_a_product_relationship.htm&release=264.0.0&type=5)**  
    You create product relationships to relate products to one another.
- **[Test a Product Relationship](https://help.salesforce.com/s/articleView?id=ind.comms_test_a_product_relationship.htm&release=264.0.0&type=5)**  
    After you create a Product Relationship, you can test it by creating a new Opportunity, Order, or Quote and adding the Product to the cart.
- **[Linear Relationships Between Products](https://help.salesforce.com/s/articleView?id=ind.comms_inear_relationships_between_products.htm&release=264.0.0&type=5)**  
    A Linear Relationship is a product modeling pattern designed for complex Enterprise Products. It provides an alternative to traditional hierarchical modeling, streamlining the process and reducing the complexities often found in hierarchical structures.