Question
How are incoming emails threaded to tickets?
Answer
When an inbound email is received, Zendesk checks the email for references to existing tickets. This determines whether the email will be added as a ticket update or if a new ticket is created.
Zendesk checks three main references for threading emails:
- Elements in the email header
- Encoded IDs in the message body
- Encoded IDs in the Zendesk receiving address
1. 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 will check for those message IDs on existing tickets. If Zendesk finds a match, the email will be added as a reply to the matching ticket.
The email header is visible in the email source. See the article: Viewing the HTML and original source for incoming tickets for details.
For more information about troubleshooting email headers, see the article: Why do emails thread to the wrong ticket?
2. 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, which helps match replies to the correct ticket.
An encoded ID can be added to any email body and is not exclusive to emails generated by Zendesk. The encoded ID must appear inside square brackets [1G7EOR-0Q2J]
in order for Zendesk to detect the ID.
3. 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 would appear like this: support+id1G7EOR-0Q2J@mondocam.zendesk.com
.
This structure helps allow the email to thread to the corresponding ticket, even if no other references are present.
This use of encoded IDs only works for Zendesk support email addresses and does not work for external support addresses.
How to access the encoded ID
You can find the encoded ID of a ticket by following the steps below:
- 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 manipulating ticket comments.
Conversation ID
from the email body, and not Reference
or In-Reply-To
in the email header.
0 comments