context-service

Inspect, author, deploy, and debug Salesforce Revenue Cloud Context Definitions and runtime instances.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Salesforce Revenue Cloud Context Definitions are the canonical data layer that pricing, expression sets, the configurator, DocGen, and billing bind to at runtime, but authoring, extending, activating, and debugging them involves a confusing split between Connect API and SObject REST endpoints, version-level activation rules, and request-scoped runtime instances. This Skill guides an AI agent through those operations safely, with preflight validation, per-endpoint behavior matrices, and live-verified gotchas. ## Core Features & Use Cases - Design-time authoring and lifecycle: Extend standard contexts, apply additive attribute/tag/mapping plans, create custom definitions, and manage activation, versioning, and release upgrades via CCI tasks and helper scripts. - Runtime instance debugging: Build hydration payloads, hydrate context instances from live records, query values by tag, and persist changes back to mapped SObjects, with guidance on the Apex/Flow path required on GA orgs. - Inspection and drift management: Describe, trace, diff, export, and patch context definitions across orgs using read-only scripts before mutating anything. - Use Case: You need to surface a new custom field to a pricing procedure. The Skill walks you through adding an attribute plus tag plus mapping to the extended Sales Transaction context, linting the plan offline, dry-running it against the org, and verifying the result with describe_context.py. ## Quick Start Ask the agent to inspect the RLM_SalesTransactionContext definition in your org and explain how its nodes, attributes, tags, and mappings relate before making any changes.

Frequently Asked Questions about context-service

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

FAQPage Schema
How do I extend a Salesforce Revenue Cloud context definition?▼

Use the extend_context_* CCI tasks or the generic extend_standard_context task with a name and baseReference. Extending a standard base preserves mandatory mappings and keeps Sync upgrades working across releases, unlike cloning.

How do I add a custom field to a pricing context in Revenue Cloud?▼

Add an attribute plus a tag plus a mapping rule to the existing node via an additive plan, then apply it with manage_context_definition. Lint the plan offline with validate_context_plan.py and dry-run before mutating the org.

Why does deactivating a context definition fail with RECORD_UPDATE_FAILED?▼

Deactivation is blocked while an active consumer such as an ExpressionSet, ContextRules, PricingActionParameters, or a decision table references the definition. Query ExpressionSetDefinitionContextDefinition to find wired expression sets, unlink or deactivate consumers first, then deactivate.

Can I use the Context Service runtime REST API on a normal GA org?▼

Not for the full lifecycle. query-record and query-tags are pilot-gated, and a REQUEST-scoped contextId does not survive across separate calls. On a GA org, drive hydrate, query, and persist in one Apex transaction using Context.IndustriesContext or one Flow.

Why does context hydration return zero records with isSuccess true?▼

The businessObjectType in the data payload must be the mapped SObject name such as Quote, not the context-node name such as SalesTransaction. A node-name value silently hydrates zero records; build_hydration_data.py emits the correct mapped name.

What are the limits for nodes and attributes in a context definition?▼

The offline validator enforces at most 30 nodes per definition, 50 attributes per node, 250 total attributes, and hierarchy depth of 5. Salesforce Help quotes higher ceilings, so flag the discrepancy when it matters.