> For the complete documentation index, see [llms.txt](https://support.ariglad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.ariglad.com/integrations/how-to-integrate-salesforce-with-ariglad.md).

# How To: Integrate Salesforce with Ariglad

This guide walks you through installing the Salesforce integration in Ariglad and, if your team uses brand/business-unit siloing in Salesforce, how to share the right field information with your Ariglad account manager.

The setup has two parts:

1. **Install the integration** — create an External Client App in Salesforce and connect it to Ariglad.
2. **(Optional) Configure brand siloing** — tell Ariglad which custom fields on `Knowledge__kav` (articles) and `Case` (tickets) identify each brand.

***

### Before you start

You will need:

* A Salesforce user with **System Administrator** (or equivalent) permissions in the org you want to connect.
* Access to the email address associated with that Salesforce user (Salesforce sends a verification code during setup).
* An Ariglad workspace with permission to manage integrations.

***

### Part 1 — Install the integration

#### Step 1. Open the Salesforce integration in Ariglad

1. In Ariglad, go to **Settings → Integrations**.
2. Find **Salesforce** and click **Connect**.
3. Keep this Ariglad window open — you'll come back to it after setting things up in Salesforce.

#### Step 2. Create an External Client App in Salesforce

1. Log in to your Salesforce org as an administrator.
2. Click the gear icon (top right) and choose **Setup**.
3. In the **Quick Find** box, type **External Client App Manager** and open it.
4. Click **New External Client App** in the top right.

<figure><img src="/files/cKX9rFoCe61Y42ns5DVE" alt=""><figcaption></figcaption></figure>

#### Step 3. Fill in the basic information

Use the values Ariglad shows on the setup screen — they can be copied with the copy button next to each field:

| Field                    | Value                 |
| ------------------------ | --------------------- |
| External Client App Name | `Ariglad Integration` |
| Contact Email            | `support@ariglad.com` |
| Distribution State       | `Local`               |

> Set **Distribution State** to **Local** unless you specifically need to package the app for multiple orgs.

<figure><img src="/files/OpGEQGJ04tJbASxc1QCT" alt=""><figcaption></figcaption></figure>

#### Step 4. Enable OAuth

1. Scroll down to **API (Enable OAuth Settings)** and expand the section.
2. Tick **Enable OAuth**. Additional OAuth fields will appear.

<figure><img src="/files/AqxWOyHqAhpbJmL8R6nP" alt=""><figcaption></figcaption></figure>

#### Step 5. Configure OAuth settings

1. **Callback URL** — copy this from the Ariglad setup screen and paste it in. It will look like: `https://ai.ariglad.com/api/ticketing_integration/oauth/authorize`
2. **OAuth Scopes** — add the following:
   * **Manage user data via APIs (api)**
   * **Perform requests at any time (refresh\_token, offline\_access)**
3. Under **Security**, tick:
   * **Require Secret for Refresh Token**
4. **Uncheck** **Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows** — Ariglad handles PKCE on its end.
5. Click **Create** to save the External Client App.

#### Step 6. Retrieve the Consumer Key and Secret

1. On the new app's detail page, open the **Settings** tab.
2. In **OAuth Settings**, click **Consumer Key and Secret**.
3. Salesforce will email a verification code to the admin user. Enter it.
4. Copy the **Consumer Key** and **Consumer Secret** and paste each into the matching field in Ariglad.

#### Step 7. Set the OAuth policy

This step is required for refresh tokens to work — Ariglad will lose access after an hour without it.

1. On the app's detail page, click the **Policies** tab and then **Edit**.
2. Under **OAuth Policies**, set:
   * **Permitted Users** → **All users may self-authorize**
   * **Refresh Token Policy** → **Refresh token is valid until revoked**
3. Click **Save**.

#### Step 8. Provide your Salesforce domain

1. In Salesforce **Setup**, search for **My Domain** in the Quick Find box.
2. Copy the value of **Current My Domain URL** (e.g. `mycompany.my.salesforce.com`). Do not include `https://` or any path after `.com`.
3. Paste it into the **Salesforce Domain** field in Ariglad.

#### Step 9. Authorize

Click **Authorize** in Ariglad. You'll be redirected to Salesforce to confirm the connection, then returned to Ariglad. The integration is now live and Ariglad will start syncing Cases and Knowledge articles.

***

### Part 2 — Brand / business-unit siloing (optional)

Skip this section if you only operate a single brand in Salesforce.

If you run **multiple brands** (or business units, regions, product lines, etc.) inside one Salesforce org and want Ariglad to keep them separate, you can tell Ariglad which **custom field** on `Knowledge__kav` and `Case` identifies the brand. Ariglad will then:

* Only fetch articles and cases that match the brand value(s) you specify.
* Stamp newly created or updated articles with the configured brand value, so they land in the right brand.

#### What you need to set up in Salesforce first

Your Salesforce admin needs to create one custom field per object you want to silo. The field on `Knowledge__kav` and the field on `Case` are **independent** — even if you give them the same API name, they are separate fields.

For each object (`Knowledge__kav` for articles, `Case` for tickets):

1. Create a custom field — typically a **Picklist** with one entry per brand, or a **Text** field.
2. Make sure the field is **filterable**, **createable**, and **updateable**.
3. Grant **Field-Level Security (FLS)** read/write access on the field to the user/profile that authorized the Ariglad integration.

You don't have to add the field to both objects — for example, if you only want to silo tickets but not articles, just add it to `Case`.

#### What to send your Ariglad account manager

Send the following so we can configure the integration on our side. A short email or Slack message is fine.

**Required**

* Whether you want siloing applied to **articles**, **tickets**, or **both**.
* The **API name** of the custom field on each object you want siloed. Examples:
  * Articles: `Brand__c` on `Knowledge__kav`
  * Tickets: `Brand__c` on `Case`
* The **values** of that field that should be **included** for this Ariglad workspace (one workspace = one brand). Examples: `BrandA`, `01I5g000000abcdEAA`.
* For article creation: the **single value** Ariglad should stamp on new/updated articles so they land in the correct brand.

**Optional**

* Any values that should be explicitly **excluded** (handy if your include list is open-ended).
* If you have multiple Ariglad workspaces (one per brand), the same information for each.

#### A copy-pasteable template

```
Salesforce org: mycompany.my.salesforce.com
Ariglad workspace: Brand A

Articles
  Custom field API name (on Knowledge__kav): Brand__c
  Include values: ["BrandA"]
  Exclude values: []
  Value to stamp on create/update: "BrandA"

Tickets
  Custom field API name (on Case): Brand__c
  Include values: ["BrandA"]
  Exclude values: []
```

#### How to find the field's API name in Salesforce

1. Go to **Setup → Object Manager**.
2. Open **Knowledge** (for articles) or **Case** (for tickets).
3. Click **Fields & Relationships**.
4. Find your brand field. The **Field Name** column (ending in `__c` for custom fields) is the API name to send us.

#### How to find a picklist value or RecordType ID

* **Picklist values**: Setup → Object Manager → object → Fields & Relationships → your field. The exact strings under **Values** are what you'll send.
* **RecordType IDs** (only relevant if you're using `RecordTypeId` instead of a custom field): open the Record Type and copy the 18-character ID from the URL.

***

### Troubleshooting

**The integration disconnects after about an hour.** The OAuth policy wasn't set correctly. Repeat **Step 7** and make sure **Refresh Token Policy** is **Refresh token is valid until revoked**.

**Ariglad isn't pulling any articles or cases after siloing was configured.** The configured field may not exist on that object, or the integration user doesn't have FLS access to it. Confirm both, then re-authorize the integration.

**New articles created from Ariglad land in the wrong brand.** The "value to stamp on create/update" wasn't sent to your account manager, or the field isn't marked as updateable. Send the value, and confirm the field is createable/updateable in Setup.

**I can see articles for other brands too.** Either no include values were configured, or the include list contains values for more than one brand. Send your account manager the corrected list.

***

If anything in this guide is unclear or you hit a snag, reach out at **<hello@ariglad.com>** and we'll help you finish the setup.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.ariglad.com/integrations/how-to-integrate-salesforce-with-ariglad.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
