Understanding how LiveAgent processes incoming emails

Upon receiving a new email, the software determines whether to generate a new ticket or add it to an existing ticket by examining the email's source code. The source code includes various email headers that contain useful information. The system looks for the following records in the order specified:

  • In-Reply-To
  • References
  • Thread-Index (applies only to emails sent from Outlook)
  • Feedback-ID (applies only to emails sent from eBay)

For the In-Reply-To and References headers, the system searches for the email's unique ID, available in the Message-ID header, in already existing tickets. If any message in any ticket has a Message-ID value that's present either in the In-Reply-To or References of a received email, the email is added to the existing ticket. For the Thread-Index and Feedback-ID headers, the system searches for the same value in the same headers in existing tickets.

If no ticket matches based on the mentioned headers, the software examines the subject of the email to see if it contains a LiveAgent ticket ID. If it does, the message is added to that ticket. If the ticket ID check also fails, a new ticket is created.

Check this article to see how to retrieve the source of an email message.

The example screenshot below illustrates how two seemingly unrelated emails with different subjects were merged into a single ticket. By accessing their source codes and examining the headers, we can deduce that the second email is actually a reply to the first, despite its different content. This is because the Message-ID value of the first email is noted in the In-Reply-To and References headers of the second email.

Ticket status considerations

There are special situations where, regardless of the email's source code or ticket ID in the subject, an email that should be added to an existing ticket instead creates a new ticket. This is related to the status of the ticket that the message should be added to. If a ticket is in the Closed or Deleted status, any reply to it will create a new ticket. The same applies to tickets in the Resolved status if the "Reopen Resolved Ticket" setting is turned off under Configuration > System > General.

IDs overwritten by email servers

In some rare cases, the recipient's email server may overwrite the Message-ID generated by our software. In such instances, the customer's response does not contain the Message-ID value generated by LiveAgent, resulting in the creation of a new ticket rather than appending the reply to the existing one. An example of this is Amazon SES (Simple Email Service) (learn more here), which we do not recommend using due to this behavior.

This problem can be bypassed by inserting the generated Message-ID value into the References header of a sent message. This way, even if the Message-ID value is overwritten, LiveAgent will still be able to locate the generated ID in the References header and look for it in the database upon receiving a reply. Cloud-hosted customers are welcome to contact our support and request to activate this function for their account. Customers with self-hosted installations can activate this function in the database by adding a new record "mail_references_myself = Y" to the "qu_g_settings" database table.

×