# Connect Salesforce

Create a small app in your Salesforce org, register it in Insurge and connect, so each meeting's brief lands on the right contact.

Connect Salesforce and every presentation meeting's brief goes to the matching Salesforce contact on its own. Salesforce only lets an outside service in through an app your own org creates, so setup has three parts: a Salesforce admin creates the app, you paste its key and secret into Insurge, then you connect. It takes about five minutes.

## Before you start

- You need to be an admin in Insurge. Sales users don't see **Integrations**.
- You need a Salesforce admin, for the first part. They can follow the steps on this page, or the same steps inside Insurge.
- Know whether your org is production or a sandbox. Developer Edition orgs count as production.

## 1. Create the app in Salesforce

A Salesforce admin does this once. In Insurge, **Register app** shows the same steps, with your exact callback URL, under **Show the 8 steps to create the app in Salesforce**.

### Open Setup, then App Manager

In Salesforce, open **Setup** and search for **App Manager** in Quick Find.

### Click New External Client App

It's at the top right.

### Fill in the basic information

Name it **Insurge AI**, add a contact email, and keep **Distribution State** set to **Local**.

### Turn on OAuth

Expand **API (Enable OAuth Settings)** and tick **Enable OAuth**.

### Paste the callback URL

Paste exactly:

```text
https://api.insurgeai.com/api/integrations/salesforce/callback
```

If Insurge runs a separate setup for your company, use the URL shown in the steps on the Integrations page instead.

### Add two OAuth scopes

Move these into **Selected**:

- **Manage user data via APIs (api)**
- **Perform requests at any time (refresh_token, offline_access)**

### Require the secret, then create

Under **Security**, tick **Require secret for Web Server Flow** and **Require secret for Refresh Token Flow**. Leave the greyed-out settings as they are. Click **Create**.

### Copy the Consumer Key and Secret

On the new app's **Settings** tab, expand **OAuth Settings** and click **Consumer Key and Secret**. Salesforce may email a verification code first. Keep the page open.

## 2. Register the app in Insurge

### Open Integrations and click Register app on the Salesforce row

### Paste the Consumer Key and Consumer Secret

The secret is stored encrypted.

### Pick the Login host

**Production** for production and Developer Edition orgs. **Sandbox** for a sandbox, which signs in at test.salesforce.com.

### Click Save app

A message says "Salesforce app registered". The Salesforce row now offers **Connect**.

## 3. Connect

### Click Connect on the Salesforce row

Salesforce's sign-in opens in the same tab.

### Sign in to the org and allow access

Salesforce sends you back to **Integrations**. A message says "Salesforce connected" and "Future meeting briefs will sync automatically."

**Insurge's own app is for test orgs**

Some workspaces can connect before registering an app. **Details** then says "Using Insurge's app, fine for a test org." Register your own app before you connect your company's org.

## What Insurge writes

A meeting syncs once its brief is ready, usually seconds after it ends. Only meetings on presentation links sync. Tour, help desk and copilot sessions and test meetings don't. Keep the visitor form on for presentation links: the contact is matched by the email the visitor gives.

| What | How |
|---|---|
| **Contact** | Found by email, or created with the visitor's name. A visitor who gave no name gets the last name "(Unknown)". |
| **Account** | The contact is linked to the Account whose name matches the company the visitor gave, when one exists. Insurge doesn't create Accounts unless you ask your Insurge contact to turn that on. |
| **Description** | The brief is added to the contact's standard **Description** field as one block per meeting. Your own notes and earlier meetings' blocks stay. When the field gets long, the oldest Insurge blocks are dropped first. |
| **Task** | One completed Task per meeting on the contact's activity timeline, dated the day of the meeting. Its subject starts "Insurge" and the score, then the summary. |
| **Insurge fields** | Insurge Lead Score (hot, warm or cold), Insurge Budget, Insurge Authority, Insurge Need, Insurge Timeline, Insurge Executive Summary, Insurge Meeting Count and Insurge Meeting Duration. Only once these fields exist in your org. |

The Description and Task work in any org with no extra setup. The Insurge fields, which you need for Salesforce reports and dashboards, have to be added to your org first. Ask your Insurge contact to add them. Until then, each sync shows **Synced with warnings**: the brief arrived, the fields didn't.

When you click **Write again** on a meeting, the new brief syncs too. It replaces that meeting's own Description block and updates the same Task.

## Check it worked

### Hold a meeting on a presentation link

Give an email on the visitor form and say a few things.

### Open Integrations and click Details on the Salesforce row

**Recent syncs** lists the last ten, each **Synced**, **Synced with warnings**, **Skipped** or **Failed**, with **Open meeting**.

### Open the contact in Salesforce

The brief is in **Description** and the Task is on the activity timeline.

## Change or remove the app

Open **Integrations** and click **Details** on the Salesforce row.

| You did this in Salesforce | Do this in Insurge |
|---|---|
| Made a new secret for the same app | Click **Replace** and paste the new secret with the same key. The connection stays. |
| Created a new app, with a new Consumer Key | Click **Replace**, paste the new key and secret, then click **Connect** again. |
| Want Insurge out of Salesforce for good | Click **Disconnect**, then **Remove**. **Remove** forgets the app and drops the connection too. |

**Disconnect** stops new briefs from syncing. Contacts already synced stay as they are. Insurge also withdraws its access in your org. If it can't reach Salesforce, a message asks you to remove "Insurge AI" from the connected apps in Salesforce yourself.

## Troubleshooting

| Symptom | Cause | Fix |
|---|---|---|
| **Save app** stays greyed out | The key or secret is too short, often only part of it was copied. | Copy each value again in full. |
| "The CRM refused the sign-in. Check the app's key and secret, then try again." | The key or secret doesn't match the app, or the login host is wrong. | Click **Replace**, paste both again, check **Production** or **Sandbox**, then **Connect**. |
| "No Salesforce app is registered for this workspace any more. Register it and connect again." | The app was removed while you were connecting. | Click **Register app**, then **Connect**. |
| "Your dashboard session ended during the CRM sign-in. Log in and connect again." | Your Insurge sign-in expired while you were in Salesforce. | Sign in again, then click **Connect**. |
| "The connect link expired or was altered. Start again from this page." | Too long passed on Salesforce's pages. | Click **Connect** again. |
| Salesforce shows a callback or redirect error | The callback URL in the Salesforce app doesn't match. | Paste the callback URL from the steps exactly, with no extra spaces. |
| Every sync shows **Synced with warnings** | The Insurge fields aren't in your org yet. | Ask your Insurge contact to add them. The brief still lands in Description. |
| Syncs show **Failed** after a quiet month | Salesforce can expire access for an app unused for 30 days. | **Disconnect**, then **Connect** again. |
