usage-consumption

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

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

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 build-record-orchestrate-verify pipeline so usage entitlements, commitments, and rating actually settle as configured. ## 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. - Usage Recording & Orchestration: Record usage into past periods and run multi-pass orchestration with scripts/qb_usage.py, branching on exit codes rather than output text. - Verification & Reset: Validate rated results with offline invariants, CCI live checks, and validateRatedUsage.apex, plus convergent-loop teardown for usage data resets. - Use Case: A rated usage summary comes back zero with no error. Follow the ordering checks (usage recorded before orchestration, past period, anchor asset target) to diagnose and recover the period. ## Quick Start Ask the agent to build a usage-entitled asset for a QuantumBit account, record usage into a past period, orchestrate rating, and verify the rated summary with the validation scripts.

Frequently Asked Questions about usage-consumption

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

FAQPage Schema
How do I record and rate usage in Salesforce Revenue Cloud?

Build a usage-entitled asset first, record usage into a past billing period against the anchor asset, then run orchestration multiple times until journals aggregate and rating jobs settle. Verify with validateRatedUsage.apex rather than reading numbers manually.

Why is my rated usage 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 usage demo?

Sell the commitment as a separate quote from its anchor, then link the two assets with a UsageCmtAssetRelatedObj junction. The commitment PURP may carry only UsageCommitmentPolicyId, and without the junction link the commitment is inert.

Can I re-record usage into a period that was already orchestrated?

No. Once a UsageSummary reaches RatableSummaryComplete or LiableSummaryComplete it never reopens, and new journals stay Pending forever. Re-testing the same period requires a full account reset and asset rebuild.

What does a non-zero OverageQuantity on a usage summary mean?

On ordinary rows, OverageQuantity mirrors TierQuantity and means usage beyond the included allowance, not commitment exhaustion. Commitment exhaustion behavior depends on the design-time CommitmentRate policy, which no runtime object records.