decision-tables

Inspect, author, deploy, refresh, and verify Salesforce Revenue Cloud decision tables.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Decision tables are materialized lookups that never re-read their source data, so pricing can be correct in the data yet wrong at runtime. This Skill diagnoses stale lookups, refreshes them at the right moment, and manages the full definition lifecycle in Salesforce Revenue Cloud orgs. ## Core Features & Use Cases - Freshness Verification: Run headless freshness checks that report Fresh, Stale, Not comparable, or Unknown verdicts per table, with strict mode to fail builds on stale data. - Definition Authoring and Lifecycle: Create, update, activate, deactivate, and delete decision table definitions via Metadata XML or Tooling API, respecting the active-edit restriction. - CSV Data Upload and Refresh: Load rows into CsvUpload tables through a two-phase ContentVersion upload and trigger async refreshes with correct incremental and version handling. - Use Case: After loading new rate card entries, run the freshness check to find every table that went stale, refresh them, and confirm pricing matches the source data before releasing a quote. ## Quick Start Ask the agent to check decision table freshness in your Salesforce org and refresh any stale tables after your latest catalog or pricing data load.

Frequently Asked Questions about decision-tables

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

FAQPage Schema
How do I refresh a Salesforce decision table after a data load?

Run the CCI flow refresh_all_decision_tables against your org, or use the Decision Table Manager component for per-table refresh. Refresh must fire when the table's source criteria become true, not when the triggering record is created.

Why is my Salesforce pricing wrong when the source data is correct?

Decision tables are materialized caches that never re-read source data, so a stale table returns outdated rows. Run the check_decision_table_freshness task; a Stale verdict naming the object you edited confirms the cause, then refresh.

Can I update a decision table from Apex in Salesforce?

No. DecisionTable is a setup object and Apex DML on it is rejected at compile time, so the class will not deploy. Use Setup, the Metadata API, or the Tooling API, and bridge refreshes through a flow since refreshDecisionTable is Flow/REST-invocable only.

How do I upload CSV data to a Salesforce decision table?

Use a two-phase upload: insert a ContentVersion holding the base64 CSV, then POST its id to the table's Connect /file sub-resource. The upload appends asynchronously; wait for uploadStatus to reach Completed and dump rows back to detect silently dropped invalid rows.

Why can't I edit an active decision table definition?

Salesforce blocks in-place edits to Active tables with FIELD_NOT_UPDATABLE. Deactivate the table first, apply the definition change, then reactivate and refresh, running each lifecycle step as a separate command.

What does a Not comparable freshness verdict mean?

Not comparable is a refusal, not a failure: the check declined to guess because of an unreproducible source criterion, an uncheckable dependency, or a non-sObject source like CsvUpload. Only a Stale verdict is a positive finding; compare such tables by hand.