Automatically create new records, not just cases
Since CRM 2013 SP1 we had the ability to configure automatic rule that creates cases based on incoming email or social activity.
This worked very nice and in the latest update, this feature was enhanced even more.
Now you can configure the rule to create new records of any type, not just cases.
 |
Automatic record creation |
As the source record, you can use the common activities:
- Email
- Social activity
- Task
- Phone call
- Appointment
- Service activity
- Custom activity
These activities can be converted to any default (system) entity records or custom entity records. For example, you could create a lead, opportunity (system records) or incident (custom record) from an incoming email.
Capture data from external sources
You can also capture additional valuable customer information provided by an external application in the form of JSON (a collection of name-value pairs) and use it to enhance the quality of the target records and set various conditions in the record creation and update rules.
These activities have an Additional Parameters attribute:
- Email
- Social activity
- Task
- Phone call
- Appointment
- Service activity
- Custom activity
This attribute stores the JSON payload received from an external application.
Be aware, for example Fax, Letter, Campaign activity or campaign response do have this field even official documentation states otherwise.
To capture this information in CRM, you can define channel properties and associate them with a particular rule or share them across multiple rules of the same source type. For example, along with a social post, you can capture important information about the post such as sentiment value. Sentiment value is the property of social activity, so you can use this property in any other record creation and update rule of type Social Activity. .
Here's the correct format in which CRM should receive JSON payload (data received as name/value pair in JSON format) from the external application:
{“PropertyName1”:”Propertyvalue1”; “PropertyName2”:”Propertyvalue2”}
Note
Any configuration done in the channel properties is only valid if those name value pairs exist in the JSON payload. Also, you must only use parameters received from the external application in the rule item conditions and as record properties.
Activate or deactivate a rule
For any records creation and update rule to apply to a matching incoming activity, after you add the rule items, you must activate the rule.
How does record creation and update rule work with queues?
In a record creation and update rule, when you specify a queue for a source type, any incoming activity from that source is added as a queue item for that specified queue. That is, if a rule for a particular source activity and queue combination is active, the rule processes the incoming activity on that queue to create or update records.
For an email source type, specifying a queue is mandatory (although the field is not marked as mandatory, the error appears when you try to activate the rule). For all other source types including custom activities, it is optional.
Rules in solutions
The record creation and update rules can be packaged as a part of a CRM solution. Customizers and developers distribute solutions so that organizations can use Microsoft Dynamics CRM to install and uninstall the business functionality defined by the solution.
Keep the following things in mind about using rules in solutions:
- Any new rule that you created in Microsoft Dynamics CRM Online 2015 Update 1 can't be exported to an earlier release.
- Any rules upgraded to and edited in Microsoft Dynamics CRM Online 2015 Update 1 can't be exported back to an earlier release.
Why is it called Creation and Update?
This feature can not only create a record, but it can also update existing records.
The primary action area can only contain one step - record creation. It is optional. You do not need to create any record.
When the rule is activated, it can update the related records. You can update the sender record (when originating from email) , you can also update whatever entity you expect to have in the "Regarding" field.
It works like the workflow.
When I was setting up my rules, I have received error like this:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #F0AC6BEADetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #F0AC6BEA</Message>
<Timestamp>2015-05-18T11:21:12.8868194Z</Timestamp>
<InnerFault>
<ErrorCode>-2147088140</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Error occured during activating Convert Rule.Please check your privileges on Workflow and kindly try again or Contact your system administrator.</Message>
<Timestamp>2015-05-18T11:21:12.8868194Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
The resolution is quite simple, there is an error in the Record Creation and Update Rule Item, so check the items and look for errors in the Actions area.
So next time,
Michal