Salesforce Integration

Overview

Integrate Docsumo with Salesforce to automate document processing and streamline data extraction. This guide provides step-by-step instructions for installing the package, configuring settings, and troubleshooting issues.

Key Benefits

✅ Automated data extraction from invoices, receipts, and documents
✅ Direct sync with Salesforce Objects (Leads, Contacts, Accounts, etc.)
✅ Custom field mapping for tailored workflows
✅ Error handling and validation before data sync

For a step-by-step walkthrough for using Docsumo-Salesforce integration, watch this video:
Salesforce Usage in Docsumo

Prerequisites

Docsumo

  • Plan: Enterprise. Learn more.
  • Access:
    • Admin access to Docsumo Webhook & API settings.
    • A valid Docsumo API Key.
    • Ability to generate an Auth Token for webhook authentication.

Salesforce

  • Access:
    • Admin access to Salesforce Setup to install packages and configure permissions.
    • A Salesforce Site (required to receive webhook requests).
    • Permissions to modify Custom Metadata Types, Apex Classes, and Flows.

Step 1: Install the Docsumo Package

Click the link below to install the Docsumo package in Salesforce: Learn more about managing packages in Salesforce.

Install Package

  1. Log into Salesforce as an Admin.
  2. Click on the link above to install the package.
  3. Approve third-party access when prompted.

Once installed, verify the package from Setup and search Installed Packages.


Step 2: Manage Permissions & Access

Enable Site Access for Webhooks

  1. Go to Setup and click on Sites.
  2. Select an existing site or create a new one.
  3. Go to Public Access Settings then Apex Class Access.
  4. Grant access to DocsumoWebhookHandler.
  5. Click Save.

Configure Custom Metadata in Salesforce

  1. Go to Setup and then to Custom Metadata Types.
  2. Find Docsumo Config and create a new record (if not already present).
  3. Fill in the following details:
    • Label: docsumo
    • API Key: _Copy from Docsumo API settings_. More details in Step 3
    • Auth Token: Generate your own and insert it here (used for webhook authentication).
    • Base URL: https://app.docsumo.com
  4. Click Save.

Step 3: Configure Webhooks in Docsumo

  1. Go to Docsumo Webhook & API settings.

  2. Click Edit and enter the following details:

    • Webhook URL:

      • Find your Salesforce Site URL in Setup → Sites.

      • For example, the Salesforce Site URL will be something like this.

        https://<your-site-url>/services/apexrest/webhook-handler/
        
    • Headers:

      • Add a key x-custom-auth with the value as the Auth Token (saved in Salesforce Custom Metadata).
  3. Click Save.


Step 4: Run the Application in Salesforce

Option 1: Use the Salesforce search option

  1. Search for "Document AI" in the Salesforce search bar.
  2. Navigate to Leads Page and then to Document AI Leads Tab.
  3. You should see Docsumo Doc AI as an option.

Option 2: Customize in Leads Record Page

  1. Open any Leads record.

  2. Click on Settings then on Edit Page.

  3. Click the component where you want to add the Docsumo flow.

  4. Click Add Tab, Select Custom and Name it asDocument AI

  5. Select the Document AI Tab and Search for Flow in the left panel.

  6. Drag & drop the Flow Component into the Document AI section.

  7. Select DS Document Process Flow from the right panel. (Ensure the flow is active.)

  8. Click Save & Activate.


Troubleshooting & Common Issues

Issue 1: Document AI Tabs Not Visible

Cause: Incorrect homepage assignment.
Solution: Ensure you are accessing the Document AI application context in Salesforce.

For the same record, the Leads record page only showed the flow and related lists when opened from the context of the Document AI application.

When opened from the context of any other application, a different record page is shown.


Issue 2: Document Upload Flow Not Running

Cause: Flow is inactive or lacks access permissions.
Solution:

  1. Go to Setup → Flows.

  2. Search for Document Upload Flow.

  3. Click ⚙️ Dropdown → Edit Access.

  4. Grant access to required profiles.

Issue 3: Webhooks Not Working

Cause: Incorrect webhook URL or missing authentication.
Solution:

  • Verify that the Webhook URL is correctly entered in Docsumo.
  • Ensure the Auth Token matches the one in Salesforce Custom Metadata.

Should you have any questions or encounter any issues during the process, feel free to reach out to us at success@docsumo.com, and we'll be more than happy to help you.