You are here:
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.
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. 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.
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 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.
NoteFor 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.
-
-
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.
NoteThis option is only applicable if the UnconditionalProductValidation custom action is included in the Validation flow. For more information about flows, see Flows.
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.
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
You create product relationships to relate products to one another. - Test a Product Relationship
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
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.

