Set up rules to create or update records automatically

Completed

After you've identified a scenario where you want to automatically create records, such as cases, you can use the record creation and update rule functionality to do so. You can access the record creation and update rule functionality from the Service Management area of the Customer Service Hub app.

When you create a rule, you'll first need to define the following information:

  • Rule name - Defines the name of the rule.

  • Queue to monitor - Specifies which queue (if any) that the rule will be monitoring to look for records. For example, you might specify monitoring your organization's default support queue.

  • Activity type to monitor - Specifies which type of activity record that the rule will look for when applying the rule.

Rules and queues

Queues can play a major part in record creation rules. When you define a queue to monitor, when the rule is active, it will monitor all incoming activities to that source queue. If the activity type matches the activity type that is specified for the queue, such as an email, the rule will process the incoming activity to create or update records.

Important

For an email source type, specifying a queue is mandatory. For all other source types, including custom activities, it's optional.

For more information, see Create or change a queue.

Activity types

In Dynamics 365, activity records often represent interactions with customers, such as an email that was received from a customer. One advantage of activities is that they can be converted to different types of records, such as cases or opportunities (when using Microsoft Dynamics 365 Sales). When you create a rule, make sure that you specify which type of activity that the rule applies to. This specification ensures that the system knows what types of activities it's looking for when creating the record.

The types of Dynamics 365 activities that you can convert to a case by default include:

  • Appointments
  • Campaign responses
  • Emails
  • Faxes
  • Letters
  • Phone calls
  • Service activities
  • Tasks
  • Social activities

In addition to the preceding activities, you can use other activity records, such as activities that are added as part of an installed solution or custom activities.

Important

While you can create multiple rules for a single source type, you can have only one active rule for the same source type and queue at any time.

For example, you have an active rule called Email to Case that is defined for a queue named Support with a source type of Email. If you create another rule for the same Support queue with Email defined as the source type, the Email to Case rule is deactivated when you attempt to activate the Email to Case 2 rule.

Note

The previous scenario is also true if you have two rules that are not associated with a specific queue but have the same source type. Be aware of this factor as you design rules.

After saving a rule for the first time, you can modify other items that affect when records will be created. These options are available on the Advanced tab. Based on the type of activity that you select, the available options will vary.

For example, when the source type is set to email, the conditions are as follows:

  • Allow emails from unknown senders - Specifies if you'll allow cases to be auto created that come from email addresses that are not attached to a Dynamics 365 account or contact.

  • Require a valid entitlement on the connected case - Specifies that a valid entitlement record must exist for the customer who sent the email. It doesn't check for specifies on the entitlement, only that one exists. If a customer has multiple entitlements, a record will be created.

  • Wait for a specific amount of time after the connected case - Determines if the email is related to a recently resolved case and whether it should be treated as a new case.

Screenshot of the Advanced tab showing conditions and advanced settings.

These conditions only represent the available options for the email activity type. Make sure that you verify the options that are available for other activity types, such as social activities.

Now that the initial settings of the rule are defined, you need to define the conditions and actions to use in determining when and how to create records.