Document Your Salesforce Config
DocumentSalesforce 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.
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_cpqLead Routing
Assignment rules, territories, queues, lead-related flows and triggers.
g-gremlin autopilot play run document_lead_routingCase Routing
Case assignment, entitlements, SLAs, escalation rules, omni-channel config.
g-gremlin autopilot play run document_case_routingRenewals Process
Contracts, assets, renewal opportunities, subscription objects.
g-gremlin autopilot play run document_renewalsRevenue Process
Opportunity stages, forecasting config, approval processes, stage-related automation.
g-gremlin autopilot play run document_revenue_processExample Prompt
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.
How Each Play Works
Verify Org
Confirm connection to target Salesforce org via SF CLI
Extract Data
Pull records via SOQL (products, pricebooks, quotes, etc.)
Retrieve Metadata
Fetch validation rules, flows, triggers from SF metadata API
Build Inventory
Generate metadata_inventory.md summarizing what was extracted
Flag Risks
Create risks_and_edge_cases.md with automated risk flags
Document Gaps
Generate coverage_gaps.md listing what's NOT captured
"Verifying Salesforce org connection and extracting CPQ configuration..."
Play complete. Artifacts written to artifacts/document_cpq/20250110_120000/
Output Structure
artifacts/document_cpq/20250110_120000/org_info.jsonConnected Salesforce org detailsmetadata_inventory.mdSummary of all extracted data and metadatafinal_doc.mdDocumentation skeleton for AI synthesisrisks_and_edge_cases.mdAutomated risk flags and data quality checkscoverage_gaps.mdWhat's NOT captured by this playrun_summary.jsonMachine-readable execution log with step resultsproducts.csvProduct catalog (max 1000 records)pricebook_entries.csvPricebook entries (max 2000 records)metadata/Retrieved SF metadata (flows, validations, triggers)Example Results
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.
Analyze the CPQ artifacts in ./artifacts/document_cpq/20250110_120000/ Tell me: 1. What's working well in our CPQ setup? 2. What's broken or misconfigured? 3. Where are the inefficiencies that slow down sales? 4. What validation rules are too strict or too loose? 5. Are there orphaned products or unused pricebooks?
Based on your analysis, create three Notion documents using g-gremlin docs publish: 1. **CPQ Guide for Sales** — How to create quotes, common errors, tips for faster approvals 2. **CPQ Admin Reference** — Validation rules, automation, pricebook structure, known issues 3. **CPQ Improvement Roadmap** — Key fixes needed to make quoting faster, more resilient, and easier for sales Publish all three to Notion with g-gremlin docs publish.
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.
Optional Extraction Flags
New in v1.1: Enable additional extraction with parameter flags.
-p include_legacy_automation=trueExtract Workflow Rules and Process Builder metadata-p include_apex=trueRetrieve Apex triggers and classes (large extraction)-p include_permissions=trueRetrieve Permission Sets, Profiles, and Sharing RulesTry Documentation Plays
Start with the quickstart guide, then run documentation plays on your Salesforce org.