usage-consumption

Build, rate, verify, and reset metered Salesforce Revenue Cloud consumption demos.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Metered usage failures in Revenue Cloud are silent: a wrong ordering produces a zero rated summary or a plausible-but-wrong price with no error. This Skill provides the correct pipeline, scripts, and validators to build usage-entitled assets, record usage, orchestrate rating and drawdown, verify results, and reset orgs without stranding data. ## Core Features & Use Cases - Asset Building: Create backdated usage-entitled assets via scripts/build_quote_to_asset.py, including commitment and pack products linked through UsageCmtAssetRelatedObj. - Rating Orchestration: Record usage into past periods and drive multi-pass rating with scripts/qb_usage.py orchestrate, branching on exit codes rather than output text. - Verification & Reset: Validate rated arithmetic with offline invariants, CCI live checks, and validateRatedUsage.apex, then tear down usage graphs with convergent delete loops. - Use Case: A rated usage summary reads zero after a demo build. Follow the ordering checklist (usage recorded before orchestration, past period, anchor asset target) and run the report command to see what actually landed. ## Quick Start Ask the agent to read the usage-consumption skill and diagnose why the rated usage summary for the QuantumBit demo account is zero after orchestration.

Frequently Asked Questions about usage-consumption

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

FAQPage Schema
Why is my Salesforce usage rated summary zero with no error?▼

A zero rated summary is almost always an ordering problem, not a rating problem. Check that usage was recorded before that period was orchestrated, that the usage date falls in a past period, and that journals target the anchor asset rather than the commitment.

How do I add a commitment product to a Revenue Cloud usage demo?▼

Add the product with UsageModelType = Commit, give its PURP only a UsageCommitmentPolicyId, sell it as a separate quote from the anchor, then link the two assets with a UsageCmtAssetRelatedObj junction. Without that link the commitment is inert and consumption drains the anchor grant silently.

Can I re-record usage into the same period after clearing usage data?▼

No. Clearing usage data drains the summaries but the period stays closed, so new journals strand as Pending forever. Re-testing the same period requires a full account reset and an asset rebuild.

How do I verify a consumption build in Salesforce Revenue Cloud?▼

Run the offline invariant suite with python tests/test_qb_multicurrency_data.py, then cci task run validate_multicurrency_rates for live design and runtime checks, and finally validateRatedUsage.apex after orchestration settles to assert the rated arithmetic.

What is the difference between Commit and Pack usage products?▼

A Commit product discounts a rate and carries no grant, while a Pack product adds allowance with a grant but no commitment policy. Commitment buckets decrement by discounted quantity; anchor grants decrement by raw quantity.