constraint-models

Author, deploy, and diagnose Salesforce Revenue Cloud Constraint Modeling Language bundle rules.

5|3|Updated Sep 9, 2026
One-click install
npx skills add https://github.com/SalesforceLabs/revenue-cloud-foundations --skill constraint-models-salesforcelabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constraint-models
Source: https://github.com/SalesforceLabs/revenue-cloud-foundations/tree/main/.cursor/skills/constraint-models
Command: npx skills add https://github.com/SalesforceLabs/revenue-cloud-foundations --skill constraint-models-salesforcelabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Constraint model changes in Salesforce Revenue Cloud often appear to deploy successfully yet never take effect in the configurator, and missing association records cause products to fail Product Validation with no clear error pointing at the model. This Skill explains the file layout, the four records every bundle member needs, and the deactivate/import/activate cycle required to make a CML change actually reach an org. ## Core Features & Use Cases - CML Authoring Guidance: Edit .ffxblob artifacts (the real model source) correctly, keep reference .cml copies byte-identical, and avoid treating reference files as deployable artifacts. - Bundle Member Wiring: Add products to configurable bundles with all four required records — the ProductRelatedComponent row, CML type/relation declarations, and both ESC Type and Port associations. - Deployment & Diagnosis: Run the deactivate → import_cml → activate cycle, recover from partial ESC imports, and verify deployment headlessly via the Product Configurator configure action. - Use Case: You added a product to a bundle and it appears in the configurator but fails Product Validation. This Skill identifies the missing ESC Type association as the cause and walks you through fixing and redeploying the model. ## Quick Start Ask the agent to add a product to a configurable bundle's constraint model and deploy the change so it takes effect in the configurator.

Frequently Asked Questions about constraint-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a product to a Salesforce Revenue Cloud configurable bundle?

Adding a bundle member requires four records: a ProductRelatedComponent row, type and relation declarations in the CML blob, an ESC Type association, and an ESC Port association. Missing the Type association makes the product appear in the bundle but fail Product Validation.

Why did my constraint model change deploy but not take effect?

Importing into an already-active ExpressionSetVersion stores the new blob without redeploying the runtime model. You must deactivate then reactivate the version after import_cml, or use the prepare_constraints flow which performs this cycle at steps 11-12.

How do I verify a constraint model deployed correctly in Salesforce?

Reading ConstraintModel back only proves the blob was stored, since import_cml writes that same field. Real verification requires exercising the configurator, either in the UI or headlessly by POSTing the Product Configurator configure action with executeConfigurationRules set to true.

What is the difference between the .ffxblob and .cml files in constraint models?

The .ffxblob is plain-text CML source and is the actual artifact uploaded verbatim by import_cml. Files under scripts/cml are reference copies only; editing them changes nothing in any org, and some models ship no reference copy at all.

What happens when import_cml fails partway through an import?

The import half-applies: rows that resolved are already created, old ESC rows are not deleted, and the blob is not uploaded, leaving a mix of old and new constraints. A clean rerun clears the mix because the existing-ESC snapshot is retaken each run.