Explanation (150–250 words)
Constraint Modeling Language (CML) defines logical relationships between quote line items, allowing administrators to automate dependency and compatibility logic in Salesforce CPQ.
The keyword require() explicitly establishes a dependency that ensures one product must exist when another is present in a quote.
The correct syntax must define relationships with multiplicity ranges (e.g., [0..99]) and use the require() function, not constraint(), to specify the rule. Option B meets these criteria:
type Quote {
relation desktop : Desktop[0..99];
relation monitor : Monitor[0..99];
require(desktop[Desktop], monitor[Monitor], "Desktop requires Monitor");
}
This ensures that when “Desktop” is added, “Monitor” is automatically included. The other options are incorrect because:
Option A uses the wrong function (constraint() instead of require()), which defines logical conditions but doesn’t enforce automatic inclusion.
Option C omits multiplicity, which is required for valid relationship definition.
Exact Extract from Salesforce CPQ Implementation Guide:
“The require() statement in CML defines a dependency rule so that when one product is selected, the dependent product is automatically added to the quote.”
[References:, Salesforce CPQ Implementation Guide — Constraint Rules and CML Syntax, Salesforce Revenue Cloud Developer Guide — Defining Product Relationships in CML, , ]
Submit