Christmas & New Year Special – Get 50% OFF on FileTranz
Claim Your OfferAutomatically control product attributes in Revenue Cloud using Quotelevel fields with the Constraint Rule Engine for smarter, error free configurations
Modern B2B sales demand more than just selecting products, they require intelligent configurations that automatically adapt to business context, such as Channel Partner Tiers and commercial agreements. Revenue Cloud's Constraint Rules Engine enables this by allowing Quote-level data to directly influence how products are configured in real time. In this blog, we explore a complete, real-world implementation of Quote field-driven attribute control, demonstrating how product attributes can dynamically change based on the Channel Partner Tier selected on a Quote. Using a practical Laptop Pro Bundle scenario, you'll learn how to enable and troubleshoot the Constraint Engine, expose Quote fields through context definitions, build constraint models using CML, and validate the behavior through hands-on testing, ensuring your product configurations remain accurate, consistent, and aligned with your business rules.
Constraint Rules Engine in Salesforce Revenue Cloud is an advanced product configuration engine that allows administrators and product managers to define and enforce complex product configuration rules, dependencies, validations, and constraints without extensive custom code. It helps ensure customers and sales reps can configure only valid product combinations.
If you haven't configured the Constraint Rules Engine in your org, please follow the steps to create your constraint rule in Revenue Cloud. If you have already configured the Constraint Rules Engine, you can skip this step and proceed directly to the "Control Product Attributes Based on the Quote Field" section.
Assign the permission set to the user to design your new constraint rule
Permission set:- Product Configuration Constraints Designer
Follow the steps below to enable the Constraint Rules Engine in Revenue Cloud.

After enabling the Constraint Rules Engine, you may see the following error when configuring products:
Something went wrong while running configuration rules.
You can't open the Product Configurator because the ConstraintEngineNodeStatus field either hasn't been added to transaction line item objects or hasn't been mapped to the active context definition.
This error occurs when the ConstraintEngineNodeStatus field is missing or not properly mapped in the SalesTransactionContext.
The ConstraintEngineNodeStatus field acts like a status tracker for every product option being evaluated. It stores the results returned by the Constraint Rules Engine and helps the Product Configurator understand how each product component should behave.
When the Product Configurator launches, it expects the ConstraintEngineNodeStatus field to be available through the active SalesTransactionContext. If the field is missing or not mapped correctly, the configurator has no way to receive the rule evaluation results from the Constraint Rules Engine. As a result, Salesforce cannot build a valid configuration session and prevents the configurator from opening.
To resolve this issue, you must:
Create the following custom field on all three objects:
Objects
Field Configuration
| Property | Value |
|---|---|
| Field Name | ConstraintEngineNodeStatus |
| API Name | ConstraintEngineNodeStatus__c |
| Data Type | Text Area (Long) |
| Length | 131,072 |
| Field-Level Security | Select Visible, Deselect Read-Only (for users using Constraint Rules Engine) |
| Page Layouts | Do not add to any page layout |
This field is used internally by the Constraint Rules Engine and should not be visible on UI layouts.
Navigate to Setup -> Context Definitions and edit the Extended SalesTransactionContext associated with the default pricing procedure (configured in Revenue Settings).


Click Next.
Click Save.
ConstraintEngineNodeStatus -> QuoteLineItem.ConstraintEngineNodeStatus__c
Click Save and Publish
ConstraintEngineNodeStatus -> OrderItem.ConstraintEngineNodeStatus__c
Click Save and publish.
AssetConstraintEngineNodeStatus -> AssetActionSource.ConstraintEngineNodeStatus__c

Click Save and Publish
Congratulations! The Constraint Rules Engine is now fully enabled and operational in your org.
Meet Matt, Product Designer in Laptop World. Pvt Ltd. He wants to control the Laptop Pro Bundle attributes based on the new Quote field:- Channel Partner Tier.
Product: Laptop Pro Bundle
Laptop Pro Bundle

In Laptop World Pvt. Ltd., the Channel Partner Tier is a custom field used in quotes to classify business partners based on their:
It helps the company assign specific product rules and restrictions depending on the partner's level.
There are two tiers:
Each tier has different permissions and configurations for products.
When a Channel Partner Tier is classified as Silver, the system applies stricter product settings.
A wired mouse will be the default for Silver partners.
Inkjet will be the default configuration for the Silver partner.
When a partner is classified as Gold, they receive more flexible and premium product options.
Gold partners can use or sell wireless mouse products, which are typically considered premium.
Gold partners can configure and sell high-end laser printers, which offer better performance and efficiency.
In this section, we'll bring your configuration to life by dynamically controlling product attributes based on a Quote-level field using the Constraint Rules Engine. Let's walk through it step by step.
We'll start by creating a new picklist field on the Quote object.
Field Details
This field will drive how product attributes behave in the bundle.
Now, let's expose this field to the Constraint Engine using the Context Definition.
Attribute Configuration

This makes the Quote field available to the Constraint Engine.
Next, we'll map the context attribute to the actual Quote field.

Now it's time to define the rules.

Now we'll write the actual constraint logic.
In our example, we are declaring an external variable to retrieve the Quote field value.
At the very top of the CML Editor, add this to fetch the Quote field value from the SalesTransaction context:
@(contextPath = "SalesTransaction.Channel_Partner_Tier__c")
extern string Channel_Partner_Tier__c;Use constraint rules to set the Wireless attribute for the Mouse product automatically:
type Mouse : LineItem {
@(defaultValue = "false")
boolean Wireless;
constraint(Channel_Partner_Tier__c == "Silver" -> Wireless == false);
constraint(Channel_Partner_Tier__c == "Gold" -> Wireless == true);
}Apply similar logic for the Printer product:
type Printer : LineItem {
string Printer_Type = ["Laser", "Inkjet"];
constraint(Channel_Partner_Tier__c == "Silver" -> Printer_Type == "Inkjet");
constraint(Channel_Partner_Tier__c == "Gold" -> Printer_Type == "Laser");
}Once the rules are complete:
Your Constraint Model is now live and dynamically controlling product attributes based on the Channel Partner Tier selected on the Quote!
Now that the constraint rule is successfully in place, it's time to put it to the test by creating a new quote and verifying that product attributes update correctly based on the Channel Partner Tier.
Follow the steps below to validate the behavior.




The constraint rule behaves exactly as intended product attributes automatically adjust based on the Channel Partner Tier, ensuring accurate and controlled configurations every time.
By using Quote fields driven constraint rules in Revenue Cloud, you can make product configuration smarter and more reliable. This approach ensures that product attributes automatically adjust based on business context such as the Channel Partner Tier without any manual intervention. The result is a simpler configuration, fewer errors, and consistent enforcement of business rules, helping sales teams create accurate quotes faster and with greater confidence.