Back to Playbooks

Salesforce L2A Governed Matcher

Private Beta
~45 min

Pre-conversion account context for Salesforce with discovery-first planning. Architect collects Lead and Account context, scout measures match health, and metadata-pack planning previews Gremlin-owned fields before any working-session writeback decision. The playbook below describes the current pilot surface; broader availability follows pilot feedback.

The Slack Message

VP
VP Revenue Operations10:14 AM

Our L2A field feeds assignment rules and territory. I don't trust it but I cannot touch it until we prove what changes if we do. Can you show me what Gremlin would do differently without writing anything, and let me approve before any field moves?

The Prompt

Kicked off from the terminal with mode and risk posture spelled out.

We have 50K open Leads in Salesforce and our incumbent L2A field (Account_Match__c) is feeding assignment rules. I don't know if I can trust it.

I need to:
1. Collect Lead and Account schema plus current match-health signals
2. Run AI-assisted L2A discovery against a 1K sample
3. Hand the RevOps team an evidence review package
4. After they sign off, plan Gremlin-owned fields and a governed writeback path in a sandbox

No OwnerId writes, no territory, no conversion. Nothing touches Account_Match__c until RevOps approves the writeback plan.

The risk surface is not the field — it is the automation

Writing a matched-account field can trigger assignment rules, record-triggered Flow, territory logic, and account-side updates. That is why the current motion starts with discovery, match-health telemetry, and metadata planning before a writeback path is chosen. Discover → scout → propose → plan → review. Nothing customer-owned changes from this playbook.

Core Workflow

Discover, scout, propose, plan, review. The first pass is about evidence, not writes.

1

Collect CRM Discovery

Use Architect discovery to collect Lead and Account describe JSON, sample unconverted leads, and environment context before designing automation.

2

Scout Match Health

Run the shipped lead_to_account_match_health scout to quantify match rate, unmatched count, and blocker classes before writing anything.

3

Evidence Review

Hand RevOps a working-session review artifact that maps sample rows to candidate accounts, blockers, and public decision-code taxonomy.

4

Plan Metadata Safely

Use Architect proposal plus metadata-pack planning to preview custom fields, validation rules, and permission sets in a sandbox.

5

Working-Session Handoff

Choose DIY-with-guides or DIY-with-working-session for governed writeback. Done-for-you Apex or Flow deployment is not part of this page.

After you paste this prompt, Claude Code:

"50K open Leads, incumbent field Account_Match__c feeds assignment rules. Start with verified Architect and scout surfaces: collect CRM context, measure L2A health, and keep the writeback decision out of the first pass."

"Step 1: initialize the L2A Architect project. Step 2: discover Lead and Account context. Step 3: run the L2A match-health scout. Step 4: propose the design. Step 5: plan metadata and review the writeback motion."

Running
$ g-gremlin autopilot architect init l2a_association_engine \ --variant salesforce \ -p target_sandbox=dev \ -p prod_org_alias=prod
Created Architect project arch_l2a7 for Salesforce L2A. Blueprint safety limits loaded: Lead/Account discovery, match-health scout, metadata-pack planning, and sandbox-first deployment review.

"The project now has the right blueprint. Discover collects the schema and sample rows the proposal will use; the scout measures actual match health separately."

Running
$ g-gremlin autopilot architect discover arch_l2a7
Collected Lead describe JSON, Account describe JSON, unconverted Lead count, and a sample of unconverted Leads with Id, Company, Email, Website, LeadSource, and Status. Wrote discovery.json with schema snippets and raw artifact paths.

"Now run the shipped L2A scout. This is health telemetry, not a hidden live write path."

Running
$ g-gremlin scout run lead_to_account_match_health \ --param lookback_days=30 \ --param match_rate_threshold=0.7 \ --format json \ --output l2a_match_health.json
Match rate 65.3% against the sample. Unmatched count 347. Blocker categories: missing_website=119, personal_email=78, normalization=42. The scout output is attached to the Architect discovery package.

Artifacts ready for RevOps: discovery.json, l2a_match_health.json, design.md, sample evidence-review table, metadata-pack plan input, and working-session notes for the governed writeback path.

The Disagreement Queue

This is what RevOps sees. Each row carries a decision code, candidate account, and the incumbent value. Operators mark rows for apply or escalate them to manual review.

lead_idemailgremlin_decision_codeexisting_field_valueagreementoperator_action
00Q5g000011AAA1ops@finch.coL2A_SAFE_EXACT_DOMAIN_SINGLE_ACCOUNT001xx000003DEF9disagreeapply_gremlin_match
00Q5g000012BBB2jane@acme.comL2A_REVIEW_DOMAIN_MULTI_ACCOUNT001xx000003ABC1disagreemanual_review
00Q5g000013CCC3sam@banner.healthcareL2A_SAFE_KNOWN_ACCOUNT_MAP_SINGLE_ACCOUNTnulldisagreeapply_gremlin_match
After you paste this prompt, Claude Code:

"RevOps reviewed the discovery package. They want Gremlin-owned fields, not a blind overwrite of Account_Match__c. Next step is metadata-pack planning, then a working-session decision on the writeback path."

Running
$ g-gremlin autopilot architect propose arch_l2a7
Proposal generated from discovery.json, scout output, CRM context, parameters, and blueprint safety limits. Wrote design.md plus a proposed metadata-pack shape for Gremlin-owned fields and review workflow.

"The proposal is ready for a working session. Review the candidate fields, map decision-code taxonomy to the customer process, and plan the metadata pack before any live writeback."

Running
$ g-gremlin sfdc metadata-pack plan \ ./artifacts/l2a_association_engine/metadata_pack \ --org-alias dev
Plan complete for sandbox org dev. Components: Gremlin_Matched_Account__c, Gremlin_Decision_Code__c, Gremlin_Match_Status__c, permission set, and validation guardrails. No production deploy requested.

Handoff package complete. Account_Match__c remains untouched; the customer has a discovery artifact, metadata-pack plan, and explicit next-step motion instead of an unverified command-only apply.

Safety Guarantees

Discovery and proposal steps are read-only against Salesforce data.
Metadata-pack planning previews generated fields, validation rules, and permission sets before deploy.
Customer-owned match fields stay untouched unless a separate working session approves writeback.
Any selected writeback path is Lead-only by design: no Account, Contact, Opportunity, Case, or OwnerId.
Sample decision codes are a public review taxonomy unless wired into a customer implementation.
Always-on deployment is customer-managed; this playbook does not promise trigger-time routing.

What This Playbook Will NOT Do

Non-goals are enforced by the CLI, not just documented. Any drift into these lanes moves the product from governed matcher to routing platform.

No OwnerId writes, no territory writes
No lead status mutation, no lead conversion
No Account, Contact, Opportunity, or Case writes
No Apex deployment, no Flow deployment
No auto-deploy of AI-generated metadata
Will not overwrite non-empty customer-owned shared fields by default
Will not silently auto-resolve ambiguity with fuzzy or AI reasoning
Will not promise real-time in-org trigger behavior

Requirements

Salesforce Connected App

Read Lead and Account for discovery; writeback requires a separately approved path

Required

Gremlin CLI discovery surfaces

autopilot architect, scout run, and sfdc metadata-pack

Required

Architect project artifacts

discovery.json, scout output, proposal, and metadata-pack plan inputs

Required

Working-session approval

Required before live backfill, writeback, or customer-managed deployment

Required

Results

1,000
Leads sampled
2
Objects described
14
Discovery findings
0
Live writes
Incumbent routing field untouched

Account_Match__c remained read-only; no assignment-rule side effects fired.

Full audit trail

discovery.json, scout output, and the metadata-pack plan keep the design reviewable before a writeback path is selected.

Request pilot access

The discovery-first Salesforce L2A workflow is in private beta with a limited pilot cohort. Start conversations with g-gremlin autopilot architect init l2a_association_engine against a sandbox context; discovery and match-health telemetry carry the story before any field is touched.

Related: Salesforce Lead-to-Account Matching guide · LeanData vs audit-first L2A · Salesforce dedupe playbook