Install
$ agentstack add skill-arohitu-salesforce-revenue-cloud-skills-revenue-cloud-decision-table ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Revenue Cloud Decision Table
Use this skill to find a Salesforce Revenue Cloud Decision Table, determine the inputs needed to invoke it, collect missing runtime values, and verify what the table returns from the org.
Default Workflow
- Identify the target org alias or username. If missing, ask for it or use the Salesforce CLI default org only after saying so.
- Find the Decision Table Id from the user's table name, developer name, label, pricing component, or business scenario.
- Inspect the table metadata and parameters to identify input fields, output fields, operators, and whether a dataset link name is required.
- Build a
conditionspayload. If runtime values are missing, ask the user for only the missing input values; otherwise infer them from provided quote/order/product/pricing context. - Invoke the table through the Connect REST API and report the returned
outcomeList[].values,outcomeType,successStatus, and any errors. - Compare the outcome with the user's expected pricing behavior and call out mismatched inputs, wrong dataset link, inactive table, stale refresh status, or auth problems.
Helper Scripts
The scripts require Salesforce CLI sf, jq, and an authenticated target org.
scripts/find-decision-table.sh: finds candidate Decision Tables by search text or developer name.scripts/inspect-decision-table-inputs.sh: queriesDecisionTableParametermetadata and emits a payload skeleton withnullvalues for inputs the agent must fill.scripts/invoke-decision-table.sh: usessf org displayto get the org instance URL and access token, then posts a payload to the Decision Table invocation endpoint.
Run scripts from this skill folder or pass their full path:
.cursor/skills/revenue-cloud-decision-table/scripts/find-decision-table.sh --target-org --search "Volume"
.cursor/skills/revenue-cloud-decision-table/scripts/inspect-decision-table-inputs.sh --target-org --decision-table-id 0lD...
.cursor/skills/revenue-cloud-decision-table/scripts/invoke-decision-table.sh --target-org --decision-table-id 0lD... --payload-file payload.json
Never write real access tokens to files or include them in final answers.
Finding The Decision Table Id
Use the script first when Salesforce CLI access is available:
scripts/find-decision-table.sh --target-org --search ""
If scripting is not available, use SOQL:
SELECT Id, DeveloperName, MasterLabel, Type, Status, SourceObject,
ExecutionType, UsageType, RefreshStatus
FROM DecisionTable
WHERE DeveloperName = ''
For fuzzy discovery, search DeveloperName and MasterLabel with LIKE. Confirm:
Idis the runtime id used in the URL.Statusis active for runtime pricing.UsageTypeandTypematch the pricing/business scenario.RefreshStatusindicates data is usable.SourceObjectmatches the expected backing table data.
Identifying Inputs
Use:
scripts/inspect-decision-table-inputs.sh --target-org --decision-table-id
Read the returned suggestedPayload. Replace every null value with a runtime value. If the script cannot classify parameters cleanly, inspect parameters and ask the user for values for input-like fields. Use the source quote, order, product, price book, pricing scheme, quantity, tier, and attribute values when the user already provided them.
Request only the missing values, for example:
I found RCA_VolumeBasedPrices with these required inputs:
RCA_BundleProduct__c, RCA_ComponentProduct__c, RCA_PriceBook__c, RCA_PricingScheme__c, RCA_LowerBound__c, RCA_UpperBound__c.
Please provide values for RCA_ComponentProduct__c and RCA_PriceBook__c.
Invocation Endpoint
Use Decision Table Invocation unless the user specifically asks for the legacy lookup endpoint:
POST https://.salesforce.com/services/data/v66.0/connect/business-rules/decision-table/lookup/
Authorization: Bearer
Content-Type: application/json
Use API version 58.0 or later; prefer the org's current supported version. The legacy Decision Table Lookup resource is:
POST /services/data/v55.0/connect/business-rules/decision-table/
Payload Pattern
{
"datasetLinkName": "RCA_VolumeBasedPrices_Default",
"conditions": [
{
"conditionsList": [
{
"fieldName": "RCA_BundleProduct__c",
"value": "01tVc00000CojkbIAB",
"operator": "Equals"
},
{
"fieldName": "RCA_LowerBound__c",
"value": 5,
"operator": "GreaterOrEqual"
},
{
"fieldName": "RCA_UpperBound__c",
"value": 5,
"operator": "LessThan"
}
]
}
]
}
Rules:
conditionsis required.datasetLinkNameis optional, but include the dataset link API name when the table uses one. Common naming is_Default; verify where possible.fieldNamemust match the Decision Table input field API name.valuemust use the correct JSON type: numbers unquoted, booleans as booleans, strings quoted.operatoris optional and overrides the table's configured operator when supplied.- Add
sourceObjectwhen a dataset link maps multiple source objects and the field is ambiguous.
Common operators: Equals, NotEquals, GreaterThan, GreaterOrEqual, LessThan, LessOrEqual, Matches, ExistsIn, DoesNotExistIn.
Verify The Return
After invoking, inspect:
{
"errorCode": null,
"errorMessage": null,
"outcomeList": [
{
"values": {
"RCA_UnitPrice__c": "23043.04"
}
}
],
"outcomeType": "Single Match",
"successStatus": true
}
Some invocation responses wrap outcomes in outputs[]; handle both a direct Decision Table Outcome and an outputs array. Treat outcomeList[].values as the returned table outputs.
Report the verification as:
Decision Table: (``)
Inputs tested:
Outcome type:
Returned values:
Status:
Troubleshooting
For INVALID_AUTH_HEADER:
- Confirm the actual HTTP header is
Authorization: Bearer. - Replace placeholders such as
{{your_access_token_here}}; do not include braces in the header value. - Ensure the token belongs to the same Salesforce instance used in the request URL.
- Refresh expired tokens and confirm the user has API and Decision Table access.
For no match or wrong match:
- Confirm the Decision Table is active and refreshed.
- Verify
datasetLinkNameis an API name, not a label. - Check input field API names, operators, value types, and source object mapping.
- For ranges, validate inclusive/exclusive operator pairs such as
GreaterOrEqualwithLessThan. - Compare the API payload to runtime pricing context values after hydration, Apex hooks, attribute flattening, and formula preparation.
Apex Alternative
Inside Salesforce Apex, use ConnectApi.DecisionTableInput, add ConnectApi.DecisionTableCondition values, optionally set input.datasetLinkName, and call:
ConnectApi.DecisionTableOutcome output =
ConnectApi.DecisionTable.execute(decisionTableId, input);
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: arohitu
- Source: arohitu/salesforce-revenue-cloud-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.