Skip to main content

Connect Salesforce to Claude, ChatGPT and Copilot

Salesforce holds your opportunities, accounts, leads, cases and activities, with the stage history and forecast categories every pipeline review depends on. Nexatron reads Salesforce through its REST API with Salesforce OAuth, so every question runs as the Salesforce user who asks it.

Nexatron's hosted MCP server is listed in Claude's connector directory. ChatGPT and Microsoft 365 Copilot add the same server as a custom MCP connector. Connect Salesforce to your Nexatron workspace once, then ask from whichever assistant you use.

What you can ask​

  • What is open pipeline by forecast category for this fiscal quarter, in corporate currency?
  • What was our win rate on new-business opportunities closed last quarter, by segment?
  • Which opportunities over $50,000 have had no stage change in 30 days?
  • What did commit look like at the start of the quarter compared with today?
  • Which accounts have open high-priority cases and a renewal closing this quarter?
  • How many leads from last month's campaigns converted to opportunities?

Questions read Opportunity and OpportunityLineItem, OpportunityFieldHistory, Account and Contact, Lead and Campaign, Case, User and the custom objects and fields your org adds, from the org's own describe metadata. A question about a past date uses field history for fields Salesforce tracks, such as stage and amount, and the answer says when a field has no history and today's value was used.

Prerequisites​

  • A Nexatron workspace admin (the tenant_admin role) to add the connection.
  • A Salesforce administrator who can create an External Client App in your org.
  • Your org's My Domain URL (Setup ▸ My Domain, for example https://acme.my.salesforce.com).
  • A sandbox needs its own External Client App and its own Nexatron connection.

Admin setup​

The External Client App's callback URL includes the Nexatron connection's id, so save the connection first. The full steps are in Connect Salesforce.

  1. In Nexatron, go to Knowledge ▸ Sources and select New connection. Choose Salesforce, name the connection, tick Sandbox org for a sandbox, and enter your My Domain URL. Leave the consumer key empty, then select Continue and Connect.
  2. Open the connection's page and copy the redirect URL shown under "Connect your Salesforce account".
  3. In Salesforce Setup, open External Client App Manager and create an app with OAuth enabled. Paste the redirect URL as the Callback URL and add these OAuth scopes:
    • Manage user data via APIs (api)
    • Perform requests at any time (refresh_token, offline_access)
    • Access MCP servers (mcp_api)
    • cdp_query_api, only if your workspace answers from Data 360
  4. Tick Require Proof Key for Code Exchange (PKCE). Nexatron always uses PKCE. Requiring a secret for the web server flow is your choice.
  5. Copy the consumer key (and the secret, if you require one), edit the connection in Sources, paste it and save. A new app can take up to 30 minutes to become available.

To limit who can sign in, require a permission set in the app's OAuth Policies and assign it to the people who should use Nexatron.

How each person signs in​

Nexatron never uses a shared Salesforce login. Each person opens Knowledge ▸ Sources ▸ Your sign-ins, selects Connect Salesforce and authorizes Nexatron in Salesforce. From then on their questions run as their own Salesforce user. Nexatron keeps the sign-in encrypted and refreshes it on its own; when a refresh token expires, the person signs in again.

First question to try​

After you add Nexatron in Claude, ChatGPT or Copilot, ask:

What is open pipeline by forecast category for this fiscal quarter, in corporate currency?

The answer shows the definition it used, the Salesforce objects it read and the query, so you can check it against a report when it matters.

Writing back​

Unless your workspace admin has switched actions off, you can ask Nexatron to make changes in Salesforce:

  • Accounts: create one (salesforce.account.create), change a field (salesforce.account.update_field) or delete one (salesforce.account.delete).
  • Contacts: create one (salesforce.contact.create) or change a field (salesforce.contact.update_field).
  • Leads: create one (salesforce.lead.create), update several at once (salesforce.lead.bulk_update) or convert one (salesforce.lead.convert).
  • Opportunities: create one (salesforce.opportunity.create), advance its stage (salesforce.opportunity.advance_stage), close one (salesforce.opportunity.close) or close several at once (salesforce.opportunity.bulk_close).
  • Cases: open one (salesforce.case.create), change its status (salesforce.case.update_status) or close it (salesforce.case.close).
  • Tasks: create one (salesforce.task.create), complete one (salesforce.task.complete), complete several at once (salesforce.task.bulk_complete) or delete one (salesforce.task.delete).
  • Approvals: submit a record for approval (salesforce.approval.submit) or approve or reject a pending request (salesforce.approval.respond).
  • Automation and Chatter: run a Flow (salesforce.flow.invoke), run an invocable Apex action (salesforce.apex.invocable_invoke) or post to Chatter (salesforce.chatter.post).

Each request shows you a card first: what changes, what else it triggers (Flows, validation rules, assignment and approval rules) and a Confirm and run button. Nothing is written until you confirm, and the write runs as you, with your own Salesforce profile, permission sets and sharing. If you cannot edit a record in Salesforce, Nexatron cannot either. Nothing else is writable.

Permissions and masking​

Every question runs as the person who asks it. Salesforce applies their profile, permission sets, role hierarchy, sharing rules and field-level security, so a rep sees their deals and a manager sees their team's. Custom objects and fields follow the same field-level security as standard ones.

Nexatron's own rules under Settings ▸ Workspace ▸ Access (Access) can narrow that further. They never widen what Salesforce allows.

Troubleshooting​

SymptomCause and fix
Salesforce says redirect_uri_mismatchThe app's Callback URL must match the connection's redirect URL exactly. Each connection has its own: copy it again from the connection's page.
Nexatron says it could not start the OAuth flowThe consumer key has not been added to the connection yet. Edit the connection in Sources and paste it.
Salesforce says the app can't be foundWait up to 30 minutes after creating the app. For an app whose Distribution State is Local, the connection needs your My Domain URL.
Salesforce refuses the sign-in for some peopleThe app's OAuth Policies may require a permission set those people don't have.
Nexatron says Salesforce did not grant Data 360 query accessAdd the cdp_query_api scope to the app, then sign in again.