Route posts using automation rules

Do you ever feel overwhelmed by how much noise you need to cut through on social media to find posts that are relevant to you? Using automation rules, you don’t need to go through every post manually to create new cases, leads, or events. Let automation rules take care of the routing process. Automation rules can assign posts to users or groups, create new records in Dynamics 365, or create events in Microsoft Azure Event Hubs, if newly-found posts match the filters for your automation rule.

Prerequisites

Elements of an automation rule

For each automation rule, there are several navigation elements and values to define. The following screenshot shows more about what an automation rule consists of.

Elements of an automation rule in Social Engagement.

  1. Button to create new automation rules.

  2. Switch to receive email notification if an action fails.

  3. List of automation rules and their status for a quick overview.

  4. Actions configured for the automation rule. Link to Dynamics 365 actionStream to event hubs actionAssign to actionSet label action

  5. Button to delete the automation rule Delete button.

  6. Name of the selected automation rule.

  7. Filters that trigger this automation rule. For an active rule, every newly-found post matching these filters will be handled by this rule. More information: Use filters to see relevant data

  8. View the data set in Analytics View in Analytics button in Social Engagement.

  9. Button to add new actions to the automation rule.

  10. Actions that are taken on newly-found posts matching the defined filters.

  11. Summary of actions taken on posts in the past 7 days.

When no rule is selected, you'll see the aggregated numbers across all automation rules. For example, If two rules stream data to the same event hub, you will see an aggregated value for that event hub. Only the data for rules with active actions show in the chart. If an action that was removed or disabled is added or enabled again, the stats panel will show any data available for that action in the past 7 days, if it was active anytime during that period.

Available actions for automation rules

The following section explains more about the available actions for automation rules.

Tip

Social Engagement can send administrators a failure notification if an action in an automation rule fails. Administrators can turn this feature on if they want to receive these notifications. To receive email notifications, go to Settings > Automation Rules, and then set Send failure notification to ON.

For troubleshooting information when receiving failure notifications, see Troubleshoot issues with failing actions.

Create a link to Dynamics 365 from a social post

Automatically link posts to Dynamics 365 to create records from social posts. To use this feature, make sure there’s an active connection to a Dynamics 365 instance. Also ensure that the Dynamics 365 rule framework is correctly configured to process the Social Activity entities created when a post is linked to Dynamics 365. More information: Create a Dynamics 365 record from a social post, Link posts from Social Engagement to Dynamics 365, CRM Help & Training: Set up rules to automatically create or update records in CRM

Assign posts to a user or a group in Social Engagement

Automatically assign posts that match your defined filters to a user or a group in Social Engagement. For example, you can assign every post with a purchase intention to your sales team to follow up on. More information: Work with posts

Set a label

Automation rules provide a Set Label action. Based on the filters you define, a label can be set on posts automatically. For example, you can set a “Review immediately” label on posts from your top influencers so that your community management team can follow up with high priority. More information: Create, edit, or delete an automation rule

Stream posts to Microsoft Azure Event Hubs

Automatically stream posts as events as JSON payloads to Azure Event Hubs. You must have a connection to an event hub set up to see this action. More information: Stream data from Social Engagement to Microsoft Azure Event Hubs

Troubleshoot issues with failing actions

When you receive failure notifications, there are a few common issues and simple solutions to them. Often, the issues are related to connection problems to other services, or sudden spikes in volume of posts.

Possible causes

Either the connection to Dynamics 365 is no longer active or valid, or there are too many posts queued and Dynamics 365 throttles the creation of new records. After several failed retires, the posts are dropped from the queue, and a failure notification is sent. More information: How Social Engagement handles conflicting automation rules

Address the issue

  1. Review the Dynamics 365 connection that was used in the failing automation rule. Make sure the provided connection details are still active. More information: Connect Dynamics 365 and Social Engagement

  2. Open the automation rule and review its estimated number of matching posts. Keep in mind that these estimations might change quickly if trends on social channels change, unexpected events occur, or search topics or filters are updated. Keep the number of linked posts reasonable. Creating hundreds of leads or cases per day is a rather uncommon scenario.

    Recover missed posts

    You can manually link missed posts to Dynamics 365 from the Analytics area in Social Engagement.

  3. Open the automation rule with the failed Link to Dynamics 365 actions and click View in Analytics View in Analytics button in Social Engagement to see the posts that match your defined filters.

  4. Set a custom timeframe for the period you want to review for missed posts.

  5. Click the filter icon and add a Link to Dynamics 365 filter. Set its value to Not linked to a Dynamics 365 record.

All posts that remain in your data set were missed by the automation rule and weren't linked to a Dynamics 365 instanceand you can manually link them.

  1. Open the post list and click Link to Dynamics 365 Link to Dynamics 365 action to create records for the missed posts in Dynamics 365. More information: Create a Dynamics 365 record from a social post

Stream to Event Hubs action fails

Possible causes

Commonly, the failure is caused by a broken connection between the Azure Event Hubs and Social Engagement. An event hub might have been renamed, or its keys have changed and thus the connection string for that event hub is no longer valid.

Address the issue

  1. Find the name of the event hub connection to review in the failure notification.

  2. In the Microsoft Azure portal, open the connection details for that event hub.

  3. In Social Engagement, go to Settings > Global Settings > Connections > Azure Event Hubs. Check the connection string and the name of the event hub and make sure they match exactly. More information: Work with events from Social Engagement in Azure Event Hubs

    Identify missed psots

Event hubs are built to handle high volumes of events in real time. Although you can’t manually send posts to an event hub from Social Engagement, you can quickly find how many posts were missed.

  1. Open the automation rule with the Stream to Event Hubs actions and click View in Analytics View in Analytics button in Social Engagement to see the posts that match your defined filters.

  2. Set a custom timeframe for the time period you want to review for missed posts. This shows the number of posts that should show as individual events in the event hub.

  3. Compare the number of posts resulting in step 2 with the actual results showing in the event hub.

Create, edit, or delete an automation rule

Automation rules are visible to all users of Social Engagement, but only users with Manager or Administrator roles can manage them. More information: Understand user roles

Important

To link posts to Dynamics 365 using automation rules, make sure the Dynamics 365 instance you select is upgraded to at least Microsoft Dynamics 365 (online) Update 2016. Automation rules aren't supported for Dynamics 365 (on-premises). To link a post manually to Dynamics 365 (on-premises), see Connect Dynamics 365 and Social Engagement.

Create an automation rule

  1. Go to Settings > Automation Rules.

  2. In the Automation Rules pane, click Add new rule Add button.

  3. In the Create Rule pane, provide a Name for your new rule.

  4. In the Status drop-down list, select if the new rule should be Active or Inactive.

  5. In the Filters section, click Change Edit button to define the data set that newly-found posts need to match to trigger the rule's actions. More information: Use filters to see relevant data

    Note

    To get an idea of the volume of posts your actions may be executed on, you’ll see the number of posts that matched your selected filters in your default time frame.

  6. In the Actions section, click Add Add button to add an action to the rule.

  7. Set the Active switch to ON to activate your automation rule.

  8. Click Save Save button to apply your configuration.

Note

Automation rules start processing posts that match the defined filters as soon as the rule is activated and saved. However, the rule won’t process any posts that were found before the automation rule was created, or while it was inactive. If you deactivate an existing automation rule, it will restart to process the newly-found posts after you reactivate the rule. If your administrator sets Send failure notifications to on, all administrators will receive an email if an action failed, so you can quickly take action.

Edit an automation rule

  1. Go to Settings > Automation Rules.

  2. In the Automation Rules pane, click the rule you want to edit.

  3. In the Edit Rule pane, update the values.

  4. Click Save Save button to apply your configuration.

Delete an automation rule

  1. Go to Settings > Automation Rules.

  2. In the Automation Rules pane, click the rule you want to delete.

  3. Click Delete rule Delete button.

  4. Confirm your deletion.

Quickly create an automation rule while working in Social Engagement

When working with data sets in Social Engagement, you may want a data set to persist, to quickly create an automation rule based on it. You quickly create automation rules when working with your data in Analytics, or from a stream in Social Center. Click More options with current filters More options to create an automation rule from your current data set. More information: Explore more options with your data set

How Social Engagement handles conflicting automation rules

A newly-found post can match the filters of more than one automation rule. If there's more than one matching rule, Social Engagement will execute the actions from the rule that was added most recently.

Caution

If a post matches the filters for multiple automation rules, only the last created (the newest) automation rule will process the post.

You can create up to 1 link per second in the same Dynamics 365 instance. If more than 1 post per second matches your active automation rules, Social Engagement will continue trying to create the link every minute, for a maximum of 10 minutes. If Dynamics 365's queue is still blocked after 10 re-tries, the post gets dropped eventually.

See Also

Administer Microsoft Social Engagement
Stream data from Social Engagement to Microsoft Azure Event Hubs
Link posts from Social Engagement to Dynamics 365
Explore more options with your data set