Overview
Emails with the same subject from different users are being merged into existing conversations rather than creating new conversations. This can cause confusion and disrupt the workflow as unrelated emails are mistakenly linked together.
Solution
To ensure that unrelated emails with identical subjects from different users do not get merged into existing conversations, it is important to understand the backend logic used for email association and adjust settings or expectations accordingly. Here are the steps and logic used by the backend to determine email association:
-
Email Address Pattern Matching:
- If the “To” email address alias follows the pattern
<r|a|t.{suffix}.{case-id}>@domain.com
, the incoming email is associated with the case identified bycase-id
.
- If the “To” email address alias follows the pattern
-
Header Analysis:
- If the incoming email contains “In-Reply-To” or “References” headers, the backend searches the database for messages with the specified message IDs and associates the email with the corresponding case.
-
Direct Case ID in Address:
- If the “To” email address includes
+id@domain.com
, the incoming email is linked to the case identified bycase-id
.
- If the “To” email address includes
-
Identifier in Subject or Body:
- If the email subject or body contains any of the following patterns, the email is associated with the case identified by
case-id
:[KAYAKO #ABC-123-] [KAYAKO #ABC-] [#ABC-123-] [#ABC-] [ABC-] [KAYAKO #]
- If the email subject or body contains any of the following patterns, the email is associated with the case identified by
-
Subject Prefix Matching:
- If the email subject starts with
RE:
,R:
, orFWD:
prefixes, the system searches for cases with the same subject (with and without the prefix) that are not moved to trash and do not have CLOSED status. If a matching case is found (limit=1), the email is associated with that case.
- If the email subject starts with
Root Cause and Resolution
The root cause of unrelated emails being merged into existing conversations is the matching email subjects while the original cases are still open and not in CLOSED status. To prevent this:
- Ensure Unique Subjects: Users should use unique subjects for unrelated emails to avoid accidental merging.
- Close Irrelevant Cases: Ensure that cases which should not receive further emails are moved to the CLOSED status.
- Adjust Email Handling Logic: Consider modifying the email handling logic if possible, to avoid merging based on subject alone, especially for high-frequency identical subjects.
By understanding and managing these rules, email merging issues with identical subjects can be mitigated effectively.
Also see: Replies Creates New Conversations or Tickets Instead of Being Appended to an Existing One