Connect Salesforce to your Aha! Builder application to bring customer data into one place. Once connected, you can pull in opportunities, accounts, and contacts and use them in analytics alongside the rest of your application data.
In this article, we will walk through how to connect your application with Salesforce.
Click any of the following links to skip ahead:
Prerequisites
Action |
Requirement |
|---|---|
Integration direction |
Read only |
Credential type |
Connected App with OAuth 2.0 client credentials flow |
Aha! Builder plans |
All Aha! Builder plans |
Required Aha! Builder permissions |
Application owner |
Salesforce plans |
|
Salesforce permissions |
System Administrator to create the External Client App and assign the run-as user |
Read-only access in Salesforce comes from the permissions assigned to the integration user. It does not come from the OAuth scope alone. Plan to use a dedicated user with read access only to the objects your application needs.
Create an External Client App and get your credentials
You will need three values from Salesforce to connect it to your Aha! Builder application:
Consumer Key
Consumer Secret
Salesforce instance URL
To create the client in Salesforce:
Sign in to Salesforce as a System Administrator.
Open Setup.
In the Quick Find box, enter App Manager and select it.
Select New External Client App.
Enter an App Name. The API Name field fills automatically. Enter a Contact Email.
-
Under API (Enable OAuth Settings):
Select Enable OAuth Settings.
In Callback URL, enter your Salesforce URL. For example,
https://{yourorg}.my.salesforce.com/services/oauth2/callback.In Selected OAuth Scopes, add Manage user data via APIs (api).
Select Enable Client Credentials Flow.
Select Create. Wait two to 10 minutes for the app to propagate before continuing.
In App Manager, find your app, select the dropdown arrow next to it, and select View.
Under API (Enable OAuth Settings), select Manage Consumer Details. Verify your identity by email, if prompted.
Copy the Consumer Key and Consumer Secret.
Copy your credentials now and store them somewhere safe. Salesforce may only show them once.
Salesforce support resources |
|---|
Set up a read-only Salesforce user
Use a dedicated integration user so you can control exactly what data the application can read.
Create or choose a user for the integration.
Give that user API access.
Grant read access only to the Salesforce objects your application needs, such as Opportunity, Account, and Contact.
If Salesforce requires you to assign a run-as user for the client credentials flow, assign this dedicated user.
If Salesforce requires pre-authorization or policy settings for the client, complete those steps before testing the connection.
This setup keeps the integration focused and easier to review later.
Add your secrets in Aha! Builder
Once you have your credentials, add each one to your application in Aha! Builder as a separate secret:
Navigate to your application in Aha! Builder.
Select Configuration in the top navigation bar.
Select the Secrets tab.
Select Add secret.
In the Secret name field, enter
SALESFORCE_CLIENT_ID.In the Value field, paste your Consumer Key.
Select Save.
Repeat steps 4–7 for
SALESFORCE_CLIENT_SECRET(your Consumer Secret) andSALESFORCE_INSTANCE_URL(your Salesforce instance URL, such ashttps://yourcompany.my.salesforce.com).After saving the last secret, click Ask Elle to integrate to start an AI chat.
Your credentials are now available to your application code. Secrets are encrypted and stored securely — they are never exposed in your application's frontend code.
Secrets are environment-specific. If you have both a preview and a production environment, you will need to add the secrets to each one separately.
Use the integration
With your secrets saved, you can ask Elle to build features that use Salesforce data. Here are some example prompts:
"Add a dashboard that shows my open Salesforce opportunities with their stage, amount, and close date."
"Create a page that lists Salesforce opportunities closing this quarter, sorted by amount."
"Show recent Salesforce activity for the accounts assigned to my team."
Elle will generate the code to connect to the Salesforce REST API using your secrets and display the data in your application. These examples show how to pull data from Salesforce into your application — writing data back to Salesforce is not covered in this guide.
Update a secret
You can update a secret's value at any time (for example, if you regenerate your Consumer Secret):
Navigate to your application in Aha! Builder.
Select Configuration in the top navigation bar.
Select the Secrets tab.
Select Edit next to the secret you want to update.
Enter the new value and select Save.
Remove a secret
To remove an integration secret from your application:
Navigate to your application in Aha! Builder.
Select Configuration in the top navigation bar.
Select the Secrets tab.
Select the More options button next to the secret you want to remove.
Select Delete.
Select OK to confirm.
Removing a secret will break any features in your application that depend on it. Review your application after removing a secret to confirm it still functions correctly.