---
name: salesforce-enrichment-loop
description: Build a scheduled enrichment loop against Salesforce, designed around the org rules that reject writes: validation rules, required fields, duplicate rules, triggers and the shared API allocation. Use when the user wants to enrich or maintain Salesforce records, or when a Salesforce write path keeps failing.
---

# The Salesforce data layer

> Generated from https://www.reversecontact.com/integrations-hub/workflows/salesforce-data-layer
> Every tier requirement and limit below was read from the vendor's own documentation on 2026-09-18.
> Vendors change these without notice. Re-check anything load-bearing before you rely on it.

**Tools in this workflow:** Salesforce, Clay, Reverse Contact.
**Build effort:** Days.

## What you are building

The same read, enrich, write, schedule loop as any CRM data layer, sequenced for an org that has opinions. You test the write path first, in a sandbox, with ten records, and design the table around what the org actually accepts.

## Ask this before writing anything

Does the edition include API access, and can you get a sandbox and an admin hour? API access is an edition feature: without it, none of this runs regardless of what else the user holds. And the slow parts of this project are the permissions, the sandbox and the change window, not the build. If the user cannot get those, say so at the start rather than after the table is built.

## Prerequisites

| What | Where to get it | Notes |
|---|---|---|
| A Salesforce edition with API access | Check the edition, not the feature list | This is a hard stop. Confirm it first. |
| A sandbox | The Salesforce admin | Non-negotiable. Do not test a write path in production. |
| An hour with the admin | Their queue | To read the validation rules, required fields and triggers on the objects you will write to |
| Reverse Contact API key | Workspace > API Keys | One call per gap row |

## The tools, and how to call them

### Reverse Contact

- **Base:** `https://api.reversecontact.com/v2`
- **Auth:** `Authorization: Bearer rc_your_api_key`. Keys are created in Workspace > API Keys.

| Call | Request | What it does |
|---|---|---|
| `POST /v2/enrich/persons` | `{ "email": "j.okafor@northwind.io" }` | Resolve a person from an email, a name plus company, or a profile URL. Cached resolution, returns in the response. |
| `POST /v2/enrich/companies` | `{ "domain": "northwind.io" }` | Resolve a company from a domain or a name. |
| `POST /v2/fetch/persons` | `{ "linkedInUrl": "..." }` | Standard profile lookup from the database. |
| `POST /v2/fetch/persons/live` | `{ "linkedInUrl": "..." }` | Live on-demand resolution. ASYNCHRONOUS: returns a webhookId to poll, not a record. |
| `POST /v2/search/people` | `{ "filters": { "currentCompanyDomain": "northwind.io" } }` | Filtered people search. 1 credit a profile delivered, and /v2/search/people/count is free. It replaced /v2/search/persons, which returns 410 Gone since 13 October 2026. |
| `POST /v2/search/organizations` | `{ "filters": { "companyDomain": "northwind.io" } }` | Filtered company search. A domain can also go straight to a company through POST /v2/enrich/companies, or through the enrich_company MCP tool since November 2026. |
| `POST /v2/contact/email` | `{ "linkedInUrl": "..." }` | Find an email. ASYNCHRONOUS: returns a taskId to poll. 3 credits for a professional address, 5 for a personal one, 8 for both, refunded when neither is found. |
| `GET /v2/webhooks/:webhookId` | - | Poll an async job until status is "succeeded". Polling is free and does not count against the rate limit. |

Response shape:

```json
{
  "success": true,
  "data": {
    "person": {
      "fullName": "Jane Okafor",
      "headline": "VP Sales at Northwind",
      "location": "London, United Kingdom",
      "linkedInUrl": "https://linkedin.com/in/...",
      "currentPosition": { "title": "VP Sales", "companyName": "Northwind", "startDate": "2023-04" },
      "emails": [], "experience": [], "education": [], "skills": []
    },
    "company": { "name": "Northwind", "domain": "northwind.io",
                 "industry": "Software Development", "employeeCount": 220 }
  },
  "error": null,
  "metadata": { "requestId": "req_...", "executionTimeMs": 480, "updatedAt": "2026-09-01T..." },
  "quotas": { "creditsConsumed": 1, "workspace": { "credits": { "total": 10000, "used": 4521, "left": 5479 } } }
}
```

**Rules that will cost you time if you skip them:**

- A miss returns **null**, not a best guess. Every response carries a confidence score, and you can raise the precision threshold on the request. Branch on it: do not treat a low-confidence answer as a match.
- Use the cached endpoints anywhere that must answer inside one HTTP request. The `/live` endpoints return a task and need polling.
- `quotas.workspace.credits.left` is on every response. Log it, or you will find out about the balance from a 402.
- Credit costs per call are published and a dollar rate per lookup is not: 2 credits for a reverse lookup from an email, 1 for a cached profile lookup, 2 for a live refresh, 3 for a business email and 20 for a direct phone number, with the last two charged only when one is found. Checks and the search count endpoint are free. Credit packs expire after 3 months. Do not hard-code a dollar cost assumption.

**MCP server:** `https://api.reversecontact.com/mcp`

- Auth: OAuth 2.1 where the client supports it, otherwise `Authorization: Bearer rc_your_api_key`.
- Tools: `enrich_person`, `enrich_person_live`, `enrich_company`, `enrich_company_live`, `search_persons`, `search_companies`, `check_usage`, `check_task`
- Streamable HTTP, JSON-RPC 2.0. The `_live` tools return a task id that `check_task` polls.

Docs: https://docs.reversecontact.com/getting-started

### Clay

- **Base:** `Configured in the table, not through an API`
- **Auth:** Per-integration, set in the workbook.

| Call | Request | What it does |
|---|---|---|
| `ACTION HubSpot / Salesforce Lookup` | - | Read-only. Pulls records into the table and changes nothing in the CRM. |
| `COLUMN HTTP API` | `POST https://api.reversecontact.com/v2/enrich/persons\nHeaders: { "Authorization": "Bearer rc_...", "Content-Type": "application/json" }\nBody: { "email": "/Work Email" }` | `/Work Email` is a column reference, so each row posts its own value. This is how a provider with no native listing becomes a column. |
| `ACTION HubSpot / Salesforce Update` | - | Writes back. Immediately live to every CRM user. Turn on "ignore blank values" and exclude rep-owned properties. |

**Rules that will cost you time if you skip them:**

- **Clay bills per action on the attempt, not the result.** Effective cost per filled field is the action rate divided by your match rate. Order a waterfall cheapest-first and use conditional runs so the expensive source only sees the residue.
- Import a filtered slice, never the whole portal. Filter on the gap you are filling.
- Run read-only until the columns look right, write to ten rows, open them in the CRM, and only then schedule.

Docs: https://university.clay.com/docs/hubspot-integration-overview

### Salesforce

- **Base:** `https://{instance}.my.salesforce.com/services/data/v60.0`
- **Auth:** OAuth 2.0 through a connected app. **API access is an edition feature**: editions without it cannot run any of this.

| Call | Request | What it does |
|---|---|---|
| `PATCH /sobjects/Contact/{id}` | `{ "RC_Title__c": "VP Sales" }` | Update a record. Custom fields carry the __c suffix. |
| `POST /composite/sobjects` | `{ "allOrNone": false, "records": [...] }` | Batch up to 200. `allOrNone: false` so one bad row does not roll back the batch. |
| `GET /query?q=SELECT+Id,Email+FROM+Contact+WHERE+Title=null` | - | SOQL for the filtered slice. |

**Rules that will cost you time if you skip them:**

- **Validation rules, required fields, duplicate rules and Apex triggers all apply to your writes.** A completed run is not a successful write. Read the per-record errors.
- **The daily API allocation is shared across the whole org**, set by edition and licence count. A row-by-row job competes with every other integration; the symptom of exhausting it is other people's integrations failing.
- Test in a sandbox with ten records before production. The rules you will hit were written years ago by somebody who has left.
- Installing anything usually needs Modify Metadata, Download AppExchange Packages and Customize Application. That is an admin on their own schedule.

Docs: https://developer.salesforce.com/docs/apis

## Build it

### 1. Read what the org enforces, before any table exists

Which fields are required, which validation rules fire on update, which triggers run, what the duplicate rules do. This is hour one and it determines everything after it. Teams that build first and discover the rules afterwards usually rebuild.

### 2. Query the gap with SOQL

A filtered slice, not a whole object. Count it before you spend anything.

### 3. Enrich

Identical to the HubSpot version: this step does not care what CRM is upstream of it.

### 4. Write ten records to the sandbox, then read every error

Not a hundred, not the whole slice. Ten. This is where you find the required field nobody documented and the validation rule written years ago by somebody who has left.

### 5. Batch the production write, with allOrNone false

Up to 200 per composite request, so one bad row does not roll back the batch, and so you are not spending the shared API allocation one row at a time.

### 6. Write to dedicated fields, promote separately, then schedule

Same rule as everywhere: custom `__c` fields nobody types into, promoted into the trusted fields only where empty. Then watch the API allocation for a week.

## Gotchas

- A completed run is not a successful write. Rejections are not always loud upstream. Alert on error rate, not on job completion.
- The daily API allocation is shared across the whole org. Exhausting it breaks other people's integrations, which is an unpopular way to be discovered.
- Budget elapsed time, not build time. The table is an afternoon; the sandbox, the admin hour and the change window are the two weeks.
- Clay still bills the attempt, and the temptation to pull a whole object is stronger on Salesforce than on HubSpot.

## What breaks, from the vendors' own docs

- **API calls are a shared allocation.** Salesforce meters daily API requests by edition and licence count, across every integration in the org. A large table writing row by row competes with your existing connectors for the same budget, and the symptom of running out is other people's integrations failing, which is an unpopular way to find out.
- **A completed run is not a successful write.** Rejections from validation rules and triggers are not always loud upstream. Check the error column every run for the first fortnight, and alert on error rate rather than on job completion.
- **Clay bills the attempt, not the result.** Same economics as everywhere else: effective cost per filled field is the action rate divided by your match rate. Filter the import tightly, because on Salesforce the temptation to pull a whole object is stronger.
- **You will need a sandbox and an admin.** Both are scheduling problems rather than technical ones, and both sit on somebody else's queue. That is why this workflow is days rather than hours, and almost none of it is build time.

## How to verify it works

- In the sandbox, write ten records and confirm zero errors before going near production.
- Deliberately violate a validation rule and confirm your error handling surfaces it rather than swallowing it.
- Check the org's API usage before and after a run, and extrapolate to the full schedule.
- Confirm no standard field changed, only the custom ones you created.
- Run the promote rule and confirm it filled only empty trusted fields.

## What this costs to run

| Component | Billing | What drives it |
|---|---|---|
| Salesforce | Edition with API access | API access is an edition feature. Without it, none of this runs regardless of what else you hold. |
| Clay | Per action | Rows imported multiplied by enrichment columns, charged on the attempt. |
| Reverse Contact | Per credit | One call per gap row, 2 credits for a reverse lookup from an email. No dollar rate per lookup is published. |
| Admin time | Days, elapsed | Sandbox access, a change window and an hour reading validation rules. The real timeline. |

Budget the elapsed time rather than the build time. The table is an afternoon. Getting a sandbox, an admin hour and a change window is the two weeks, and no amount of tooling shortens it.

## Sources

- Reverse Contact: https://docs.reversecontact.com/getting-started
- Clay: https://university.clay.com/docs/hubspot-integration-overview
- Salesforce: https://developer.salesforce.com/docs/apis
- This workflow, with the reasoning behind each step: https://www.reversecontact.com/integrations-hub/workflows/salesforce-data-layer

---

*Published by Reverse Contact, which appears in this directory as a data provider.
No other vendor pays for placement. Where a vendor publishes no public figure, this file says so
rather than estimating. Reverse Contact costs are stated in credits, which it publishes; no dollar
rate per lookup appears here, because none is published and dividing a pack price is not their number.*
