How to Connect Salesforce to Appalix
With Appalix's native Salesforce integration, every lead your AI agent captures is automatically created as a Lead record in Salesforce. You'll need two things: a Salesforce OAuth access token and your Salesforce instance URL. This guide covers how to get both.
What you'll need
- An Appalix account on the Pro plan or above
- A Salesforce account with API access (Professional, Enterprise, Unlimited, or Developer edition)
- A Salesforce OAuth access token — you'll get this via a Connected App
- Your Salesforce instance URL — e.g.
https://yourcompany.my.salesforce.com
Step 1 — Find your Salesforce instance URL
Your instance URL is the base URL of your Salesforce org — everything before /lightning or /apex.
- Log in to Salesforce. Look at the URL in your browser. It will look like:
https://yourcompany.my.salesforce.com/… - Your instance URL is the domain portion:
https://yourcompany.my.salesforce.com - Alternatively, go to Setup → Company Settings → My Domain. The Current My Domain URL is your instance URL.
Copy this — you'll paste it into Appalix later.
Step 2 — Create a Connected App to get an OAuth token
Salesforce requires OAuth tokens to access its REST API. The easiest way to generate one without a complex OAuth server setup is to create a Connected App and use the SFDX CLI or Workbench to get a token.
Option A — Workbench (no code, easiest)
- Go to workbench.developerforce.com and log in with your Salesforce credentials.
- Select Environment: Production (or Sandbox if testing), accept the terms, and click Login with Salesforce.
- Once logged in, go to Info → Session Information.
- Copy the Session ID — this is your OAuth access token. It starts with a long alphanumeric string.
Option B — Connected App (recommended for production)
- In Salesforce, go to Setup (gear icon) → search App Manager → click App Manager.
- Click New Connected App (top right).
- Fill in the required fields:
- Connected App Name:
Appalix Integration - Contact Email: your email address
- Connected App Name:
- Under API (Enable OAuth Settings), tick Enable OAuth Settings. Set:
- Callback URL:
https://appalix.ai - Selected OAuth Scopes: add
apiandrefresh_token, offline_access
- Callback URL:
- Click Save. Wait 2–10 minutes for the app to propagate.
- Go back to App Manager, find your new app, click the dropdown on the right → View. Copy the Consumer Key (Client ID) and Consumer Secret (Client Secret).
- Open this URL in your browser to start the OAuth flow (replace
CLIENT_IDandINSTANCE_URL):https://login.salesforce.com/services/oauth2/authorize ?response_type=code &client_id=CLIENT_ID &redirect_uri=https://appalix.ai
- Log in and authorise. You'll be redirected to
https://appalix.ai?code=XXXX. Copy the code from the URL. - Exchange for an access token (run this in your terminal or use a REST client like Postman or Insomnia):
curl -X POST https://login.salesforce.com/services/oauth2/token \ -d "grant_type=authorization_code" \ -d "client_id=CLIENT_ID" \ -d "client_secret=CLIENT_SECRET" \ -d "redirect_uri=https://appalix.ai" \ -d "code=YOUR_CODE"
The response includes anaccess_tokenand yourinstance_url. Copy both.
Step 3 — Connect Salesforce in Appalix
- In Appalix, go to Integrations and click Edit on the integration you want to connect.
- Scroll to CRM integration and select Salesforce from the provider dropdown.
- Paste your OAuth access token in the first field.
- Paste your Instance URL (e.g.
https://yourcompany.my.salesforce.com) in the second field. - Click Save changes.
What gets created in Salesforce
Appalix creates a Lead record in Salesforce with:
- Email — the visitor's email address
- MobilePhone — the visitor's phone number (if captured)
- LastName — set to
Chat Lead(required by Salesforce — update once you know the visitor's name) - LeadSource — set to
Chat - Company — set to
Unknown(required by Salesforce — update via a workflow once the company is known)
Step 4 — Test the integration
- Open your Appalix integration preview.
- Send a message with an email: "My email is testlead@acme.com".
- In Salesforce, go to Leads. Sort by Created Date (descending) and check for the new record.
curl https://INSTANCE_URL/services/data/v59.0/ -H 'Authorization: Bearer ACCESS_TOKEN' — you should get a JSON response.Next steps — automate in Salesforce
Once leads are flowing in, use Salesforce automation to act on them:
- Lead Assignment Rules — auto-assign chat leads to the right sales rep based on territory or round-robin rules
- Flow or Process Builder — trigger an email alert to your team when a chat lead is created
- Convert to Opportunity — when a sales rep follows up and qualifies the lead, convert it to a Contact + Opportunity in one click
- Reports & Dashboards — track how many leads came from Appalix Chat with a filter on Lead Source = Chat
Frequently asked questions
Can I use a Sandbox instead of Production?
Yes — use your Sandbox instance URL (e.g. https://yourcompany--uat.sandbox.my.salesforce.com) and generate a token from test.salesforce.com instead of login.salesforce.com.
My access token expired. What do I do?
Re-generate a fresh token using the same method and update it in Appalix (Integrations → Edit → CRM integration → Salesforce → update the token → Save). Native token refresh support is on the Appalix roadmap.
Can I use Zapier with Salesforce instead?
Yes — select Zapier as the CRM provider (Core plan), add a Salesforce action in Zapier to create a Lead record, and map the fields from the Appalix payload.
☁️
Ready to connect Salesforce?
Add your Salesforce access token and instance URL in Appalix and leads will flow into your CRM automatically.
Go to Integrations →