Salesforce Service Cloud is a contact platform that is mainly used for email and chat. More information about Salesforce Service Cloud can be found [here](https://www.salesforce.com/products/service-cloud/overview/).

## Connecting Salesforce Service Cloud to Assembled

If you run into any issues during this step, please reach out to our [Support Team](mailto:support@assembledhq.com)

- OAuth 2.0
  - A Dedicated Salesforce Integration User is required
- **NOTE: This allows Assembled to make API requests on behalf of your account. As a result, this will cause an overall increase in your API usage**
- Successfully connecting Salesforce Service Cloud will have a **“Synced”**, **“Sync in progress”** or **“Connected”** field on the specific card in the **Settings > Integrations** page

## Sync jobs on Assembled

For Salesforce Service Cloud, these are the sync jobs created:

| Sync job | Definition | Frequency |
| --- | --- | --- |
| backfill | Syncs data in the past, for a total of 5 years from the time the sync job was created. | As fast as possible |
| default | Syncs new and updated data | Every 5 minutes |
| agent_states | Syncs agent states | Every 30 seconds |
| case_histories | Syncs all CaseHistory objects | Every 5 minutes |
| **OPTIONAL SYNC JOBS** |
| live_chat_transcripts | Syncs all LiveChatTranscript objects which contain chat data | Every 5 minutes |
| email_messages | Syncs all EmailMessage objects | Every 5 minutes |

## Verify the Salesforce Service Cloud connection

There are two places on Assembled for you to verify if the integration has been correctly added. If either of these display zero or abnormal numbers, please reach out to our [Support Team](mailto:support@assembledhq.com)

| Assembled | Type of data |
| --- | --- |
| Realtime dashboard | Agent states + contact data |
| Staffing Timeline → Contacts | Contact data |

## Salesforce Service Cloud endpoints/services that we integrate with

`/v58.0/query`

| Question | Answer |
| --- | --- |
| What data does this endpoint provide? | All data from the requested Salesforce object |
| What is the rate limit for this endpoint? | 10 requests / minute |
| How often does Assembled hit this endpoint? | Depends on the type of object we’re requesting (view table above for the frequency) |

## Salesforce Service Cloud integration mappings

Ticket data (`Case`)

| Salesforce Service Cloud | Assembled |
| --- | --- |
| firstRespondedAt - call_started_at (Phone) OR firstRespondedAt - chat_started_at (Chat) OR firstRespondedAt - external_created_at (Email) \[SLA\] | first_response_duration |

Ticket data (`LiveChatTranscript`)

| Salesforce Service Cloud | Assembled |
| --- | --- |
| StartTime.Time - CreatedDate.Time (SLA) | first_response_duration |

Ticket status (`Case`)

| Salesforce Service Cloud | Assembled |
| --- | --- |
| New | new |
| Open | open |
| Pending | pending |
| Solved | solved |
| Closed | closed |
| On Hold | hold |
|  | empty |

Ticket status (`LiveChatTranscript`)

| Salesforce Service Cloud | Assembled |
| --- | --- |
| Completed | solved |
| InProgress | open |
| Waiting | pending |
| Missed | closed |

Channels (Please note: This will be the 'Origin' in Case Fields in Salesforce. Assembled will do a _containing_ match, not an _exact_ match.)

| Salesforce Service Cloud | Assembled |
| --- | --- |
| email, web | email |
| phone | phone |
| chat | chat |

FAQ

- The Salesforce Service Cloud API rate limits reset every 24 hours, so it is important that we are in the know if a customer also has other integrations connected to Salesforce
- We track the SLA across all channels on the `Case` object via the `firstRespondedAt` - `CreatedDate` metrics from Salesforce Service Cloud

- If you are using a different metric for `firstRespondedAt` on Salesforce, please reach out to our [Support team](mailto:support@assembledhq.com) so that we can accurately parse that value from your Case object
- Although Salesforce is heavily customizable in terms of roles, ticket status, etc., we highly suggest using Assembled's mappings as outlined above in the tables above.
- Salesforce Service Cloud has a rate limit of 15,000 + (number of license holders \* 15,000), up to a maximum of 1,000,000 requests every 24 hours. Assembled enforces a daily limit of 10,000 Salesforce API requests to help prevent exceeding your Salesforce API allowance.
- We use [UserServicePresences](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userservicepresence.htm) to sync agent states from Salesforce. In order to get agent states, you'll need to ensure you have :

- ​[Omnichannel](https://help.salesforce.com/s/articleView?id=omnichannel_intro.htm&language=en_US&type=5) enabled.
  - Presence Statuses set up ([creating](https://help.salesforce.com/s/articleView?id=sf.service_presence_create_presence_status.htm&type=5) and [configuring](https://help.salesforce.com/s/articleView?id=sf.service_presence_status_settings.htm&type=5).
  - The 18-digit Salesforce ID for your Users (To see this field in Assembled go to People > `...` > Edit > \[You may need to scroll down\] Salesforce ID). Do not input the 15-digit Service Cloud ID - it won't pull in the Presence Statuses.
