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

# Building your own ticket importer

> Write your own importer to bring support history into Plain from a tool with no built-in importer.

If your support history lives somewhere Plain doesn't have a one-click importer for, you can bring it across yourself with a short script built on the Plain API.

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/custom-ticket-importer.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=d1f6de1bd919ccd49ffbf0178b3e9c09" alt="Building your own ticket importer in Plain" width="3040" height="1920" data-path="public/images/custom-ticket-importer.png" />
</Frame>

## When to use this

Plain has one-click importers for [Zendesk](/docs/product/integrations/zendesk), [Freshdesk](/docs/product/integrations/freshdesk), [Intercom](/docs/product/integrations/intercom), and [Help Scout](/docs/product/integrations/help-scout). If you're coming from one of those, use the importer and skip this page.

A custom import is the route for everything else: a less common support tool, a shared inbox, an internal ticketing system, or a spreadsheet of past conversations you still want your team to be able to search.

## What comes across

A custom import gives you the same foundations as the one-click importers:

* **Your conversation history**, as threads with their messages, replies, and internal notes

* **Original timestamps**, on every thread and every message, so your archive reflects when each thing happened

* **The right authors**, with inbound messages attributed to the customer and replies attributed to the user who sent them

* **Attachments**, uploaded to Plain and attached to the messages they belong to

* **Thread details** you decide to map across, including title, status, priority, labels, assignee, and a link back to the original ticket

Imported threads don't trigger [SLAs](/docs/product/platform/slas), [auto-responses](/docs/product/platform/auto-responses), or [workflows](/docs/product/workflows). Bringing in years of history is quiet, and nothing goes out to your customers.

<iframe sandbox="allow-scripts allow-popups allow-top-navigation-by-user-activation allow-forms allow-same-origin allow-storage-access-by-user-activation allow-popups-to-escape-sandbox" allowfullscreen="" src="https://embed.support.site?uri=https://supercut.ai/share/plain/ariT5uLP8w7CtqcOY8Qs1J" title="Embed" />

## What's involved

You'll write a script that reads conversations out of your current tool and creates them in Plain. In outline:

1. Create an API key with permission to import threads

2. Make sure the customers you're importing for exist in Plain

3. For each ticket, create the thread with its original date and details

4. Add that thread's messages, in batches, with attachments where you have them

5. Check the result for each item so you can retry anything that didn't land

Two things make this safer than it sounds. Each thread is imported against the reference it had in your old tool, so running the script twice skips anything already in Plain instead of creating duplicates. And you can start with a handful of tickets, check how they look in Plain, then run the rest.

## Before you start

Read [Importing threads](/docs/graphql/threads/import) in the developer docs. It has the full technical detail: the API reference, the permissions you'll need, how messages and attachments are structured, and examples of each call.

It's worth planning the import as part of your wider move. [Migrating from another tool](https://help.plain.com/article/migration) covers the order most teams work in and what you'll rebuild in Plain rather than import.

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