You are here:
Creating a Custom Product Configuration Message
Product compatibility rules, also known as product configuration rules, determine if a product combination is valid. Salesforce includes default product configuration error messages in the Opportunity Manager, Order Manager, Quote Manager, and cart. However, you can create custom messages to provide more useful information to the user.
For example, consider these sample error messages:
-
Product X requires Product Y
-
Product X excludes Product Y
-
Product X recommends Product Y
You can create a custom message for each product relationship record. First, you create a user custom message field to display instead of the standard message. Then, you set the CustomRuleMessageFieldName custom setting.
To create a custom product configuration message:
-
Create a user custom message field.
-
From Setup, in the Quick Find box, enter Objects.
-
Click Objects.
-
Click Product Relationship.
-
In the Custom Fields & Relationships section, click New.
-
Create a new custom field with a Data Type of Text Area. Remember the API name for the field. For more information, see Create Custom Fields in the Salesforce Help.
-
- Configure the custom field.
- Expose the new field on the Product Relationships record detail page.
- Enter the custom message.
-
Ensure that the active implementation for the ProductValidationInterface is a
validation rule implementation.
-
On the Interface Implementations tab, from the View picklist, select All.
-
Click Go!.
-
Click ProductValidationInterface.
-
Ensure that ValidationRulesImplementation or a custom implementation that invokes compatibility rules is active. If it is not, click the appropriate implementation and select Active.
-

