Problem

One of my client’s using Dynamics CRM Online 2016 Update had a requirements to create Case (renamed to Enquiry) records when an email arrives to their info@*****.com mailbox.  Using OOTB Automatic Record Creation and Update Rules feature a Case is created and the email is visible under Activities.

Activities in Case
Activities in Case

Our client felt that the user experience wasn’t great and the original Email was hard to find with all the other activities got created afterwards.

Solution

The solution was to extract the attachments from the email message and create notes against the Case record during the case creation process.  Below are the steps used to implement the solution.

  1. Create a custom workflow activity to extract the attachments and create notes
  2. Create a workflow which includes the above custom workflow activity as a Step
  3. Create an Automatic Record Creation and Update Rule
  4. Specify Record Creation and Update Details which calls the workflow created in step 2

Implementation

Create a custom workflow activity to extract the attachments and create notes

Below is the source code of the custom workflow activity.

Create a workflow which includes the above custom workflow activity as a Step

  • Create a workflow and name it Extract Attachments from Email – Create Notes – Attach to Enquiry
  • Set the Entity as Email
  • Enable workflow to run as a child process.
  • Add the custom workflow activity ExtractAttachmentsFromEmailAndCreateNotes as a step.
Workflow - Extract Attachments from Email - Create Notes - Attach to Enquiry
Workflow – Extract Attachments from Email – Create Notes – Attach to Enquiry
  • Custom workflow activity requires two inputs.
    • Email
    • Case (Enquiry)
Custom Workflow Activity Inputs
Custom Workflow Activity Inputs
  • Activate the workflow.

Create an Automatic Record Creation and Update Rule

  • Navigate to Settings > Service Management and click on Automatic Record Creation and Update Rules.
Automatic Record Creation and Update Rules
Automatic Record Creation and Update Rules
  • Create a new Record Creation and Update Rule.
Create Automatic Record Creation and Update Rule
Create Automatic Record Creation and Update Rule

Specify Record Creation and Update Details which calls the workflow created in step 2

  • Create a new Record Creation and Update Details record.
Create Record Creation and Update Details
Create Record Creation and Update Details
  • Configure the conditions and actions.
  • Under Specify Other Actions, add a new step to Start a Child Workflow.
  • Select the Workflow created in Step 1
Configure Conditions and Actions
Configure Conditions and Actions

That’s it (Assumption: The mailbox is configured to receive emails)

Now send an email with attachments to the mailbox.

Notes In Case
Notes In Case

The attachments in the Email Message are now under Case record’s Notes section.

Thank you for visiting Dyn365Apps.com.

Until next time..

 

Dynamics 365 – Extracting attachments from an incoming email, create case, and add attachments to as notes

Leave a Reply