Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Salesforce

Sync CRM context and query Salesforce read-only through the Modem Agent

The Salesforce integration syncs the CRM objects you choose into Modem and gives the Modem Agent read-only access to your Salesforce org. The agent can query CRM data alongside conversations and topics, then act through your other connected tools.

Prerequisites

  • Admin or Owner role in your Modem organization
  • A Salesforce administrator who can install the Modem managed package
  • A Salesforce user who can authorize the connection and access the objects and fields you want Modem to read
  • A production Salesforce org. Salesforce sandboxes are not supported yet.

Setup

Open the Salesforce integration

Go to Settings → Integrations → Salesforce in your Modem dashboard.

Install the Modem package

Click Install Modem package. Sign in to the production Salesforce org you want to connect, then have a Salesforce administrator approve the package installation.

You don’t need to copy an API key, client ID, or client secret into Modem.

Connect your Salesforce org

Return to the Salesforce integration page in Modem and click Connect Salesforce. Sign in as the Salesforce user Modem should use, then approve access.

We recommend a dedicated integration user with read-only access to only the objects and fields your team needs.

Confirm the connection

After authorization, Modem returns you to the integration page. A healthy connection shows Connected with your Salesforce instance hostname.

Choose objects to sync

Nothing syncs until you turn on at least one object. See What Gets Synced below.

What Gets Synced

Each object is opt-in. After connecting, turn on the objects you want in the Synced objects table on the Salesforce integration page. Nothing syncs until at least one object is enabled. Sync runs every 15 minutes. The first run after you enable an object starts its initial sync, and later runs pick up changes.

Area Objects
Core CRM Accounts, Contacts, Opportunities, Users
Commerce Contracts, Opportunity line items, Orders, Order items
Catalog Products, Price books, Price book entries
Billing Invoices, Invoice lines, Credit memos, Credit memo lines
Fulfillment Fulfillment orders

Not every Salesforce org has every object. Modem skips objects your org doesn’t have, such as the Revenue Cloud billing objects or Order Management’s fulfillment orders.

The sync is incremental and read-only. It does not create topics, fire automation triggers, or write changes back to Salesforce.

What the Agent Can Query

The synced objects provide CRM context inside Modem. The agent can also query Salesforce directly when you ask, including standard and custom objects that are queryable by the connected Salesforce user.

The agent can:

  • List queryable standard and custom objects
  • Inspect an object’s fields, picklist values, and relationships
  • Run read-only SOQL SELECT queries, including relationship fields and child queries
  • Fetch a record by its Salesforce object name and record ID
  • Combine Salesforce data with Modem conversations, topics, people, and companies
  • Act on the result through other connected tools, such as posting a summary or creating a ticket

The agent cannot create, update, or delete Salesforce records.

Example prompts

PromptWhich open opportunities belong to accounts that reported billing problems this month?
PromptShow opportunities closing this quarter with an amount over $50,000, grouped by owner
PromptWhat queryable Salesforce objects are related to renewals?
PromptSummarize recent feedback from accounts with open opportunities and post it to #sales

Access and Permissions

Salesforce’s permission model controls what Modem can read. If the connected user cannot query an object or field, neither the sync nor the agent can access it.

Use a dedicated integration user when possible. Grant it API access and read access only to the CRM data your team wants available in Modem. Modem stores the resulting OAuth tokens encrypted and refreshes them automatically.

Troubleshooting

Salesforce can't find the app during authorization

Install the Modem package before clicking Connect Salesforce. Confirm that you installed it in the same production Salesforce org you’re authorizing. Salesforce sandboxes aren’t supported yet.

Modem asks for additional scopes

Click Reconnect in the notice on the Salesforce integration page and approve the requested access. Reconnecting updates the authorization without duplicating synced records.

The integration shows 'Connection Error'

The settings page checks the connection regularly. If the error persists, disconnect Salesforce, reconnect it, and authorize with a user who still has API access. Contact support@modem.ai if reconnecting doesn’t restore a healthy connection.

New or changed records aren't visible yet

Salesforce records update about every 15 minutes, so recent changes may not appear immediately. Sync can also pause when the Salesforce org is close to its daily API limit. Confirm that the connected user can read the affected object and field, then check again after the next sync.

The agent can't find an object or field

Ask the agent to list Salesforce objects or describe the object first. If the object or field is missing, confirm that it is queryable and visible to the connected Salesforce user.

Disconnecting

To disconnect Salesforce:

  1. Go to Settings → Integrations → Salesforce
  2. Click Disconnect
  3. Confirm the disconnection

Disconnecting removes the connection from Modem and stops new data from syncing. Modem also asks Salesforce to revoke the authorization. The agent can no longer query the Salesforce org. Historical data remains in Modem after disconnecting.

Reconnecting the same Salesforce org resumes syncing where it stopped. To connect a different Salesforce org, disconnect first: Modem won’t replace an active connection with another org. The new org then syncs from the beginning, and records synced from the previous org stay in Modem.

Was this page helpful?