When multiple products share the same attributes and require identical constraint logic (for example, making an attribute picklist value default), a common challenge is that standard CML import requires each product to be added to the Constraint Model individually. This becomes unmanageable when dealing with a large product catalog.
In Revenue Cloud Advanced (RCA), CML supports type hierarchies — an inheritance model where a parent type (mapped to a Product Classification) can hold all shared logic, and child products inherit it automatically.
When this is applied:
Note: Product Classification import in CML is currently only available via the CML Editor. It is not supported in the Visual Builder at this time.
Prerequisites:
Sample Code:
@(virtual = true)type Quote { @(sourceContextNode = "SalesTransaction.SalesTransactionItem") relation beyondProducts : Classification[0..999];
constraint(beyondProducts[Classification].TestAttribute == 'B');}
type Classification { string TestAttribute = ["A", "B"];}
In this example:
Classification is the type mapped to a Product Classification record in Salesforce.
All products assigned to that Product Classification already inherit the TestAttribute.
Step 1: Open Your Constraint Model in the CML Editor
Note: Product Classification import is not supported in the Visual Builder. You must use the CML Editor for this approach.
Step 2: Define the Virtual Quote Container
At the top of the CML Editor, add the Quote virtual type (type Quote). This is the transaction-level container that holds all product type relations. Every CML model using classifications needs exactly one virtual container.
Step 3: Copy the attributes from the product.
Step 4: Define the Classification Type with Its Attributes
Immediately below the Quote type in the CML Editor, add the Classification type. This type maps to your Product Classification record and define the copied attribute from the products.
Step 5: Map the Classification Type to the Product Classification Record
This ensures the constraint engine applies the logic to all products under that classification automatically.
Step 6: Save, Activate, and Test
Observation:
Open a Quote and configure the product with required classification.
Behaviour as per the example code given in description:
TestAttribute defaults to "A" on load.TestAttribute == 'B' is enforced across all matching Classification items in the transaction.Current Limitations:
Classification-level CML logic currently applies to standalone products only. The following scenarios were tested and confirmed to not work with the classification-level CML approach:
Variables, Relationships, and Associations in Constraint Models
005385561

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.