Microsoft Social Engagement – Create Records in Dynamics 365

Microsoft Social Engagement (MSE) is a great tool, it provides us with the capability to connect with Dynamics 365 and use record creation rules to create leads, cases (and more). In this post I will examine how to leverage this functionality.

In this post I will cover …

  • Connecting MSE with Dynamics 365
  • Create social activities in Dynamics 365 from MSE
  • Edit the social activity form (To view the JSON payload.)
  • Using Record creation rules to create cases / leads
  • Auto create of cases / leads

Connect MSE with Dynamics 365

Before you can create any record in Dynamics 365 you’ll need to ensure that MSE and Dynamics 365 are connected. To do this open Microsoft Social Engagement and select the Settings option.

Next, select the connections option, and the pick “Microsoft Dynamics 365”. You can then use the “+” icon to add a new connection.

Next you will need to read and accept the disclaimer. It is basically just getting to confirm you are happy to send data to Dynamics 365. Assuming you are, simply click accept.

The connection type can be on premise or online. It is possible to have multiple connections defined. If you are connecting to Dynamics online all of the instances you connect will need to be within the same Dynamics 365 tenant.

If, like me, you are connecting to Dynamics 365 online, you should be able to click the “CHECK INSTANCES” icon. This will search for options and insert the details automatically. After you have selected the correct instance click the arrow to proceed to the next step.

Tip:
When I tried this in IE it didn’t work! (A problem that might be unique to me!) But if the option doesn’t work for you try a different browser. Chrome did the trick for me.

There will now be a pause whilst the connection magic happens.

Once the connection has been tested you will be presented with the following screen. I changed my instance to be the default. Notice that cases and leads are listed as entities by default. You could remove these and / or add whatever entities you wish. (For now, I will leave these unchanged.)

Note: Just because cases, leads or other entities are listed here it does not mean that these will be created in Dynamics 365. Sounds strange! What is actually going to happen is you will be able to create the creation of cases or leads in MSE. But to get them to actually create we will also need a record creation rule in Dynamics 365. (More on that in a second!) Once you are happy click save and you’ll be connected.


Create Social Activities from MSE (Not cases and leads!)

As already mentioned, at this point leads and cases will not create in Dynamics 365. But Social Activities should. So it will be worth testing this before you continue.

In MSE, navigate to a post you’d like to see in Dynamics 365. Select it and the use the “LINK TO DYNAMICS 365” option.

Once you have selected to connect the post with Dynamics 365. The instance will deault but you can change it if you have multiple connections defined.

Then select the entity you wish to create. (The one that won’t get created!!!)

Add a note. If you wish.

Then select create.

You should now be able to find the record in Dynamics 365. To test this I have used advanced find to look for “Social Activities”. Below you can see that the tweet I selected has been created in Dynamics 365.

Note:
In addition to the social activity record a contact and social profile will have been created for the author of the post.

Edit Social Activities form

Now you have confirmed that social activities are being created in Dynamics 365, you might want to edit the form! The reason being that we will want to see some additional information that isn’t shown by default.

A case (or lead) hasn’t been created. Nor has the note we entered shown in Dynamics 365. But this information is available to us as a JSON payload in the additional parameters field. Adding this field to the form will allow us to view this information and then we can decide how to utilise in the case or lead creation process.

Below you can see that I have opened the Social Activity entity in customizations and added the “additional parameters” field to the form.

Now when we view the social activity you can see some additional information. Including the note we entered and that the use requested an incident be created from this social activity.

Record Creation Rules

Next let’s consider how cases and leads can be created from social activities. (And if required any entity for that matter!) In settings, find the service management option and then open the “Automatic Record Creation and Update Rules” option.

First of all create and saved a new rule with the source type as social activity.


Next you will need to create an additional properties entry under channel properties. So select the additional properties field, then use the “new” option. Below you can see that I have called mine MSE Post Payload.

Once saved I have added two properties. I got the names for these by looking at the parameters field we added to the social activity form in the previous step. Notice that the data type is text, application source is MSE and I have added an optional description.


Next I completed my record creation rule by adding two record create and update details lines. Once that would create cases and one that would create leads.

Let’s look at one of these in more detail. (Both are similar!)

Notice that my condition is “userPreferredTargetEntity” equals “lead”. Obviously for the case I will say equals “incident”. To enter this you will need to select Channel Properties (under local values) and then select the required field. As shown below.

The final step is to add the action to create lead. You can just simply add create lead, I however wanted to add the notes entered in MSE into the lead details. To do this click set properties and add the notes to a suitable field. I opted to add them into the description field on the lead. (See below.)

Tip:
You can obviously also pick other fields from the social activity and set them to fields on the lead / case. Including post description, sentiment etc.

Auto Create Leads or Cases

Now I have a record creation rule when I manually link data from MSE into Dynamics 365 a case or lead will be created. But what if I want posts to automatically create leads without manual intervention?

If you navigate to settings in MSE you will be able to see automation rules, in here you can use the “+” to create new rules to automatically create cases etc.

Notice there is also a useful option to email you of any failures. (If you’d like!)

First you will give your rule a name, then you can enter whatever filters you like. (Essential as you probably don’t want leads for every post!) As with other areas in MSE you can filter on category of post, keywords, languages, tags, sentiment etc etc etc.

Next you will add one or more actions. In this example we are going to use the “link to dynamics 365” option and create a lead. But it is worth knowing that you can stream to Azure event hubs, assign to users and set labels with automation rules.

Below you can see the details I entered to create the lead. It is pretyy straight forward I am just selecting my dynamics instance, opting to create a lead or case and optionally adding a note. (Which as we saw in the previous step on record creation rules will end up in the description field on my leads.)

Once your rule is running, if you look back in the settings options you can view how many leads the rule has created in the last 7 days. This might be useful to know as you probably want to keep an eye on what is being created.

Hopefully this post has given you a good overview of the concepts involved in linking Microsoft Social Engagement data with Dynamics 365.

One thought on “Microsoft Social Engagement – Create Records in Dynamics 365

Leave a Reply to ivarandre Cancel 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 )

Facebook photo

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

Connecting to %s