constraint-models

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

33|12|Updated Sep 24, 2024
One-click install
npx skills add https://github.com/bgaldino/rlm-base-dev --skill constraint-models-bgaldino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constraint-models
Source: https://github.com/bgaldino/rlm-base-dev/tree/main/.cursor/skills/constraint-models
Command: npx skills add https://github.com/bgaldino/rlm-base-dev --skill constraint-models-bgaldino

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 ExpressionSetDefinitionVersion 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 does this cycle automatically.

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 via 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. The scripts/cml/*.cml files are reference copies only; editing them changes nothing in any org, and some models ship no reference copy at all.

Why does import_cml fail with unresolved ReferenceObjectId errors?

Port associations resolve ProductRelatedComponent records by composite key, where Sequence is part of the key matched against the target org. If the sequence disagrees with the org's actual PRC row, resolution fails and the import half-applies, leaving a mix of old and new ESC rows until a clean rerun.

Can multiple constraint models be active at the same time?

Yes, but only one model per family may be active. Unrelated models can be active alongside each other, so discover what is actually active in the org via an ExpressionSetVersion query before deactivating anything.