Skip to main content
The Salesforce integration creates a bidirectional pipeline between RecordEngine and your Salesforce org. Documents processed in RecordEngine are linked to Salesforce records, extracted data flows back to update Opportunities and Accounts, and your sales team gets a direct link from any Salesforce record to the full document in RecordEngine.

What the Integration Does

Link documents to Salesforce records

Pass a Salesforce Opportunity, Account, or Contact ID at upload time. The document is permanently associated with that CRM record and the reference travels through the entire processing pipeline.

Push extracted data to Salesforce

When a document is exported, an automation scenario reads the extracted fields and updates the corresponding Salesforce record — deal amounts, close dates, contact details, and any custom fields.

Post AI summaries as Chatter notes

The AI summary from each processed document is posted to Salesforce as a Chatter post or Activity Note on the associated record — giving your team instant context without opening RecordEngine.

Deep-link back to the document

The direct URL to each document in RecordEngine is stored on the Salesforce record. Your team jumps from an Opportunity straight to the full document, extracted fields, and approval status in one click.

How It Works — The Two Scenarios

The Salesforce integration uses two automation scenarios that work together: Scenario A — Salesforce → RecordEngine A trigger in Salesforce (stage change, new attachment, scheduled) causes a document to be uploaded to RecordEngine with the Salesforce record ID attached. Scenario B — RecordEngine → Salesforce When RecordEngine exports a document, the outbound webhook fires and an automation updates the corresponding Salesforce record with the extracted data.

Step 1 — Connect Salesforce in Your Automation Platform

Connect your Salesforce org using the native Salesforce connector in your automation platform. You’ll need:
  • Salesforce account with API access (Professional edition or above)
  • Admin or API-enabled user profile
  • OAuth connection authorised through your automation platform

Step 2 — Build Scenario A (Salesforce → RecordEngine)

This scenario uploads documents to RecordEngine automatically when triggered by a Salesforce event. Trigger: Salesforce — Watch Records (e.g. Opportunity Stage changed to “Proposal Sent”) Action 1: Salesforce — Get Related Files Retrieve any attachments linked to the triggering Opportunity. Action 2: Salesforce — Download Attachment Download the file content for each attachment. Action 3: HTTP — POST to RecordEngine Upload API
POST https://YOUR-INSTANCE/api/documents/upload
Authorization: Bearer YOUR_TOKEN
Content-Type: multipart/form-data

file: [downloaded file]
contact_id: [your default contact or mapped from Salesforce Account]
folder_id: [target folder ID]
profile_id: [extraction profile ID]
external_refs: {
  "salesforce": {
    "record_id": "{{opportunity.id}}",
    "record_type": "Opportunity",
    "record_url": "https://yourorg.salesforce.com/{{opportunity.id}}"
  }
}
Action 4: Salesforce — Update Opportunity Store the returned RecordEngine document_id on the Opportunity (in a custom field) so you can look it up later. Scenario A — Salesforce trigger to RecordEngine upload

Step 3 — Build Scenario B (RecordEngine → Salesforce)

This scenario receives the RecordEngine outbound webhook and updates Salesforce when a document is approved and exported. Trigger: Webhooks — Custom Webhook Copy the generated URL and paste it into RecordEngine Settings → Document Webhook URL. Action 1: Parse the incoming webhook payload Action 2: Salesforce — Update Record
  • Object: use external_refs.salesforce.record_type from the payload (e.g. Opportunity)
  • Record ID: use external_refs.salesforce.record_id
  • Map extracted fields to Salesforce fields (see field mapping table below)
Action 3 (optional): Salesforce — Create Note or Chatter Post
  • Set the body to ai_summary from the payload
  • Associate it with the record using the same record ID
Action 4 (optional): Salesforce — Update Custom URL Field
  • Map doc_url from the payload to a custom URL field on the Opportunity (e.g. RecordEngine_Document_URL__c)
Scenario B — RecordEngine webhook to Salesforce update

Salesforce Field Mapping Reference

RecordEngine fieldSalesforce fieldObjectNotes
total_amountAmountOpportunityStandard field
invoice_dateCloseDateOpportunityIf invoice date = contract date
vendorNameAccountFor vendor account lookup
invoice_numberCustom fieldOpportunityCreate Invoice_Number__c
currencyCurrencyIsoCodeOpportunityMulti-currency orgs only
ai_summaryNote / Chatter bodyAnyPosted as an Activity
doc_urlCustom URL fieldAnyCreate RecordEngine_Document_URL__c
confidence_scoreCustom number fieldAnyCreate RE_Confidence_Score__c
Salesforce custom field API names end with __c. To create a custom URL field on Opportunity: Setup → Object Manager → Opportunity → Fields & Relationships → New → URL field type.

Setting Up the Custom Fields in Salesforce

Create these two custom fields on your most-used object (typically Opportunity) to get full value from the integration: RecordEngine Document URL — stores the deep-link back to the document:
  1. Setup → Object Manager → Opportunity → Fields & Relationships → New
  2. Data Type: URL
  3. Field Label: RecordEngine Document
  4. Field Name: RecordEngine_Document (API name becomes RecordEngine_Document__c)
  5. Add to the Opportunity page layout
RecordEngine Confidence Score — stores the AI confidence for reporting:
  1. Repeat above with Data Type: Number, decimal places: 0
  2. Field Label: RE Confidence Score
  3. Field Name: RE_Confidence_Score (API name: RE_Confidence_Score__c)

Testing the Integration

1

Test Scenario B first

Use webhook.site temporarily as your webhook URL. Export a document in RecordEngine and inspect the exact payload — confirm all field names and the external_refs structure.
2

Switch to your automation platform

Replace the webhook.site URL with your automation platform’s incoming webhook URL. Re-export the same document and confirm the scenario executes without errors.
3

Verify the Salesforce update

Open the Salesforce Opportunity that was referenced in external_refs. Confirm the extracted fields updated correctly and the document URL is saved.
4

Test Scenario A

Trigger the Salesforce event (e.g. move an Opportunity to the watched stage). Confirm a document upload appears in RecordEngine within 30 seconds.

Troubleshooting

IssueFix
Salesforce record not updatingCheck external_refs.salesforce.record_id in the payload — it must be a valid 15 or 18-character Salesforce ID
INVALID_FIELD error from SalesforceThe field API name in your mapping is wrong — confirm it ends with __c for custom fields and matches exactly what’s in Salesforce Setup
INSUFFICIENT_ACCESS errorThe connected Salesforce user doesn’t have edit access to the record or field — check the user’s profile and field-level security settings
Note not appearing on recordConfirm the Note’s ParentId is set to the Opportunity/Account ID, not left blank
Webhook not firingConfirm the Document Webhook URL is saved in RecordEngine Settings and the document reached Export status (not just Approved)
For more help see Integration Troubleshooting.