Question

How are incoming emails threaded to tickets?

Answer

When an inbound email arrives, Zendesk checks the email for references to existing tickets. This check determines if the email is a ticket update or if a new ticket is created.

Zendesk checks three main references to thread emails:

  • Elements in the email header
  • Encoded IDs in the message body
  • Encoded IDs in the Zendesk receiving address

Elements in the email header

In the email header, the References and In-Reply-To lines contain the message IDs for other emails in the same thread. Zendesk checks these message IDs on existing tickets. If Zendesk finds a match, the system adds the email as a reply to the matching ticket.

The email header is visible in the email source. See Viewing the HTML and original source for incoming tickets.

For more information to troubleshoot email headers, see Why do emails thread to the wrong ticket?

Encoded IDs in the message body

An encoded ID is a unique reference to a specific ticket. Zendesk includes an encoded ID by default in every outbound notification email to help match replies to the correct ticket.

Any email body can include an encoded ID. It is not exclusive to emails that Zendesk generates. The encoded ID must appear inside square brackets, for example, [1G7EOR-0Q2J], so Zendesk can detect it.

Encoded IDs in the Zendesk receiving address

Zendesk support email addresses may use aliases that include the encoded ID. For example, the email address for a ticket with encoded ID 1G7EOR-0Q2J in the mondocam subdomain appears like this: support+id1G7EOR-0Q2J@mondocam.zendesk.com.

This structure helps ensure that the email threads to the corresponding ticket, even if no other references exist.

This use of encoded IDs only works for Zendesk support email addresses. It does not apply to external support addresses.

To access the encoded ID:

  • Use the {{ticket.encoded_id}} placeholder in macros or ticket comments to show the encoded ID
  • Use the Tickets API to view the encoded_id parameter. This approach allows API workflows to access the encoded ID without manipulation of ticket comments.
Note: Contrary to standard ticket comments, to thread emails, comments from side conversations use the Conversation ID from the email body and not Reference or In-Reply-To in the email header.
Powered by Zendesk