> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/q-z-integrations/salesforce-setup-for-workbench.md).

# Salesforce Setup for Workbench

## Prerequisites <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-idm4527668987772833009484587715" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-idm4527668987772833009484587715"></a>

* [Salesforce Shield](https://www.salesforce.com/platform/shield/pricing/) or Real-Time Event Monitoring is required.
* Find your **Salesforce domain** and save this information for later use.
* Make sure Real-Time Event Monitoring streams are enabled for all available event objects. [Learn more about real-time event monitoring](https://help.salesforce.com/s/articleView?id=sf.real_time_event_monitoring_streaming.htm\&type=5).

## Step 1: Create Profile for Access Control <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23203" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23203"></a>

Salesforce uses profiles to manage user access to data, so the first step is to create a profile for Expel.

Having read-only access to the interface of your technology allows Expel to dig deeper during incident investigations. Our device health team uses this access to investigate potential health issues with your tech. For more information, see [Why Expel Asks for Console Access](/connect-your-technology/about-integrations/why-expel-asks-for-console-access.md).

1. In Salesforce, navigate to **Profiles**.
2. **Clone** the **Read Only** profile and name it "Expel". Click **Save**.
3. Under Administrative Permissions, verify that **API Enabled** is **selected**.
4. Under Administrative Permissions, **enable Customize Application Permissions**. This is required to enable Logout Events.
5. Under General User Permissions, **enable View Real-Time Event Monitoring Data.**
6. Click **Save Profile**.

## Step 2: Enable Event Streaming <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-idm4531140746484834218532182599" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-idm4531140746484834218532182599"></a>

To properly ingest logs and process alerts, Expel queries specific endpoints in Salesforce. For Expel to be able to access events in those endpoints, you must enable event streaming.

1. By using the search box, find and open **Event Manager**.
2. In the Events section, **enable Streaming Data** for the following subscription channels:
   * /event/ApiAnomalyEvent
   * /event/ApiEventStream
   * /event/BulkApiResultEvent
   * /event/ConcurLongRunApexErrEvent
   * /event/CredentialStuffingEvent
   * /event/LightningUriEventStream
   * /event/ListViewEventStream
   * /event/LoginEventStream
   * /event/LoginAsEventStream
   * /event/LogoutEventStream
   * /event/PermissionSetEvent
   * /event/ReportAnomalyEvent
   * /event/ReportEventStream
   * /event/SessionHijackingEvent
   * /event/UriEventStream

## Step 3: Create Expel User <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23211" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23211"></a>

Now that the Expel profile is created, the next step is to create a user with that profile.

1. Navigate to **Users**.
2. Click **New User**.
3. Type in the required information:
   * **Last Name** - enter "ExpelAPI".
   * **Alias** - enter "expelapi".
   * **Email** - enter "soc+**\<Your\_Organization\_Name>**@expel.io".
     * For example, if your organization were Acme Corp, the format would be "<soc+acme_corp@expel.io>".
   * **Username** and **Nickname** - use the Salesforce default entries.
   * **Role** - select any role.
   * **User License** - select **Salesforce**.
   * **Profile** - select **Expel**.
4. Click **Save**.
5. Reset Password for the user. The password reset is sent to the email address for the Expel Salesforce User.

## Step 4: Get Security Token <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23225" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23225"></a>

1. From your personal settings, type **reset** in the Quick Find text box, and then select **Reset My Security Token**.
2. Click **Reset Security Token**. The new security token is sent to the email address for the Expel Salesforce User.

## Step 5: Create Connected App <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23228" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23228"></a>

1. Login to [Salesforce](https://login.salesforce.com/) with the same user credentials that you want to collect data in your Salesforce deployment.
2. From Setup, type "App Manager" in the Quick Find text box, then select **App Manager**.
3. Click **New Connected App**.
4. Enter the connected app name (Expel), which appears in the App Manager and on its App Launcher tile.
5. Enter the API name.

{% hint style="info" %}
The default is a version of the name without spaces. Only letters, numbers, and underscores are allowed. If the original app name contains any other characters, edit the default name.
{% endhint %}

6. Enter your contact email for Salesforce.
7. In the API (Enable OAuth Settings) area of the page, select **Enable OAuth Settings**.
8. Select **Enable for Device Flow**.
9. Select the following OAuth scopes to apply to the connected app:
   * Manage user data via APIs (api)
10. Select **Save**. It can take about 10 minutes for the changes to take effect.
11. Retrieve the **Consumer Key** and **Consumer Secret** from the app page. Save these values in a safe place for use in a later step.

## Step 6. Add Salesforce as a Security Device in Workbench <a href="#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23241" id="uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23241"></a>

Now that you have the correct access configured and noted the credentials, you can integrate your tech with Workbench.

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. In the side menu, navigate to **Organization Settings > Security Devices**. If you have multiple organizations, you must select the appropriate organization name from the list.
3. Select **Add Security Device**.
4. Search for and select **Salesforce**. Complete the fields as follows:

   <div align="left"><figure><img src="/files/axEVmwpe5Wc7BqzMTAIx" alt="Salesforce Add a Security Device config screen in Workbench." width="375"><figcaption></figcaption></figure></div>

   * **Name** - enter a name that might help you more easily identify this integration, such as "CompanyName Salesforce"; this name will display in Workbench under the Name column, and is a text string that you can filter on.
   * **Location** - enter the location of your integration, for example "cloud." This is also a text string that you can filter on, so we recommend being consistent with location naming across your Expel integrations.
   * **Salesforce domain** - enter your Salesforce domain info from the [Prerequisites](#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-idm4527668987772833009484587715).
   * **Client ID** - enter the Connected App's Consumer Key from [Step 5](#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23228).
   * **Client secret** - enter the Connected App's Consumer Secret from [Step 5](#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23228).
   * **Username** - enter the Expel user's username.
   * **Password**-  enter the Expel user's password.
   * **Security token** - type the Expel user's security token from [Step 4](#uuid-df1b896c-8d07-e0b3-a76e-8aa737d94229_bridgehead-23225).
5. Select **Save**.

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/q-z-integrations/salesforce-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
