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

# Salesforce Service Cloud

> Import Salesforce Service Cloud case history into Plain with a script built on the API.

Bringing your Salesforce Service Cloud case history into Plain takes a short script built on the Plain API. Your team keeps every past case, searchable alongside live threads, from the day you switch. This page covers how Service Cloud's objects map onto Plain's and the decisions to make before you run it.

This page is about moving your support history into Plain. To sync account and contact context onto live threads, see the [Salesforce integration](/docs/product/integrations/salesforce).

## What gets imported

* **Contacts → Customers**

* **Cases → Threads**

  * You choose which case statuses land as **Done** and which stay **Todo**

  * The case's email and comment history is carried over. Anything written for your team appears as an internal comment in Plain

* **Case fields you choose → Labels**

* **Original timestamps**: every thread and every message keeps the date it had in Salesforce, so your history stays in order

* **A link back to the original case**, so anyone reading the thread in Plain can still find it in Salesforce

CSAT ratings and custom fields on cases are not imported. See [Migrating from another tool](https://help.plain.com/article/migration) for the full picture of what you'll rebuild in Plain.

Importing history doesn't trigger [SLAs](/docs/product/platform/slas), [auto-responses](/docs/product/platform/auto-responses), or [workflows](/docs/product/workflows), so nothing goes out to your customers and no SLA clocks start on old tickets.

## Mapping service cloud onto Plain

Service Cloud is configured differently in every org, so plan this against your own setup:

* **Statuses.** Plain has three status groups: **Todo**, **Snoozed**, and **Done**. Your case statuses are yours to define, so decide which land as Done and which stay Todo. If the original status matters for reporting, add it as a [label](/docs/product/platform/labels) so you keep it.

* **What counts as the conversation.** A case's history can sit across emails, comments, and feed activity. Decide which of those your team reads back, and import those. Comments meant for users should come in as internal comments in Plain.

* **Case IDs.** Use the case ID as each thread's external reference. That's what makes the import safe to re-run.

* **Accounts.** Plain sets a customer's [Company](/docs/product/platform/companies) automatically from their email domain. If your accounts don't line up with domains, create a [Tenant](/docs/product/platform/tenants) per account instead and attach customers to it.

* **Case origin, type, and priority.** Plain threads carry a priority and labels rather than a set of custom picklists. Pick the fields your team filters on and bring those across as labels.

* **Owners.** Decide which case owners map to the users you've already invited to Plain, and what to do with anyone who has left.

## Running the import

<Snippet file="shared/ticket-importer-walkthrough.mdx" />

If you'd like a hand scoping the script or a review before you run it at full volume, email [help@plain.com](mailto:help@plain.com).
