← Back to Playbooks
🔍

Document Your Salesforce Config

Document
⏱️ ~10 minutes per play

Salesforce orgs accumulate undocumented configuration over time: assignment rules, automation, CPQ logic, entitlement processes. Run one command to extract config and metadata into structured artifacts that AI can synthesize into documentation.

Example Prompt

Copy this prompt to Claude Code
Run the document_cpq play to extract our Salesforce CPQ configuration.

I need the full extract including legacy automation (workflow rules, process builder)
so we can audit what's actually in production before migration.
⚠️

The Black Hole Problem

Every Salesforce org has undocumented "black holes" — assignment rules, Process Builder flows, validation rules that nobody remembers creating. Autopilot Plays extract this config into machine-readable formats (CSV, JSON) plus narrative scaffolds that AI can synthesize into client-ready documentation.

Available Documentation Plays

📦

CPQ Configuration

Products, pricebooks, quotes, validation rules, flows. Detects SBQQ managed package.

g-gremlin autopilot play run document_cpq
👥

Lead Routing

Assignment rules, territories, queues, lead-related flows and triggers.

g-gremlin autopilot play run document_lead_routing
🎧

Case Routing

Case assignment, entitlements, SLAs, escalation rules, omni-channel config.

g-gremlin autopilot play run document_case_routing
🔄

Renewals Process

Contracts, assets, renewal opportunities, subscription objects.

g-gremlin autopilot play run document_renewals
💰

Revenue Process

Opportunity stages, forecasting config, approval processes, stage-related automation.

g-gremlin autopilot play run document_revenue_process

How Each Play Works

Six automated steps from org verification to documented artifacts.

1

Verify Org

Confirm connection to target Salesforce org via SF CLI

2
🔍

Extract Data

Pull records via SOQL (products, pricebooks, quotes, etc.)

3
📁

Retrieve Metadata

Fetch validation rules, flows, triggers from SF metadata API

4
📄

Build Inventory

Generate metadata_inventory.md summarizing what was extracted

5
⚠️

Flag Risks

Create risks_and_edge_cases.md with automated risk flags

6
📄

Document Gaps

Generate coverage_gaps.md listing what's NOT captured

How Claude Code Executes It

$ command
g-gremlin autopilot play run document_cpq -p include_legacy_automation=true

✓ Starting play: document_cpq (v1.1.0)

📋 planning

Verifying Salesforce org connection and extracting CPQ configuration...

$ command
g-gremlin sfdc query --soql "SELECT Id, Name, ProductCode, IsActive FROM Product2 LIMIT 1000"

✓ Extracted 847 products to products.csv

$ command
sf project retrieve start --metadata ValidationRule:Quote.* --output-dir metadata/

✓ Retrieved 12 Quote validation rules

$ command
sf project retrieve start --metadata Flow:*Quote* --output-dir metadata/

✓ Retrieved 8 Quote-related flows

$ command
g-gremlin sfdc describe --object SBQQ__Quote__c

✓ SBQQ detected: Salesforce CPQ managed package installed

✓ success

Play complete. Artifacts written to artifacts/document_cpq/20250110_120000/

The RevOps Win: Extract → Interrogate → Synthesize

Run the play, ask AI to find problems, then publish audience-specific documentation.

📁

1. Extract

Run the play to pull all config, metadata, and automation into structured artifacts

🔍

2. Interrogate

Ask AI to analyze what works well, what's broken, and where inefficiencies sit

📖

3. Synthesize

Generate audience-specific docs in Notion: Sales users, Admins, and a Roadmap

The RevOps Win: In 30 minutes, you go from "I have no idea how CPQ is configured" to three published documents stakeholders can actually use. Sales knows how to quote. Admins know what's configured. Leadership has a roadmap. You look like a hero.

Example Results

847
Products extracted
12
Validation rules
8
Flows retrieved
3
Legacy workflows

Try Documentation Plays

Start with the quickstart guide, then run documentation plays on your Salesforce org.