CRM

Salesforce Pre-Insert Dedupe Guard via Postgres Canonical Index

Before a new Salesforce lead is created, checks it against a Postgres canonical-identity index and blocks the insert when a confident duplicate exists.

CategoryCRM
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInbound lead webhookHTTP webhook
  • ActionQuery Postgres canonical identity indexPostgreSQLPostgres
  • LogicClassify match: exact, borderline, or new
  • ActionLink to existing or create new Salesforce leadSalesforce
  • ActionRegister new identity in PostgresPostgreSQLPostgres
  • OutputRoute borderline cases to Slack for decisionSlack

What it does

Acts as a guard in front of Salesforce lead creation. Each inbound lead is checked against a Postgres index of canonical contact identities. Confident duplicates are blocked and linked to the existing record; borderline matches are held for a human decision.

When to use it

Use this when you want to stop duplicates at the source rather than cleaning them up later, and you maintain a fast Postgres identity store keyed on normalized email and phone hashes.

How it works

  1. 1A new lead webhook from your form or enrichment tool triggers the flow.
  2. 2The flow normalizes the email and phone and queries the Postgres canonical index for matches.
  3. 3A logic step splits the result: exact or high-confidence match, fuzzy borderline, or no match.
  4. 4High-confidence matches are appended to the existing Salesforce record and the new insert is skipped.
  5. 5No-match leads are created in Salesforce and registered in the Postgres index.
  6. 6Borderline cases post to Slack for an approve-or-create decision before either path executes.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SalesforceAccounts, opportunities, cases.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Connect HTTP webhookTrigger any URL on agent actions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.