forcedotcom/sf-skills / skills/crm-analytics-wave-generate
crm-analytics-wave-generate
VerifiedUse to build a Wave Recipe, deploy a CRM Analytics dataset or dashboard, or author the full CRMA asset stack — apps, Wave Recipes (.wdpr), datasets, and dashboards — against a connected Salesforce org via REST and Metadata APIs, without CRM Analytics Studio or Dashboard Builder. TRIGGER when: user asks to build or create a Wave Recipe, generate a .wdpr or .wdpr-meta.xml, deploy a .wdash or .wapp, run a recipe or dataflowjob programmatically, upload CSV data via InsightsExternalData, validate a dataset schema with synthetic data, fetch dataset XMD, audit dashboard SAQL re-encoding, or find unused dataset fields. TRIGGER on keywords: Wave Recipe, CRMA, CRM Analytics, wdpr, wdash, wapp, WaveRecipe, Wave dataflow, dataflowjob, InsightsExternalData, SAQL, dataset XMD, Analytics Studio, R3 format, wave/recipes, wave/dashboards, or analytics on Salesforce objects (opportunities, leads, cases, accounts, sales). DO NOT TRIGGER for standard Salesforce reports or LWC components unrelated to CRM Analytics.
references/method-decision-tree.md
View on GitHub# Method Decision Tree
| Goal | Use | Why |
|------|-----|-----|
| Create a `WaveApplication` (app/folder) | Analytics REST `POST /wave/folders` | SFDX metadata deploy for WaveApplication is finicky and almost always fails; REST works in one call |
| Create a `WaveRecipe` that compiles and runs | Analytics REST `POST /wave/recipes?format=R3` with `recipeDefinition` in JSON body | Multipart upload creates the recipe but leaves it in `New` status with no `targetDataflowId` — it can never run |
| Run a recipe ("Run Now") | Analytics REST `POST /wave/dataflowjobs` with `{ dataflowId: targetDataflowId, command: "start" }` | `dataflowId` is the recipe's `targetDataflowId` (02K...), never the recipe id (05v...) |
| Upload CSV into a new or existing dataset | InsightsExternalData sObject API (header → parts → `Action=Process` → poll) | Only supported no-UI path; `sf data tree import` and generic bulk APIs don't produce Wave datasets |
| Call REST from a script | `curl` via `execSync` with `-s -w '\nHTTP_STATUS:%{http_code}'` (no `-f`) | `-f` swallows the response body on non-2xx; the status-suffix pattern surfaces the full error message |
| Bypass OAuth scopes for quick REST call | Apex `Http` callout via `sf apex run` using `UserInfo.getSessionId()` | Internal session bypasses External Client App scope restrictions — for diagnosis only |
| Deploy a modern grid dashboard | Metadata API: `sf project deploy start` for `.wdash` + `.wdash-meta.xml` | `POST /wave/dashboards` only creates retired classic dashboards (errorCode 264) |
| Enrich dashboard styling after deploy | `PATCH /wave/dashboards/{id}` with `{ state: <enriched state> }` | Deploy input rep is minimal; styling fields (`gridLayouts[].style`, `widgetStyle`) are only accepted at PATCH time |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |