Resources/Connect Salesforce to Appalix
Tutorial10 min read · Pro+ plan

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
Salesforce editions: API access is available on Professional, Enterprise, Unlimited, Performance, and Developer editions. The Essentials and free Trial editions do not include API access.

Step 1 — Find your Salesforce instance URL

Your instance URL is the base URL of your Salesforce org — everything before /lightning or /apex.

  1. Log in to Salesforce. Look at the URL in your browser. It will look like: https://yourcompany.my.salesforce.com/…
  2. Your instance URL is the domain portion: https://yourcompany.my.salesforce.com
  3. 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)

  1. Go to workbench.developerforce.com and log in with your Salesforce credentials.
  2. Select Environment: Production (or Sandbox if testing), accept the terms, and click Login with Salesforce.
  3. Once logged in, go to Info → Session Information.
  4. Copy the Session ID — this is your OAuth access token. It starts with a long alphanumeric string.
Session tokens expire when you log out of Workbench or after the session timeout (typically 2 hours). For production use, set up a Connected App (Option B) for a longer-lived token.

Option B — Connected App (recommended for production)

  1. In Salesforce, go to Setup (gear icon) → search App Manager → click App Manager.
  2. Click New Connected App (top right).
  3. Fill in the required fields:
    • Connected App Name: Appalix Integration
    • Contact Email: your email address
  4. Under API (Enable OAuth Settings), tick Enable OAuth Settings. Set:
    • Callback URL: https://appalix.ai
    • Selected OAuth Scopes: add api and refresh_token, offline_access
  5. Click Save. Wait 2–10 minutes for the app to propagate.
  6. 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).
  7. Open this URL in your browser to start the OAuth flow (replace CLIENT_ID and INSTANCE_URL):
    https://login.salesforce.com/services/oauth2/authorize
    ?response_type=code
    &client_id=CLIENT_ID
    &redirect_uri=https://appalix.ai
  8. Log in and authorise. You'll be redirected to https://appalix.ai?code=XXXX. Copy the code from the URL.
  9. 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 an access_token and your instance_url. Copy both.

Step 3 — Connect Salesforce in Appalix

  1. In Appalix, go to Integrations and click Edit on the integration you want to connect.
  2. Scroll to CRM integration and select Salesforce from the provider dropdown.
  3. Paste your OAuth access token in the first field.
  4. Paste your Instance URL (e.g. https://yourcompany.my.salesforce.com) in the second field.
  5. 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

  1. Open your Appalix integration preview.
  2. Send a message with an email: "My email is testlead@acme.com".
  3. In Salesforce, go to Leads. Sort by Created Date (descending) and check for the new record.
If leads aren't appearing: check that the access token is still valid (session tokens from Workbench expire) and that your Salesforce edition includes API access. You can test the token directly: 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 →
📬

Stay ahead of the curve

Get new guides, case studies, and product updates delivered to your inbox every two weeks.

No spam. Unsubscribe any time.