Skip to content
cccskills
FreePublished on GitHub

usage-based-pricing-setup

Usage-based pricing in Revenue Cloud: metered billing, usage records, rating, tiering, consumption schedules. NOT for choosing a CPQ pricing method (List, Block, Cost Plus Markup, Percent of Total) - use admin/pricing-model-design. NOT for legacy Salesforce Billing (blng__) schedules and invoice runs - use admin/billing-schedule-setup.

The English summary is being prepared. Showing the original description.

Works withSalesforce
See how to install

Files included (7)

  • SKILL.md6.9 KB
  • references/examples.md7.5 KB
  • references/gotchas.md6.9 KB
  • references/llm-anti-patterns.md3.1 KB
  • references/well-architected.md7.5 KB
  • scripts/check_usage_based_pricing_setup.py3.8 KB
  • templates/usage-based-pricing-setup-template.md637 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Usage-Based Pricing Setup

Activate when configuring Revenue Cloud usage-based (consumption / metered) pricing: products billed by API calls, gigabytes, seats-per-day, kWh, or any consumed unit. Distinct from CPQ flat-rate discounting — usage-based pricing calculates charges from post-sale telemetry and runs rating on top of raw usage records.

Before Starting

  • Confirm Revenue Cloud + usage-based entitlement. Consumption Schedules, Usage Summary, and rating are part of Revenue Cloud, not base CPQ. License the correct SKU.
  • Identify the telemetry source. Usage records arrive from: product platform (most common), external metering service (Stripe Metering, Chargebee), data warehouse, or manual CSV. Schema and cadence define the ingestion.
  • Define the rating model. Tiered (different price per tier), volume (all units at the tier's price), overage (flat to cap, then per-unit), prepaid pool (drawdown) each have distinct configuration and testing needs.

Core Concepts

Consumption Schedule

A ConsumptionSchedule defines the rating rule: Type (Range or Slab), RatingMethod (Tier or Volume), and ConsumptionRate children with LowerBound, UpperBound, Price, PricingMethod. Attached to a Product2.

Usage records

UsageTransaction or UsageRecord (naming depends on release) carries quantity, timestamp, product, subscription. Rated into BilledUsage or an equivalent object on a scheduled cadence.

Rating and invoicing

Scheduled rating evaluates unrated usage against the Consumption Schedule, writes priced usage records, and feeds the invoice engine. Idempotency matters — re-running rating must not double-charge.

Prepaid pools

For "buy 1M API calls, drawn down monthly," a prepaid pool tracks balance. Usage decrements the pool; overage triggers a different rate. Uses SubscriptionUsageEntitlement patterns depending on release.

Common Patterns

Pattern: Tiered pricing with monthly invoice

Product has a Consumption Schedule with three tiers. Usage ingested daily from product telemetry via REST API. Nightly rating job converts unrated usage to priced usage. Month-end invoice run aggregates, posts, and emails.

Pattern: Prepaid pool with overage

Customer purchases a 10M-call annual bundle. Usage drains the pool across the year. At 100% consumption, overage rate kicks in. End of term: any unused balance is forfeited or carries forward per contract.

Pattern: Real-time usage visibility for customers

Customer portal LWC shows current month usage, remaining pool, and projected overage. Data comes from the aggregated UsageSummary object, not raw UsageRecord — same reason as rebate snapshots: performance and stability.

Decision Guidance

SituationRecommended ApproachReason
Flat per-unit pricingSimple Consumption Schedule, Range typeSimplest, well-supported
Discount tiers with cumulative volumeVolume rating methodAll units priced at top tier
Commit + overagePrepaid pool with overage rateMatches common SaaS contracts
Real-time customer dashboardUsageSummary rollup, not raw recordsPerformance
Usage from external meterIntegration via Bulk API or Platform EventsDecouples rating from source

Recommended Workflow

  1. Confirm Revenue Cloud license and usage-based entitlement; ensure Consumption Schedule objects are exposed.
  2. Model the product catalog: identify each metered product, its rating method, and pricing tiers.
  3. Build Consumption Schedules and attach to Product2 records; include effective-dated schedules for future price changes.
  4. Design the usage ingestion pipeline: schema, volume, cadence, idempotency, retry policy.
  5. Validate end-to-end with sample usage: ingest → rate → invoice → verify amounts against contract math.
  6. Build UsageSummary rollups; expose in customer portal with real-time (or near-real-time) totals.
  7. Build reconciliation and finance controls: invoice approval, GL mapping, dispute handling.

Review Checklist

  • Consumption Schedules validated against contract math
  • Usage ingestion idempotent across retries
  • Rating job tested with month-end volume
  • Overage and prepaid pool logic tested with edge cases
  • Customer-facing dashboard shows accurate usage vs entitlement
  • Finance approval and GL mapping in place
  • Dispute/credit process documented

Salesforce-Specific Gotchas

  1. Re-rating is easy to fire twice. Rating jobs that do not check IsRated / Rated flags will create duplicate priced records on retry; design idempotency explicitly.
  2. Consumption Schedule effective dating is strict. A mid-month price change requires a new schedule version with proper effective dates; retroactive changes re-rate the whole period.
  3. High-volume usage can overrun storage. Millions of UsageRecord rows balloon Salesforce storage; plan for archival (big objects or external warehouse) before go-live.

Output Artifacts

ArtifactDescription
Consumption schedule catalogPer-product rating rules and effective dates
Ingestion pipeline specSource, schema, cadence, idempotency controls
Rating + invoice runbookMonthly cycle procedure
Customer visibility componentLWC reading from UsageSummary

Related Skills

  • architect/revenue-cloud-architecture — upstream deal structure
  • admin/integration-pattern-selection — usage ingestion
  • data/data-archival-strategies — long-term usage archive

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

The English summary is being prepared. Showing the original description.

PranavNagrecha/AwesomeSalesforceSkills21Updated Oct 21, 2026

See all skills by PranavNagrecha

Report a problem with this skill