-> back to projects

Case Study

public case study

GTM data hygiene framework

A Salesforce-centered contact data hygiene architecture that used Clay as an enrichment and automation layer while keeping Salesforce as the system GTM teams depended on for clean, usable contact records.

STAR framing

Situation

GTM teams needed cleaner Salesforce contact records for routing, follow-up, segmentation, and outbound workflows.

Task

Build a reliable way to send eligible Salesforce contacts to Clay for enrichment workflows without giving sales users direct callout access.

Action

Designed an async Salesforce architecture using Flow, Apex, Platform Events, Queueables, Named Credentials, retries, and send-stamping.

Result

Supported fresher Salesforce contact data and helped reduce org-wide bounce rates by 50%+.

Architecture

The design separated the sales-user action from the external callout. Users triggered a Flow, but webhook delivery ran asynchronously through an automated process with the right credential access.

Problem

  • Salesforce needed cleaner contact and account context to support reliable GTM execution.
  • Clay needed normalized Salesforce context to run enrichment workflows against eligible records.
  • Sales users should not need direct access to webhook credentials or external callout permissions.
  • Inbound contacts needed to be excluded from this outbound enrichment path.
  • Repeated edits needed idempotent send logic so Clay received fresh data without noisy duplicates.

System

contact save
->
eligibility check
->
event publish
->
payload build
->
send stamp

When a non-inbound Contact was created or updated, an async Salesforce Flow invoked Apex to publish a Platform Event. A subscriber running as Automated Process enqueued a Queueable job, queried Contact and Account context, built a normalized JSON payload, sent it to Clay through a Named Credential, and stamped the Contact after success so Salesforce retained an auditable enrichment handoff state.

What I built

  • Designed the Salesforce-to-Clay handoff using Flow, Apex, Platform Events, and Queueables.
  • Defined entry rules based on source and last-send timestamp to prevent irrelevant or stale sends.
  • Built a normalized payload pattern for Contact and Account context, including LinkedIn and website fields.
  • Separated permissions so sales users triggered the workflow while Automated Process owned callouts.
  • Added retry behavior for transient errors and logging patterns for send attempts, successes, and failures.

Operational safeguards

  • Retries up to three times for rate limits and transient server errors.
  • No retry for validation-style 4xx errors, which are logged for investigation.
  • Idempotent send behavior using contact identity, modification time, and last-send stamping.
  • Monitoring through recent-send list views, automated-process trace flags, and optional failed-send queueing.

Outcome

By improving the handoff between Salesforce and Clay enrichment workflows, the initiative helped reduce bounce rates across the organization by 50%+ while giving GTM teams more trustworthy contact data to work from.

Public-safe note

This case study abstracts the implementation and uses sanitized field examples. It does not include customer records, endpoint URLs, secrets, internal object IDs, proprietary Clay table logic, or private Salesforce configuration.