Skip to main content

Salesforce

Query and update Salesforce records - accounts, contacts, leads, opportunities and cases - as the user who signed in.

Connect it with: Sign in (OAuth). Salesforce's own documentation: https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_web_server_flow.htm&type=5.

What agents can do​

Connect Salesforce so the agents working your tasks can reach it. With it connected, they can:

  • Run SOQL queries, for example every open opportunity closing this quarter.
  • Create and update accounts, contacts, leads, opportunities and cases.
  • Read object and field metadata (describe calls) so new records match your org's required fields and picklists.
  • Attach notes and log activities against a record.

Before you start​

  • A Salesforce user with API Enabled in their profile or a permission set (Enterprise, Unlimited, Performance or Developer Edition; Professional Edition needs the API add-on).
  • If your org restricts which apps users may authorize, an admin who can approve the Jaah app.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Salesforce​

This is the quickest way in: you sign in to Salesforce and approve what Jaah asks for. You never copy a key.

  1. In Jaah, open Secrets and select New.
  2. Search for Salesforce and select its card.
  3. Give the secret a name you will recognize, such as the account or workspace it reaches, and choose who can use it (see Who can use it).
  4. Select Connect Salesforce. Salesforce's sign-in window opens.
  5. Sign in to Salesforce if asked, check the access listed, and approve it.
  6. You land back in Jaah on the new secret, which reads Connected once its test passes.

If the button reads Jaah app not configured, this Jaah has no app registered at Salesforce yet. Use your own OAuth app until it does (see Use your own OAuth app).

Scopes Jaah requests​

Jaah asks Salesforce for these scopes, and no others. A scope marked optional is a checkbox on the Connect screen: untick it and agents simply cannot do that part.

ScopeWhy Jaah asks for itRequired
apiRead and write your Salesforce data through the REST and SOAP APIsYes
refresh_tokenStay connected: lets Jaah renew access without asking you to sign in againYes
openidKnow who signed in: lets Test name the user and agents find the org's API addressYes

Connect with an API key​

Salesforce has no API key option in Jaah: connect with the sign-in above.

Use your own OAuth app​

Register your own OAuth app at Salesforce when your company requires apps it controls, or before this Jaah has an app registered there.

  1. Create an OAuth app in Salesforce's developer console, https://login.salesforce.com/lightning/setup/NavigationMenus/home (Salesforce's documentation).
  2. Set its redirect URI to https://app.jaah.ai/api/credentials/connect/callback (on your own Jaah, its console address followed by /api/credentials/connect/callback).
  3. Give it the scopes in Scopes Jaah requests.
  4. Copy its client ID and client secret.
  5. In Jaah, start a new Salesforce secret, select Use your own OAuth app, paste both values and select Connect Salesforce.

The client secret is stored with the connection, encrypted, like any other secret value.

Test the connection​

Select Test on the secret. Jaah calls Salesforce's API once (GET https://login.salesforce.com/services/oauth2/userinfo) with the stored values, and shows who it answered as, or which value Salesforce refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A signed-in connection hands the agent a live access_token, with access_token_expires_at. Jaah refreshes it before it expires, so an agent never handles a refresh token.

Tell the agent in your task description which secret to use, for example “use the Salesforce secret org/salesforce”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Reconnect: when Salesforce ends the grant (a password change, a revoked app, an expired refresh), the secret shows Needs reconnect. Select Reconnect and sign in again; agents get the new token on their next call.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Salesforce's side too, revoke Jaah in Salesforce's settings.

Limitations​

  • Agents act as the user who signed in and see only what that user's profile, permission sets and sharing rules allow.
  • Connect signs in through login.salesforce.com, so it reaches production and Developer Edition orgs; sandboxes (test.salesforce.com) cannot be connected yet.
  • Every API call counts against your org's daily API request limit, shared with your other integrations.
  • An agent learns the org's API address from the userinfo endpoint (urls.rest in its answer); the secret itself stores no instance URL.
  • Agents can do only what the connected Salesforce account and its granted scopes allow.

Troubleshooting​

The Salesforce window says OAUTH_APPROVAL_ERROR_GENERIC or that the user is not approved to access this app

Your org restricts app access. A Salesforce admin opens Setup > Connected Apps OAuth Usage, finds Jaah, selects Install, then sets Permitted Users to All users may self-authorize (or assigns the app to your profile).

Test says Salesforce rejected the access token (401) or the secret shows Needs reconnect

The refresh token was revoked, the user's password was reset with a policy that revokes tokens, or the user was frozen. Select Reconnect and sign in again.

An agent gets API_DISABLED_FOR_ORG or 'The REST API is not enabled for this Organization'

The org's edition or the user's profile has no API access. Ask your Salesforce admin to enable API Enabled on the profile or a permission set.

An agent gets REQUEST_LIMIT_EXCEEDED

The org's 24-hour API allowance is spent. Check Setup > Company Information > API Requests, Last 24 Hours, and spread heavy jobs out.

Still stuck? Select Test and read the result: it names the value Salesforce refused and the status it answered.

FAQ​

Can I connect a sandbox?

Not yet. Connect uses the production login address; a sandbox needs test.salesforce.com, which the Jaah app does not use today.

Does Jaah store my Salesforce password?

No. You sign in at Salesforce; Jaah keeps only the tokens Salesforce issues, encrypted, and renews them itself.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Salesforce account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.