expression-sets

Inspect and author Revenue Cloud BRE Expression Sets via Connect and Metadata APIs.

Updated Sep 23, 2026
One-click install
npx skills add https://github.com/drgaciw/rlm-base-dev-fork --skill expression-sets-drgaciw
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: expression-sets
Source: https://github.com/drgaciw/rlm-base-dev-fork/tree/main/.cursor/skills/expression-sets
Command: npx skills add https://github.com/drgaciw/rlm-base-dev-fork --skill expression-sets-drgaciw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Salesforce Revenue Cloud Expression Sets (pricing, rating, qualification, and discovery procedures) programmatically is error-prone: Connect API payloads arrive HTML-escaped, active versions reject mutations, step graphs use flat parentStep references, and full-graph PATCHes silently clobber readable step labels. This Skill encodes the live-verified rules, lifecycle guards, and validation checks needed to read and mutate these procedures safely. ## Core Features & Use Cases - Programmatic CRUD and overlays: Export, create, replace, delete, and apply declarative addSteps/removeSteps/updateSteps overlays to Expression Sets through the Connect API or source-controlled Metadata API deploys. - Inspection and tracing toolkit: List, describe, diff, and trace variable producers/consumers in live procedures, and render Mermaid dependency or execution-flow diagrams, all read-only. - Dependency capture and validation: Classify step references into three scopes (version variables, custom external dependencies, standard context) and pre-flight payloads offline with a schema validator before any mutation. - Use Case: You need to add a discount-distribution block to a pricing procedure. Export the live procedure, slice a known-good step into a validated overlay, preview the apply against a disposable clone, then confirm the mutation with automatic deactivate/reactivate and label preservation. ## Quick Start Ask the agent to list the Expression Sets in your org and export the default pricing procedure to JSON using the scripts/expression_sets toolkit with your SF CLI org alias.

Frequently Asked Questions about expression-sets

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

FAQPage Schema
How do I edit a Salesforce Expression Set programmatically?▼

Use the Connect API tasks or the scripts/expression_sets toolkit for runtime CRUD, or edit expressionSetDefinition XML and deploy via the Metadata API for source-controlled changes. Every Connect mutation runs deactivate, PATCH or POST, then reactivate in a guarded finally block.

How to add a step to a Revenue Cloud pricing procedure?▼

Capture the step from a live GET with export_expression_set_overlay.py rather than hand-authoring, which also pre-classifies its dependency scopes. Apply the overlay with apply_expression_set_overlay.py in preview mode first, then with --confirm against a disposable clone.

Connect API vs Metadata API for Expression Set authoring?▼

Connect API suits runtime programmatic CRUD and org-to-org capture; Metadata API suits git-tracked, diffable changes with no activation lifecycle. Step, parameter, and variable shapes are identical across both paths, so a step authored once works for either.

Why does my Expression Set PATCH fail with Syntax error Found '&'?▼

Connect GET output HTML-escapes string values like " and ', and the engine rejects those entities on write. HTML-unescape the payload before sending; the mutation tasks do this automatically via normalize_html_entities, which defaults to on.

Can I use this skill for Constraint expression sets?▼

No. Constraint expression sets are authored in CML (Constraint Modeling Language) and shipped as plain-text blobs, not step graphs, so the overlay tooling and script routing do not apply. Use the constraint-models skill instead.

Why did my step labels turn into run-on names after a Connect import?▼

Connect has no label field, so every full-graph PATCH rebuilds each label from the step name. The import and overlay tasks capture and restore labels automatically via a second Tooling API cycle; run relabel_expression_set.py last if you opted out.