revenue-cloud-pricing-diagnostics
Installation
SKILL.md
Revenue Cloud Pricing Diagnostics
Use this skill to analyze Salesforce Revenue Cloud pricing implementations on core Salesforce Revenue Cloud / Agentforce Revenue Management. This is not Salesforce CPQ / Steelbrick CPQ. Do not start from SBQQ__* objects, CPQ price rules, product rules, or quote calculator plugins unless the user is explicitly asking about Salesforce CPQ instead of Revenue Cloud.
Default Workflow
When the user asks how a pricing field is populated, why a price changed, or how pricing logic works:
- Identify the commercial object and field: Quote, Quote Line, Order, Order Item, Contract, Asset, or another mapped object. In an SFDX project, fields are usually under
force-app/main/default/objects/<ObjectApiName>/fields/<FieldApiName>.field-meta.xml. Inspect XML tags such as<fullName>,<type>,<formula>,<formulaTreatBlanksAs>,<precision>,<scale>, and<required>. - Read the field metadata. Determine whether it is stored, formula, standard, custom, read-only, or calculated elsewhere. If the field is a formula, trace the fields referenced in
<formula>before assuming pricing writes to it directly. - Find matching context attributes and context tags in context definitions. In SFDX source, these are usually under
force-app/main/default/contextDefinitions/*.contextDefinition-meta.xml. Inspect<contextNodes>,<contextAttributes>,<title>,<dataType>,<fieldType>,<transient>, and<contextTags><title>.... - Inspect context mappings for both hydration and persistence in the same context definition metadata. Look under
<contextMappings>,<contextMappingIntents><mappingIntent>,<contextNodeMappings>,<contextAttributeMappings>,<contextAttrHydrationDetails>,<objectName>,<queryAttribute>,<contextAttribute>,<contextInputAttributeName>,<contextNode>, and<object>. - Trace bidirectionally between sObject fields and pricing tags. If a pricing step writes to a tag such as
EffectiveFromorEffectiveTo, find the context attribute that owns that tag, confirm it isinputoutputor output-capable, then trace its persistence mapping back to the target sObject field. Do not conclude a field is read-only to pricing until the save/writeback mapping has been checked. - Search expression set versions for the context tag, variable, output parameter, assignment, formula, aggregation, list operation, matrix lookup, or stop-pricing step. In SFDX source, pricing procedures are usually under
force-app/main/default/expressionSetVersion/*.expressionSetVersion-meta.xml. Inspect<variables>,<name>,<input>,<output>,<dataType>,<steps>,<actionType>,<customElement>,<parameters>,<sequenceNumber>,<parentStep>, and<stepType>. - Inspect pricing elements and decision table references. Decision tables are usually under
force-app/main/default/decisionTables/*.decisionTable-meta.xml, with dataset links underforce-app/main/default/decisionTableDatasetLinks/*.decisionTableDatasetLink-meta.xml. Confirm<decisionTableParameters>,<fieldName>,<usage>,<operator>,<sequence>,<isRequired>, condition criteria, outputs, backing object/source, and active status. - Identify procedure-plan sequence when available. Procedure-plan deployable metadata may not exist in source; if absent, query the org for
ProcedurePlanDefinition,ProcedurePlanDefinitionVersion,ProcedurePlanSection, andProcedurePlanOption. Apex hooks referenced by procedure plans are usually underforce-app/main/default/classes/<ClassName>.cls. - Produce a lineage report with evidence, likely failure points, and focused next checks.