Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject

Posted on by 25

I am seeing unexpected results for a recently created Queue for which I am automatically creating a Case when emails are sent to a shared mailbox. I have a few Queues that are setup the same way and they are working as expected, so I am at a bit of a loss.

The only difference I've noticed initially is that the emails coming into the shared mailbox are not threaded the emails, rather they are standalone emails being sent from a ServiceNow ticket system. The emails have the same subject and come from the same email address and come in at different times, even different dates. 

What I am seeing is that the first time an email comes into the shared mailbox with a new subject, a Case is being created as expected. However, subsequent emails with the same subject are creating new cases instead of being added to the timeline of the first Case. So what I end up is multiple Cases with the same subject. For example...

pastedimage1677891758266v1.png

Suggestions on how to address this? I've thought about creating a flow to merge cases with the same subject, but that seems imprecise and prone to not getting it right. 

  • jazucco Profile Picture
    jazucco 25 on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject
    [quote user="Leco Lv"]

    Hi partner,

    "Would this result in the second email being associated with the first Case as an Activity?"
    Yes, using this flow is automatically synced into the first case as an activity.

    Sorry for not expressing clearly yesterday, I just provided a general idea. Today I re-tested, "Skip creating a new case if the subject matches an existing case." Instead of skipping creating a new case, I added the condition (If yes/no) to sync the mail if it has the same subject to a timeline with cases of the same subject, so no new cases are created, which is exactly what you need. If the subject is not the same, it will create a new case.

    Please refer to the followings:

    pay attention to adding single quotes, otherwise it will not be recognized as a string.

    pastedimage1678258752309v7.png

    pastedimage1678257673771v1.png

    If yes:

    pastedimage1678258384953v3.png

    pastedimage1678258419812v4.png

    You don't need to edit the If no part, you just need to drag the part in the picture.

    pastedimage1678258596789v6.png

    [/quote]

    Thanks I was thinking something similar, I've implemented and will monitor as emails start to come in. Will let you know how it turns out. 

  • Verified answer
    Leco Lv Profile Picture
    Leco Lv on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject

    Hi partner,

    "Would this result in the second email being associated with the first Case as an Activity?"
    Yes, using this flow is automatically synced into the first case as an activity.

    Sorry for not expressing clearly yesterday, I just provided a general idea. Today I re-tested, "Skip creating a new case if the subject matches an existing case." Instead of skipping creating a new case, I added the condition (If yes/no) to sync the mail if it has the same subject to a timeline with cases of the same subject, so no new cases are created, which is exactly what you need. If the subject is not the same, it will create a new case.

    Please refer to the followings:

    pay attention to adding single quotes, otherwise it will not be recognized as a string.

    pastedimage1678258752309v7.png

    pastedimage1678257673771v1.png

    If yes:

    pastedimage1678258384953v3.png

    pastedimage1678258419812v4.png

    You don't need to edit the If no part, you just need to drag the part in the picture.

    pastedimage1678258596789v6.png

  • jazucco Profile Picture
    jazucco 25 on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject
    [quote user="DAnny3211"]

    hi

    It sounds like the issue may be related to the way the queue is set up to handle duplicate emails. By default, queues in Dynamics 365 Customer Service will create a new case for each email message that comes in, even if it has the same subject as an existing case. This is controlled by the "Create cases for email messages" option in the queue settings.

    To address the issue of multiple cases being created for the same subject, you can try adjusting the queue settings to prevent duplicates. To do this, go to the queue record and select the "Email Configuration" tab. Under "Duplicate Detection", select the "No Automatic Filtering" option. This will ensure that all emails are processed by the queue, even if they have the same subject as an existing case.

    Alternatively, you can create a custom plugin or workflow to check for existing cases with the same subject and merge them together. This would be a more complex solution, but would allow for more precise control over the merging process.

    DAniele

    [/quote]

    I am not seeing the "Email Configuration" tab on my Main Queue form. Just an email settings block which does not have any settings for automatic filtering. 

    pastedimage1678205209670v1.png

    I am leaning towards creating a flow to merge the Cases, but that seems a bit daunting as I've not yet found any documentation on how to merge cases using a Cloud Flow. Only documentation points to the manual merge using the UI. Any suggestions on documentation or examples of how to merge cases using a Cloud Flow? 

  • jazucco Profile Picture
    jazucco 25 on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject
    [quote user="Leco Lv"]

    Hi partner,

    This is related to the way external users reply to emails, I guess your external users are creating a new email every time to reply, so the "record creation and update rule" will be triggered every time. This doesn't happen if your external users use "reply all".

    Or you can modify the flow of the system and add a filtering condition before creating a new case.

    pastedimage1678183099266v1.png

    [/quote]

    In this case it's not an individual user that is generating the email, it's an email from a ticketing system (ServiceNow) sending an update to a ticket.

    That said, looking at the image of your suggested approach where you skip creating the a new Case if the subject is a match to an existing Case. Would this result in the second email being associated with the first Case as an Activity? That is what I'm hoping for.

    Will try to test this out and see what happens. 

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject

    hi

    It sounds like the issue may be related to the way the queue is set up to handle duplicate emails. By default, queues in Dynamics 365 Customer Service will create a new case for each email message that comes in, even if it has the same subject as an existing case. This is controlled by the "Create cases for email messages" option in the queue settings.

    To address the issue of multiple cases being created for the same subject, you can try adjusting the queue settings to prevent duplicates. To do this, go to the queue record and select the "Email Configuration" tab. Under "Duplicate Detection", select the "No Automatic Filtering" option. This will ensure that all emails are processed by the queue, even if they have the same subject as an existing case.

    Alternatively, you can create a custom plugin or workflow to check for existing cases with the same subject and merge them together. This would be a more complex solution, but would allow for more precise control over the merging process.

    DAniele

  • Suggested answer
    Leco Lv Profile Picture
    Leco Lv on at
    RE: Creating Cases from Emails - Cases with duplicate title and subject being created for unthreaded emails with same subject

    Hi partner,

    This is related to the way external users reply to emails, I guess your external users are creating a new email every time to reply, so the "record creation and update rule" will be triggered every time. This doesn't happen if your external users use "reply all".

    Or you can modify the flow of the system and add a filtering condition before creating a new case.

    pastedimage1678183099266v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans