Aijency Help
IntegrationsSalesforce

Set up your Salesforce app

The full walkthrough for creating the External Client App in Salesforce and copying its credentials into Aijency.

All Aijent plans Beta

Salesforce is the one integration you connect using your own app rather than a single click. You create an External Client App inside your Salesforce org, turn on OAuth with two scopes, copy the Consumer Key and Consumer Secret into Aijency, then select Connect. You need System Administrator rights, or any role that can customise applications and manage connected apps.

This is the walkthrough your dashboard links to from the credentials screen. Work through it once, and your Salesforce is connected from then on.

If you want to know what your Aijent actually writes into Salesforce, that is on Connect Salesforce instead.

Before you begin

  • Who can do this: a System Administrator, or any role with Customize Application and Manage Connected Apps.
  • What you are creating: an External Client App inside your own Salesforce org. It lives in your org, you own it, and you can revoke it at any time.
  • What you will need afterwards: two values, a Consumer Key and a Consumer Secret, which you paste into Aijency.

Why this one is not a single click

Every other CRM connects through an app Aijency has published. Salesforce is connected through an app you create in your own org, which is why it takes longer and why your dashboard labels it a beta.

Step 1. Open External Client App Manager

  1. Log in to your Salesforce org.
  2. Select the gear icon at the top right, then Setup.
  3. In the Quick Find box at the top left of Setup, type External Client Apps.
  4. Select External Client App Manager.

Step 2. Create the app

  1. Select New External Client App at the top right.
  2. Fill in the basic details:
    • External Client App Name: Aijent
    • API Name: Aijent, which fills in on its own
    • Contact Email: your Salesforce admin email
    • Distribution State: Local
  3. Select Create.

Distribution State must be Local. That keeps the app inside your org rather than publishing it anywhere.

Step 3. Configure the Settings tab

On the External Client App page, open the Settings tab.

  1. Find OAuth Settings and tick Enable OAuth.
  2. For Callback URL, paste this exactly:
https://app.aijency.ai/api/auth/salesforce/callback
  1. Under OAuth Scopes, add both of these:
    • Manage user data via APIs (api)
    • Perform requests at any time (refresh_token, offline_access)
  2. In the Flow Enablement section, tick the boxes shown below.

Flow Enablement settings in Salesforce

  1. In the Security section, tick the boxes shown below.

Security settings in Salesforce

  1. Select Save.

The Callback URL has to match exactly

No trailing slash, no typos. A single character out and Salesforce refuses the connection with a redirect_uri_mismatch error.

Step 4. Copy the Consumer Key and Consumer Secret

  1. Still in OAuth Settings, select the Consumer Key and Secret button.

The Consumer Key and Secret button

  1. Salesforce emails you a verification code. Check your email and paste it back.
  2. You land on a screen like this one.

Consumer Key and Consumer Secret shown in Salesforce

  1. Copy both values somewhere safe:
    • Consumer Key, which starts with 3MVG9
    • Consumer Secret, a long random string

Step 5. Adjust the Policies tab

Open the Policies tab at the top left. Only one change is needed.

  1. In the App Authorization section, find IP Relaxation.
  2. Change it to match the screenshot below.

IP Relaxation setting in Salesforce

  1. Select Save.

Step 6. Copy your My Domain URL, if you need it

Most production orgs do not need this, so skip it unless the connection fails later.

If you do need it, go to Setup, then Quick Find, then My Domain, and copy the Current My Domain URL. It looks like https://yourcompany.my.salesforce.com.

Step 7. Paste the credentials into Aijency

  1. In your dashboard, go to Integrations.
  2. In the CRM dropdown, choose Salesforce.
  3. Select Add credentials.
  4. Paste your Consumer Key, your Consumer Secret, and your My Domain URL if you have one.
  5. Select Save credentials.

Step 8. Select Connect

The Salesforce card now shows a Connect button. Selecting it opens a Salesforce window.

Read the next section before you approve anything.

The orange warning you will see

The first time you connect, Salesforce shows an Allow Access? screen with a large orange security warning across the top. It looks alarming. It is expected, and it appears for every app created this way.

The Salesforce Allow Access consent screen

What the warning is actually asking. It tells you not to authorise an app if somebody contacted you by phone or email asking you to do it. You started this yourself inside your own dashboard, so it does not apply to you.

What you are approving. Underneath the warning, Salesforce lists what Aijency is asking for:

PermissionWhat it means
Access the identity URL serviceConfirms which user is connecting
Manage user data via APIsLets your Aijent create and update contacts, accounts, opportunities and tasks
Perform requests at any timeLets the connection renew itself, so you are not reconnecting every hour

Select Allow. The window closes and the card in your dashboard flips to connected.

If something goes wrong

redirect_uri_mismatch

Your Callback URL does not match what Aijency sends. Go back to step 3 and check it character by character. It must be exactly https://app.aijency.ai/api/auth/salesforce/callback, with no trailing slash.

OAUTH_APP_BLOCKED or missing_session

Your org enforces strict My Domain. Go back to step 6, copy your My Domain URL, paste it into the My Domain URL field alongside your credentials, save, then try Connect again.

OAUTH_EC_APP_NOT_FOUND

You approved against a different Salesforce org from the one where you created the app. This usually happens when your browser still has a session open for another org. Sign out of every Salesforce org, then try Connect again.

It connects, but nothing appears in Salesforce

Connecting only sets up the access. Records are written after a real conversation finishes through your Aijent. Have a test conversation, then look for the contact. If a meeting was booked it syncs straight away. If not, it can take around 25 minutes, because those are collected on a schedule that waits for the conversation to go quiet.

If it is still missing, get in touch with the date and the email address you used.

Questions people ask

Who can see my Consumer Key and Consumer Secret?

Nobody. They are encrypted before they are stored, decrypted only on the server at the moment they are used, and never written into logs. They are never shown back to you or to anyone at Aijency.

How do I revoke access?

Either of these works, and both take effect immediately:

  • In Aijency: Integrations, then the Salesforce card, then Disconnect.
  • In Salesforce: Setup, then External Client App Manager, then Aijent, then Revoke.

Can I rotate the Consumer Secret?

Yes. Regenerate it in Salesforce, then come back to Integrations and choose Update credentials to paste the new one. The existing connection keeps working until it next renews itself, and it picks up the new secret from that point.

Does Aijency need a Salesforce licence seat?

The account you connect with does. It can be a standard user, an integration user or a system administrator, as long as it is active and able to log in. A dedicated integration user is worth setting up, because it keeps the audit trail in Salesforce clean.

On this page