Auto update outgoing email subject with case title and case number in Dynamics365 CE

Dynamics 365 unified service desk enables users to compose emails in a separate popup window. Every time an agent is composing an email within a case, he/she will have to manually update the email subject and append case number. This could cause errors as incorrect case numbers might get copied or else, agent may forget to append the case number at all. All these issues could be avoided by auto updating case number while composing an email.

I checked internet for a solution and found some javascript custom code samples that could be imported as web resources on the email entity form. Since I did not want to use any custom code, I researched more and found that this could be achieved using a real-time workflow in Dynamics.

Here is the result:

Steps:

  1. Open Dynamics > Advanced Settings
  2. Go to Processes
  3. Add new process and select Email as the entity and “Workflow” as category

4 . This will now open the process editor window

5. Select Convert to a real-time workflow option

6. Now, let’s configure the workflow triggers, conditions and actions

Trigger

Select scope as Organization and update “Start when” field as Before

I have configured my process to trigger when “description” field changes in the email. You can use your own logic as per the requirement.

Condition

Not all outbound emails in dynamics are case related. Therefore, we need to filter only the case related emails. In my case, all support emails are being sent from the shared mailbox (UAT-Triage). I am using that as my condition to filter only case related emails.

If email “From” = <Shared mailbox> then execute workflow

Action

Add “Update record” action and select “Email” as the entity.

Click on “Properties“.

Update Subject with the help of “Form Assistant”. I am updating email subject with case title and case number.

Save and close the action box.

Save the workflow and click Activate

Time to test..

We were able to achieve the desired output without using any custom code. Real-time workflow is a powerful tool to enforce standards during form submissions in Dynamics365.

Try modifying the workflow trigger, conditions and actions according to your business requirement and you can design complex automations.

Happy Learning!



Categories: Dynamics 365

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: