A ticket import times out. Your worker retries. The destination now contains two copies of the same conversation, and both are waiting for an agent.
That is an awkward moment to discover that your migration script treats every retry as a new ticket.
Moving a help desk has the same failure modes as other data integration projects: incompatible schemas, partial writes, delayed events, and uncertain responses. It also has an extra complication. The records belong to conversations that customers and agents may still be updating.
This guide covers a practical migration design: preserve identity, make interrupted work recoverable, reconcile the result, and switch traffic only when you can account for the remaining changes. Zendesk provides the concrete API examples; the design decisions apply across platforms, while endpoint behavior must be checked for each source and destination.
1. Decide what a successful migration preserves
Start with a ticket that contains an internal note, an attachment, a reassignment, and a customer reply. If the destination displays the subject correctly but exposes the internal note to the customer, the import has failed.
Before writing an importer, agree on a mapping contract with the support team.
| Source data | Migration decision | Verification |
|---|---|---|
| Ticket identity | Keep a namespaced source reference and store the new ID | Every included source ticket has a destination mapping |
| Requester and organization | Resolve them before ticket creation | Relationships point to the intended records |
| Comments and internal notes | Preserve authorship, order, and visibility where supported | Compare normalized messages and inspect both user views |
| Attachments | Transfer files through supported mechanisms | Check file availability, size, and content where accessible |
| Status and custom fields | Map values explicitly | Reject or review unmapped values |
| Historical timestamps | Preserve supported fields; document exceptions | Compare stored timestamps and their meaning |
| Routing rules and integrations | Rebuild and test the required behavior | Run representative requests through the new setup |
Avoid treating similarly named statuses as equivalent. A source platform's “closed” state may have different reopening behavior in the destination. Record the intended behavior alongside the field mapping.
Include exclusions in the contract too: deleted records, unsupported message types, and old tickets retained only in an archive. A deliberate exclusion should be distinguishable from a failed transfer.
2. Keep source identity separate from destination identity
Ticket 4821 in the old system will not necessarily become ticket 4821 in the new one. The same applies to users, organizations, and comments.
Use a namespaced reference such as legacy-support:ticket:4821. Keep an explicit mapping between that reference and the destination ID. A subject line or requester email is a poor substitute: subjects repeat, and account relationships can change.
Import dependencies in an order the destination supports. Create the required organizations and users before tickets that reference them; handle comments and attachments according to the destination's import model. A missing author needs a documented fallback, not a silently invented identity.
Some teams split the work between engineering and support operations. Others bring in a help desk migration service to coordinate data transfer, platform configuration, and integrations. Either way, assign an owner to approve field mappings and another to verify that agents can use the migrated conversations.
3. Make retries recoverable before adding concurrency
Consider this sequence:
- The worker submits a ticket.
- The destination creates it.
- The connection drops before the response reaches the worker.
- The worker has no destination ID to save.
The outcome is unknown. Retrying the create operation may produce a duplicate.
The Amazon Builders' Library article on idempotent APIs explains how a caller-provided request identifier can make retries safe when the server implements that contract. The important condition is server support. Adding an arbitrary Idempotency-Key header does not create it.
Keep a durable ledger for create operations. This SQL schema is a starting point:
CREATE TABLE migration_creates (
destination_workspace TEXT NOT NULL,
source_workspace TEXT NOT NULL,
entity_type TEXT NOT NULL,
source_id TEXT NOT NULL,
operation_key TEXT NOT NULL UNIQUE,
state TEXT NOT NULL CHECK (
state IN (
'pending', 'in_flight', 'confirmed',
'needs_review', 'failed'
)
),
destination_id TEXT,
PRIMARY KEY (
destination_workspace,
source_workspace,
entity_type,
source_id
),
CHECK (
state <> 'confirmed' OR destination_id IS NOT NULL
)
);
Generate operation_key deterministically from the full migration identity and operation, rather than assigning a new key on every attempt. Serialize work for each identity with an atomic claim or locking mechanism. The table alone does not implement worker coordination.
Persist in_flight before making the external request. Mark the operation confirmed only after you have a destination ID, including successful completion of an asynchronous import job when applicable.
After a crash or timeout, reconcile an uncertain operation before another create. If the destination supports a documented idempotency mechanism, reuse the original key and payload within its retention rules. Otherwise, use an exact source reference to locate the result, accounting for lookup consistency. If the result remains uncertain, move it to needs_review.
An external_id field can help reconciliation, but its presence does not prove that the API enforces uniqueness or makes creation idempotent. A local transaction also cannot atomically commit a remote API write.
4. Separate the initial copy from later changes
A historical export becomes stale while agents continue working. Plan for an initial copy followed by incremental exports, with a durable checkpoint for each stream.
Zendesk's incremental export guide documents cursor-based ticket exports. An initial request looks like this:
curl --fail-with-body --get \
"https://${ZENDESK_SUBDOMAIN}.zendesk.com/api/v2/incremental/tickets/cursor.json" \
--header "Authorization: Bearer ${ZENDESK_ACCESS_TOKEN}" \
--data-urlencode "start_time=${START_TIME}"
Provide credentials through your normal secret-management process. This request illustrates extraction only; it does not implement an importer or retry policy.
For subsequent requests, use the returned cursor. Check end_of_stream rather than assuming that a small page means completion. Persist the raw page and its checkpoint together before acknowledging ingestion, or retain the previous checkpoint until the page's work is durably recoverable.
Keep extraction progress separate from destination confirmation. “We downloaded every page” and “every ticket is present in the destination” are different claims.
Zendesk excludes the most recent minute from ticket and ticket-event exports. Reaching the end of the stream therefore does not prove that a change made seconds ago has been captured. Allow for that lag during the final synchronization.
Export conversations explicitly
A ticket record is not a complete conversation export. Identify the endpoints required for message history, authors, and attachments.
For example, the Zendesk Incremental Exports reference specifies that ticket-event exports need the comment_events sideload to include comment content. Without it, the event can indicate that a comment exists without returning its body.
Preserve each comment's source identity so overlapping exports can be reconciled without appending the same message twice. Treat customer replies as separate entities, not just changes to a ticket's subject or status.
5. Use the destination's import behavior deliberately
An export payload is not automatically a valid import payload. Transform it through an explicit adapter, and reject fields or values you cannot map safely.
Zendesk's Ticket Import API supports historical ticket and comment timestamps with documented restrictions. Attachments require an upload followed by a token in the comment parameters. Copying an old attachment URL into a message is not the same as transferring the file.
The same documentation describes trigger behavior: triggers do not run when a non-closed ticket is imported, but they resume on subsequent updates. A successful historical import therefore does not establish what will happen when your delta worker updates that ticket.
Test both operations in a controlled environment. Check customer notifications, assignment changes, outbound webhooks, and any automation that creates an external side effect. Restore required production behavior through an explicit activation step.
Rate limits need their own handling. Follow the destination's response headers and endpoint-specific limits rather than relying on a single account-wide number. Zendesk documents these distinctions in its rate-limit reference. Respect Retry-After when supplied, and keep concurrency bounded so retries do not amplify throttling.
6. Reconcile content and behavior
Equal ticket counts are useful evidence, but they cannot detect a missing ticket balanced by a duplicate.
Reconcile by source identity. For each included ticket, compare its requester relationship, mapped status, expected comments, and attachment results. Normalize only documented differences, such as equivalent timestamp formats. Aggressive normalization can hide a damaged message.
Give unresolved work a visible queue:
SELECT entity_type, state, COUNT(*) AS operation_count
FROM migration_creates
GROUP BY entity_type, state
ORDER BY entity_type, state;
This report describes the import ledger. Compare it with the export inventory and destination records as well; a record never entered into the ledger will not appear as a failure here.
Run a rehearsal that includes difficult cases: inactive authors, long threads, private notes, non-ASCII text, large attachments, and custom fields with obsolete values. Deliberately interrupt an import after submission and verify that recovery does not blindly create another ticket.
Finally, inspect migrated conversations as both an agent and a customer. Data comparisons will not tell you whether an agent can find an internal note or whether a customer can download an attachment they should be able to access.
7. Switch traffic with a defined write boundary
Keep one system authoritative for agent edits at a time. Letting agents freely update both platforms creates a conflict-resolution problem that a one-way importer cannot solve.
A practical cutover sequence is:
- Finish the historical copy and verify a representative rehearsal.
- Pause source-side agent edits and outbound automation at an agreed boundary.
- Route or buffer incoming messages through a tested handoff, including replies to old threads.
- Run final exports after the source's visibility lag, then resolve outstanding import work.
- Verify critical conversations and enable the destination's live routing and automation.
- Send controlled requests through each channel and confirm that replies reach the intended conversation.
The buffering step must preserve incoming messages while routing changes. A quiet queue is not evidence of successful migration if messages have stopped arriving.
Keep the source available for verification according to your retention requirements, and continue checking for late arrivals. Zendesk's webhook documentation describes retries for certain failed requests and a circuit breaker. Design consumers to tolerate repeated delivery, and reconcile against the source rather than treating webhook silence as proof of completeness.
Write a rollback decision before switching. Once agents send replies from the destination, routing traffic back does not move those replies into the source. Record destination-only activity and define how it will be reconciled if you reverse the handoff.
Conclusion
A migration becomes manageable when you can answer three questions: which source record produced this destination record, what happened to the last attempted write, and which changes remain unconfirmed?
Start with a small rehearsal that includes an interrupted request. Prove that you can recover it, preserve private notes, and reconcile the conversation. Then scale the import and rehearse the traffic handoff. Those checks provide a much stronger basis for going live than a successful HTTP response count.
FAQ
Does an external ID prevent duplicate tickets?
Only if the destination documents and enforces the relevant uniqueness or idempotency behavior. Otherwise, use it as a reconciliation reference and handle uncertain writes explicitly.
Should every HTTP failure be retried?
No. Separate validation and permission failures from throttling and transient faults. A timeout after a create request needs outcome reconciliation or documented server-side idempotency before a safe retry.
Can the old and new help desks run at the same time?
They can remain accessible during the transition. Define which platform owns new work and edits, how incoming messages are handed over, and how late activity is reconciled. Unrestricted editing in both requires a separate conflict-resolution design.
Top comments (0)