decision-tables

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

33|12|Updated Sep 24, 2024
One-click install
npx skills add https://github.com/bgaldino/rlm-base-dev --skill decision-tables-bgaldino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: decision-tables
Source: https://github.com/bgaldino/rlm-base-dev/tree/main/.cursor/skills/decision-tables
Command: npx skills add https://github.com/bgaldino/rlm-base-dev --skill decision-tables-bgaldino

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 in the quote. 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 gate builds. - Definition authoring and lifecycle: Create, update, activate, deactivate, and delete table definitions via Metadata XML or Tooling API, respecting the active-edit restriction. - Refresh and CSV upload: Trigger async refreshes through flows or REST, and load CsvUpload tables through the two-phase ContentVersion upload. - 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 the org. ## 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 check if Salesforce decision tables are stale?

Run the headless freshness check with cci task run check_decision_table_freshness against your org alias. It reports Fresh, Stale, Not comparable, or Unknown per table, and adding the strict parameter fails the build on any stale table.

How do I refresh a decision table in Salesforce Revenue Cloud?

Refresh via the refresh_all_decision_tables CCI flow, the Decision Table Manager component, Setup, or the RLM_Refresh_Decision_Tables_Bulk flow. The refreshDecisionTable action is asynchronous and invocable from Flow and REST only, not directly from Apex.

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

Decision tables are materialized caches that never re-read their source after refresh. If catalog, pricing, rate, or contract data changed after the last sync, the table is stale; run the freshness check and refresh before debugging anything else.

Can I update a decision table with Apex DML?

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 deactivate an Active table before modifying its definition.

How do I upload CSV data to a 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 and reports Completed, CompletedWithErrors, or Failed via uploadStatus.

When should a decision table refresh be triggered?

Fire the refresh when the table's source criteria become true, not when the triggering record is created. For example, if criteria filter on an activated contract status, refresh when the contract reaches that state, and avoid after-save flow faults rolling back the triggering DML.