Create a Dynamics 365 record from a social post

Send a post found with Microsoft Social Engagement to your Dynamics 365 instance to create a record. For example, you can automatically convert posts to cases for customer service, or to leads for your sales team. When you create a social activity, if the author of the post doesn’t have a social profile in Dynamics 365, the system creates a social profile and contact record, and then links the social profile with the contact record. When a record is created in Dynamics 365, you can see the details about this record in Social Engagement.
Learn about the prerequisites to establish a connection with Dynamics 365 on how to configure your online and on-premises Dynamics 365 instance to connect with Social Engagement.

Specify record details

You can define the information to show in Dynamics 365 record details when a record in Dynamics 365 is created from a social post. Depending on your selection, Dynamics 365 fields shows the information about the connected instance and selected entity. To familiarize yourself with the social activity record type or the Dynamics 365 record creation and update rules feature, see MSDN: SocialActivity entity messages and methods, CRM Help & Training: Set up rules to automatically create or update records in CRM.

Define the fields of a Dynamics 365 entity that you want to display in Dynamics 365 Record Details in Social Engagement when a record of the same entity is created from a post. Add the fields you want to see in the Dynamics 365 Record Details when you define the entity details in Social Engagement.

Note

Only the custom entities in Dynamics 365 which are in relationship with the Social Activity entity are visible in Social Engagement. For more information, see TechNet: Create and edit entity relationships.

Define or edit fields for record details

  1. In Social Engagement, go to Settings > Connections > Microsoft Dynamics 365.

  2. In the Microsoft Dynamics 365 Connections pane, select the Dynamics 365 instance that you want to define entity details for.

  3. In the Dynamics 365 Instance pane, select the record type under Record details.

  4. In the Entity Details pane, select the Dynamics 365 fields to show in the Dynamics 365 Record Details form for the selected entity. Or click Add Add button to add more fields.

  5. Reorder the fields using the up arrow Reorder Dynamics 365 entity attributes up or down arrow Reorder Dynamics 365 entity attributes down or remove fields using the Remove button Delete button.

    Entity details

    Important

    You can't remove an entity if there are active automation rules using that entity. You will first need to deactivate or delete all automation rules using that entity. More information: Route posts using automation rules

  6. To apply your changes, in the Dynamics 365 Instance pane, click Save Save button.

Convert a social engagement post to a social activity

  1. In Social Engagement, click Posts on any Analytics page to see the posts list.

    --OR--

    Go to Microsoft Social Engagement > Social Center to see your streams.

  2. Go to the post you want to convert to a social activity record in Dynamics 365, and then click Link to Dynamics 365 Link to Dynamics 365 button in Social Engagement.

    Link to Dynamics 365 button in Social Engagement

  3. Select from the available instances, and then select the record type you want to create from the Entity drop-down list. The Entity drop-down list shows only those entities that are configured in the Dynamics 365 Instance panel in the Dynamics 365 Record Details section. If a single entity is configured with an instance, it will be selected by default.

    Select instance and entity

  4. Add any additional information, up to 250 characters, related to the record in Notes, and then click Create.

    The post now displays a Linked button Link to Dynamics 365 button in Social Engagement along with the name of the Dynamics 365 (online) instance it is linked to.

    Linked button by a post in Social Engagement

Tip

  • To automatically create records in Dynamics 365 (online) from social posts that match a specific data set, you can create automation rules. More information: Route posts using automation rules
  • If the linked Dynamics 365 (online) instance has Social Engagement system settings set to disabled, the link creation fails and shows this error message: "Dynamics 365 can’t receive social data from Social Engagement". Contact your Dynamics 365 (online) administrator to review the Disable Social Engagement system settings. More information: TechNet: Control social data
  • If Dynamics 365 (online) allows incoming social activities, but no rules are configured to create Dynamics 365 (online) entities out of them, the linking operation does succeed. However, opening link details in Social Engagement will provide details about the social activiy only. Contact your Dynamics 365 (online) administrator if this happens. More information: CRM Help & Training: Set up rules to automatically create or update records in CRM

Configure Dynamics 365 to automatically create records from linked posts

By default, Dynamics 365 creates a Social Activity entity when a post is linked from Social Engagement. In Dynamics 365, you can convert this entity to a different record type. To automate the process, you can set up Automatic Record Creation Rules in Dynamics 365 to automatically create records from incoming social activities.

To learn more about the social activity record type or the Dynamics 365 record creation and update rules feature, see MSDN: SocialActivity entity messages and methods, CRM Help & Training: Set up rules to automatically create or update records in CRM.

Understand the data sent to Dynamics 365 when you create a social activity

When you create a social activity, Social Engagement sends the social payload as a JSON object to the Additional Parameters field of a social activity. The payload can be used as channel properties that define conditions for rules, and for setting properties of the record you're creating or updating. More information: CRM Help & Training: Set up rules to automatically create or update records in CRM The payload contains the most important fields required by Dynamics 365 to consume tweets and Facebook posts. These fields contain information about the post that was sent: author, content, URI to the original post, URI to the post in Social Engagement, and some additional post metadata. Based on the post’s source, the content of the payload may change.

Social Activity in Dynamics 365 has an Additional Parameters field that receives the social payload as JSON from Social Engagement.

To learn more about how to set up channel properties in Dynamics 365 to work with Additional Parameters from Social Engagement, see CRM Help & Training: Set up rules to automatically create or update records in CRM.

The JSON payload of this feature is described in the following table.

Property ActivityAdditionalParams Description Source restrictions
postmessagetype N/A Type of post

0: Public post

1: Private post
N/A
community N/A Type of community

1: Facebook

2: Twitter

0: Other
N/A
sentimentvalue N/A Sentiment value of the post

1: positive sentiment

0: neutral sentiment

-1: negative sentiment

null: unknown sentiment
N/A
posturl N/A The URL of the post N/A
description N/A Content of the post

Up to 2000 characters of the written content.
N/A
subject N/A Post title if available. Otherwise, it's the first 200 characters of the post content. N/A
postedon N/A Date when the post was published by the author N/A
activityaddtionalparams Additional parameters of the social actvity N/A
N/A targetEntityName Name of the entity that gets created in Dynamics 365. When linking a post to Dynamics 365, this is always set to socialactivity. N/A
N/A userPreferredTargetEntity Preferred entity as defined by the user in the Entity drop-down list of a linked post's Record Details in Social Engagement. This doesn’t necessarily match the type of record created in Dynamics 365 due to rules defined in Dynamics 365. N/A
N/A socialHandle Alias or user name of the author on the source. N/A
N/A profileName Alias or user name of the author on the source. N/A
N/A profilelink URL to the author’s profile. Available for Facebook and Twitter
N/A fullName The author’s name. N/A
N/A community 1: Facebook

2: Twitter

0: Other
N/A
N/A influencescore Reach score of the author in a range from 0-99. The higher the number, the more influential the author. N/A
N/A retweetedBy_displayName Name of the author who retweeted the post. Available only if the post is a retweet
N/A retweetedBy_externalId External ID of the author who retweeted the post. Available only if the post is a retweet
N/A retweetedBy_screenName Name of the author who retweeted the post. Available only if the post is a retweet
N/A isretweet Determines whether the post is a retweet or not.

true: retweet

false: not a retweet
Available only if the post is a retweet
N/A MSEbacklinkPost URI to access the post in Social Engagement. N/A
N/A Notes Additional information added by the creator of the social activity as free form text in Social Engagement. N/A

Sample payload

A typical JSON payload sent to Dynamics 365 is given here.

{
  "postmessagetype": 0,
  "community": 2,
  "sentimentvalue": 1,
  "posturl": "https://www.twitter.com/contoso/stauts/123412341234",
  "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididu...", 
  "subject": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididu...",
  "postedon": "2016-12-30T08:15:30-05:00",
  "activityadditionalparams": 
  {  
    "targetEntityName": "socialactivity",  
    "userPreferredTargetEntity": "incident",  
    "socialHandle": "Contoso",  
    "profileName": "Contoso",  
    "profilelink": "http://www.twitter.com/Contoso",  
    "fullName": "Contoso",  
    "community": 2,  
    "influencescore": 41.0,  
    "notes": "The customer requested a technician to call back as quickly as possible.",  
    "isRetweet": false,  
    "MSEbacklinkPost": "https://listening-prod.dynamics.com/app/23534544/#postid=45663"  
  }
}  

View record details for a linked post in Social Engagement

If a post is linked to a social activity in Dynamics 365, you can open its associated record in Dynamics 365 Record Details.

Note

Only the custom entities in Dynamics 365 which are in relationship with the Social Activity entity are visible in Social Engagement. For more information, see TechNet: Create and edit entity relationships.

Open a Dynamics 365 record from within Social Engagement

  1. In Social Engagement, click Posts on the right side of any Analytics page to see the posts list.

    --OR--

    Go to Microsoft Social Engagement > Social Center to see your streams.

  2. Select the post, and then click Link to Dynamics 365 Link to Dynamics 365 button in Social Engagement. The Dynamics 365 Record Details dialog box shows all details for the associated Dynamics 365 record.

    Dynamics 365 record details

Open a linked record in Dynamics 365

  1. In Social Engagement, click Posts on any Analytics page to see the posts list.

    --OR--

    Go to Microsoft Social Engagement > Social Center to see your streams.

  2. Select the post you want to open the associated record for, and then click Link to Dynamics 365 Link to Dynamics 365 button in Social Engagement.

  3. In the Dynamics 365 Record Details, click Open Record Open record to see the record in Dynamics 365.

    Dynamics 365 entities that are enabled for interactive experience open in the interactive service hub when you open a record on a social post that is linked to Dynamics 365. Dynamics 365 entities not enabled for interactive experience will continue open in the web client. More information: CRM Help & Training: User's guide for the new interactive service hub

    Open record in Dynamics 365 from Social Engagement

Note

If there are no rules, or no active rules, or the social activity doesn't meet the defined conditions, no target Dynamics 365 record is created and the Open Record option opens the social activity in Dynamics 365. When the target Dynamics 365 record is created, the Open Record option opens the target record.

Remove a linked Dynamics 365 record from a post

You can remove a linked Dynamics 365 record from a post. Note that removing a linked Dynamics 365 record from a post also removes any attached notes. Consider removing a linked Dynamics 365 record from a post when the link is no longer valid, is incorrect, or when you are considering creating a new entity record from the same post.

Note

Removing a link does not affect the linked record in Dynamics 365, but only breaks the link between the Social Engagement post and Dynamics 365 record. Once removed there is no way to re-establish the link between the same Social Engagement post and same Dynamics 365 record.

  1. In Social Engagement, click Posts on the right side of any Analytics page to see the posts list.

    --OR--

    Go to Microsoft Social Engagement > Social Center to see your streams.

  2. Select the post you want to open the associated record for, and then click Link to Dynamics 365 Link to Dynamics 365 button in Social Engagement.

  3. In the Dynamics 365 Record Details, click Remove.

Remove link between social post and Dynamics 365

Privacy Notice

By enabling Microsoft Social Engagement to connect to Dynamics 365, you will allow data to be sent to Dynamics 365 using an individual action on a post or automation rules.
Dynamics 365 stores the data from Microsoft Social Engagement as a SocialActivity and a SocialProfile entity, and subsequently may convert the SocialActivity into a different record type based on predefined rules. Any Dynamics 365 user with the required permission to access Dynamics 365 records will be able to access and/or process this data.
Note that the data sent from Microsoft Social Engagement includes both Social Content and customer data. Specifically, the data includes Social Content information about the social post (author and text) as well as customer data in the form of enriched information, such as sentiment and tags. For complete information about the content of the data sent to Dynamics 365, please see the payload properties topic.

See Also

Set up the connection between Dynamics 365 and Social Engagement
Link posts from Social Engagement to Dynamics 365
Administer Microsoft Social Engagement