
First a bit of background on an unused corner of Dynamics CRM. Every activity record has a field called Additional Parameters which is designed to hold a Json payload. This is used by apps like Microsoft Social Engagement to automatically create CRM records from social media posts. The Json in the Additional Parameters field can be parsed and extracted by the record creation Rules.
We are going to create a record creation rule to create a contact record when an email is received by a queue and the rule will parse the Additional Parameter’s Json and use the Json data to populate the contact fields. By using an email queue as our message transport mechanism we have ready made message listener. Details on how to create an email queue with an Office 365 shared mailbox here
As the emails are originating from an external system they don’t have an Additional Parameters field so instead the Json payload goes in the subject line. A workflow is required to copy the subject line into the Additional Parameters field when the email is created.
Now create a record creation rule under service management that will parse the Json and create a contact record. The Json parsing is configured in the Channel Properties section by creating a Channel Property Group.
In the Channel properties you create a property for each data item to you want to parse. Each item gets a name and I found I had some problems if the name and application source did not match.
Now when you configure the record creation rule the channel properties are available for selection
Now I can send an email to my queue with the Json in the subject line
The record creation rule will create a contact from the Json. No code just configuration.