> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withchanneled.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce

> Connecting Slack to Salesforce

## Authentication

Channeled supports integration with Salesforce, Hubspot, and Attio. Currently, you may only have one CRM connected at a time.

#### Connecting Salesforce

<Info>We recommend having admin permissions while installing Salesforce, but these are not required.</Info>

| # | Instructions                                                              |
| - | ------------------------------------------------------------------------- |
| 1 | Go to [Integrations](https://app.withchanneled.com/integrations).         |
| 2 | Select `Salesforce` and login through the Salesforce authentication flow. |

## Historical mapping

#### Mapping Salesforce Accounts with existing Slack channels

When you connect Salesforce, Channeled matches Slack channel organizations with Salesforce Account records automatically using the `Website` of the Salesforce record. You can review and update these to make sure connections are set up correctly in [Channels](https://app.withchanneled.com/channels).

## Syncing Channeled to Salesforce

#### Updating Salesforce Permissions for Salesforce Activity Syncing

In Salesforce, the Task `Type` field is set to `Hidden` by default. Channeled sets this field to `Type` = `Slack` for syncing Slack activities onto the Activity Feed, so you should change this to enable visibility/editability:

**In Salesforce Classic**

1. Click on `Setup` > `Build` > `Customize` > `Activities` > `Task Fields`.
2. Click the field: `Type`.
3. Click `Set Field-Level Security`.
   Enable visibility for users and click *Save*.
4. On the left panel, click `Task Page Layouts`.
5. Edit Task Layout and make sure 'Type' is included in your current layout.
6. Save changes.

**In Lightning Experience**

1. Click on `Gear icon` > `Setup` > `Object Manager`
2. Enter `Task` on the *Quick Find* box.
3. On the left panel, click `Fields & Relationships`.
4. Click `Type` field label
5. Click `Set Field-Level Security`.
6. Enable visibility for users and click *Save*.
7. On the left panel, click `Page Layouts`.
8. Click Task Layout and include 'Type' field in page layout.
9. Save changes.

#### Syncing activity

Activity from Slack can be automatically streamed to the Salesforce Account Activity Feed for any Salesforce Account mapped to a Slack channel.

To turn on syncing from Channeled to the Activity Feed, go to [Salesforce Integration Settings](https://app.withchanneled.com/integrations/salesforce), toggle `Sync customer threads`, and select **Save**.

#### Historical thread syncing

Channeled will automatically log new Slack conversations into Salesforce after you've connected Salesforce with an `Automated activity sync` enabled. If you want to push historical Slack threads into Salesforce retroactively, you can do so with a manual sync.

| # | Instructions                                                                                                            |
| - | ----------------------------------------------------------------------------------------------------------------------- |
| 1 | Go to [Channels](https://app.withchanneled.com/channels) and select the customer channels to sync historical data into. |
| 2 | Select the `Options` button and choose `Sync Salesforce`.                                                               |
| 3 | Select a timeframe to sync historical Slack activity into Salesforce.                                                   |
| 4 | Confirm the account mappings in Salesforce that each channel's Slack activity will be synced back into.                 |
| 5 | Select **Sync Slack activity.**                                                                                         |

#### Syncing metrics

Metric aggregates from Slack can be mapped to selected properties in Salesforce for any Salesforce Account mapped to a Slack channel.

To turn on metric syncing from Channeled to the Activity Feed, go to [Salesforce Integration Settings](https://app.withchanneled.com/integrations/salesforce), toggle `Sync Slack Metrics`, and choose the individual Salesforce fields to map for each metric. When you are finished, select  **Save**.

<Note>
  Metrics sync over from Channeled to Salesforce every day at 6 AM PST. To
  update the sync time or cadence, please contact the Channeled team.
</Note>

| Metric                 | Instructions                                                                                                                                                                                                                 |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| First response time    | For threads created in the last 30 days that have a first response, calculates the first response time in `minutes`. We recommend syncing this to a `number` type property in Salesforce. `String` fields are also accepted. |
| Resolution time        | For threads marked `Completed` in the last 30 days, calculates the resolution time in `minutes`. We recommend syncing this to a `number` type property in Salesforce. `String` fields are also accepted.                     |
| Message volume         | Volume of new threads created in the last 30 days. We recommend syncing this to a `number` type property in Salesforce. `String` fields are also accepted.                                                                   |
| Last message date      | Captures the timestamp of the last message from a given customer. We recommend syncing this to a `date` type property in Salesforce. `String` fields are also accepted.                                                      |
| Escalated to support % | Captures the % of threads converted to helpdesk (Zendesk, Intercom, or Freshdesk) tickets. We recommend syncing this to a `percentage` type property in Salesforce. `String` and `number` fields are also accepted.          |
| Positive sentiment     | Captures the % of threads calculated as positive sentiment. We recommend syncing this to a `percentage` type property in Salesforce. `String` and `number` fields are also accepted.                                         |
| Negative sentiment     | Captures the % of threads calculated as negative sentiment. We recommend syncing this to a `percentage` type property in Salesforce. `String` and `number` fields are also accepted.                                         |

## Automating Slack channel creation from Salesforce

If your sales or pre-sales team regularly sets up Slack channels for new customers, you can standardize the creation and onboarding of new channels through Channeled's native Salesforce application.

This functionality will:

1. Automatically connect channels with Salesforce CRM accounts and the Channeled app, all in one flow.
2. Enable a pre-configured button in Salesforce that can be included in your Account Object layouts.
3. When clicked, the custom button will open a modal in Salesforce for users to create Slack channels, optionally assign internal owners, trigger notifications, invite contacts, and post onboarding messages.
4. Your team can set additional automations or templates in Channeled to pre-populate the default values for channel owners and onboarding messages.

| # | Instructions                                                                                                                                                                                  |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Go to the [Salesforce Native App](https://app.withchanneled.com/integrations/salesforce) subtab under Salesforce in your **Integrations**.                                                    |
| 2 | Select **Install Channeled for Salesforce**. You will be re-directed to a Salesforce AppExchange Installation flow. Select `install for all users and roles`.                                 |
| 3 | Update your page layouts in Lightning to include the `Create Slack Channel` button.                                                                                                           |
| 4 | Under your [Salesforce Native App](https://app.withchanneled.com/integrations/salesforce)Set your default owners, notification channels, and onboarding template. Each of these are optional. |
| 5 | Select `Save Settings`.                                                                                                                                                                       |

#### Updating page layouts in Lightning

| # | Instructions                                                           |
| - | ---------------------------------------------------------------------- |
| 1 | On a Salesforce `Account` page, select **Edit Page** under `Setup`.    |
| 2 | Select the page `Highlight Panel`.                                     |
| 3 | Select **Add Action**                                                  |
| 4 | Under `Actions`, select **Create Slack Channel.**                      |
| 5 | Save your page layout by selecting **Save**                            |
| 6 | Repeat these steps if you have multiple Account Layouts in Salesforce. |

<iframe src="https://player.vimeo.com/video/888129271?badge=0&autopause=0&quality_selector=1&player_id=0&app_id=58479" width="720" height="500" title="Updating customer owners" frameborder="0" allowfullscreen />

#### Updating page layouts in Classic

| # | Instructions                                                                                       |
| - | -------------------------------------------------------------------------------------------------- |
| 1 | In Salesforce Admin Setup, select **Account Page Layouts** under the Account Object Configuration. |
| 2 | Click **Edit** next to the layouts you want to edit.                                               |
| 3 | Under `Mobile and Lightning Actions`, select **Create Slack Channel**                              |
| 4 | Click **Save** or **Quick Save** to save your page layout.                                         |

<iframe src="https://player.vimeo.com/video/888129685?badge=0&autopause=0&quality_selector=1&player_id=0&app_id=58479" width="720" height="500" title="Updating customer owners" frameborder="8" allowfullscreen />

## Additional workflows from Salesforce

Looking to build additional workflows from Salesforce? You can drive internal notifications, tasks, or customer-facing messages across your customer lifecycle using Channeled.

<Info>This is currently a stub! We're currently updating this page.</Info>
