> ## 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.

# Syncing Salesforce

> Sync channel activity and data with Salesforce

## Authentication

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

#### Connecting Salesforce

<Info>Installing Salesforce requires Salesforce Admin permissions.</Info>

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

## Mapping

#### Mapping Salesforce Accounts with Slack channels

When you connect Salesforce, Channeled matches Slack channel organizations with Salesforce Account records automatically using the `Website` of the Salesforce Account. You can review and update these to make sure connections are set up correctly.

| # | Instructions                                                                                                                             |
| - | ---------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Go to [Integrations](https://app.withchanneled.com/channels/settings/integrations) in **Channel Settings**.                              |
| 2 | If you haven't already done so, select `Salesforce` and login through the Salesforce authentication flow.                                |
| 3 | Under `Connected CRM`, select **Sync accounts;** then click **Sync channels** to sync `Website` and Slack domains for customer channels. |
| 4 | Channeled will display any new mapped channels, in addition to any missing channels where mappings were not found.                       |
| 5 | Update mappings for channels as needed and select **Finish and close.**                                                                  |

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

#### Pushing historical data into Salesforce Activity Feed

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.**                                                                                         |

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

## Syncing metrics

<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>

#### Definitions

| 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 field 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 field 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 field 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 field 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 field 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 field 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 field in Salesforce. `String` and `number` fields are also accepted.                                         |

#### Configuration

<Note>
  Syncing over all metrics is not required; you may sync over selected metrics
  if needed.
</Note>

| # | Instructions                                                                                                                         |
| - | ------------------------------------------------------------------------------------------------------------------------------------ |
| 1 | Go to [Integrations](https://app.withchanneled.com/channels/settings/integrations) in **Channel Settings**.                          |
| 2 | Toggle `Sync Slack metrics to Salesforce Account fields`                                                                             |
| 3 | Map individual fields from the Salesforce `Account` to each field. Fields may be `string`, `number`, `percentage`, or `date` fields. |

<iframe src="https://player.vimeo.com/video/888128166?badge=0&autopause=0&quality_selector=1&player_id=0&app_id=58479" width="720" height="500" title="Syncing Salesforce Metrics" frameborder="0" allowfullscreen />

## Automating Slack channel creation from Salesforce

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

#### Overview

This functionality will:

1. Place a button on the Salesforce Account page
2. When clicked, open a modal in Salesforce for users to optionally assign internal team members, invite contacts, and post onboarding messages.
3. Users can set additional automations or templates in Channeled to pre-populate the default values for channel owners and onboarding messages.

#### Installation

<Tip>
  Make sure you have Salesforce admin rights when installing Salesforce, or
  invite a Salesforce admin to Channeled to complete the installation steps.
</Tip>

| # | Instructions                                                                                                                                                                                         |
| - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Go to [Salesforce App](https://app.withchanneled.com/channels/settings/advanced/salesforce-app) in **Advanced Channel Settings**.                                                                    |
| 2 | Select `Install Channeled for Salesforce`                                                                                                                                                            |
| 3 | Select `Install for all users`.                                                                                                                                                                      |
| 4 | Add the `Connect Slack Channel` button to a Salesforce Account layout page.                                                                                                                          |
| 5 | You can additionally set defaults for channel owners and onboarding messages when configuring in [Salesforce App](https://app.withchanneled.com/channels/settings/advanced/salesforce-app) settings. |

<iframe src="https://player.vimeo.com/video/888128448?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 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 />

#### Set onboarding defaults

Once you've installed Channeled for Salesforce, you can set default owners, followers, notifications, and onboarding templates for new channels created through the process.

<Note>Setting defaults is optional; set only the defaults you need.</Note>

| # | Instructions                                                                                                                                        |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Go to [Salesforce App](https://app.withchanneled.com/channels/settings/advanced/salesforce-app) in **Advanced Channel Settings**.                   |
| 2 | Select a default `channel owner`. This user will automatically be added to the channel.                                                             |
| 3 | Select a default `notification channel`. This channel will be notified whenever a new customer channel is created through the application flow.     |
| 4 | Update or set a default onboarding message. This message will be posted from the same user who triggered the Salesforce flow (e.g, your AE or CSM). |
| 5 | Select **Save Settings.**                                                                                                                           |

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