Dynamics 365:以编程方式停止和重新启动增强型 SLA 计时器

Dynamics 365: Stop and Restart Enhanced SLA Timer Programatically

假设我有一个具有增强 SLA 的案例。每次收到与案例相关的新电子邮件时,我都想 运行 一个插件,它将 stop/restart 案例的 SLA 计时器(取决于电子邮件内容)。

有没有办法以编程方式停止/重启与案例相关的增强型 SLA 计时器?

您需要创建增强型 SLA 并将其配置为允许暂停和恢复

来自https://www.microsoft.com/en-us/dynamics/crm-customer-center/define-service-level-agreements-customer-service.aspx#bkmk_CreateEnhancedSLA

Create an enhanced SLA

Make sure that you have the Customer Service Manager, System Administrator, or System Customizer security role or equivalent permissions.

When you activate an SLA, a corresponding workflow is also created. For every action you perform on the SLA, you must have permissions to perform the same action on workflows. The SLA is applied in context to the permissions that the owner of the SLA has.

Check your security role

Go to Settings > Service Management.

Go to Service Level Agreements.

To create a new SLA, click the New button.

-OR-

To edit an SLA, in the list of records, select the SLA, and then on the command bar, click Edit.

If you're creating a new SLA, you'll see the Create SLA dialog box. Type a name for the SLA, and then select the entity for which you want to create the SLA.

Fill in your information

Applicable From. Select the field that specifies the date and time from which the SLA items will be calculated. For example, if you select the Created On field, the calculations for service level agreements will start from the time the record is created.

Note You can have multiple SLA KPIs within one SLA. The start time for different SLA KPIs within an SLA is set at the SLA level and can't be different across SLA KPIs. The start time is determined by the Applicable From field value. Business Hours. Select a customer service schedule record that defines your support organization’s business hours. This is useful in the SLA time-tracking calculations. If a business hours record (customer service schedule) isn’t selected, the work hours are considered to be 24 x 7.

SLA Type. Select Enhanced.

If you're creating an SLA for an entity other than Case,, this field is automatically set to Enhanced, and can't be changed.

Allow Pause and Resume. Select Allow if you want the SLA to pause during the time the record is on hold. For each entity that's enabled for SLA, you can set the statuses that will be considered “on hold” in the Service tab of System Settings dialog box. More information:
System Settings dialog box - Service tab. You can set this field to Allow only when you’re creating an enhanced SLA.

Click Save.

现在您应该配置将暂停 SLA 的状态值。

发件人:http://blog.sonomapartners.com/2014/11/dynamics-crm-2015-sla-enhancements.html

Automatically Pause/Resume the SLA time Calculation:

Now with CRM 2015, administrators can setup specific Active Case Status values that will automatically pause the SLA timer if the Case is moved into one of the statuses selected. When the Case is moved out of that status, the timer will resume and continue. This is configured from Settings –> Service Management –> Service Configuration Settings.

In the example below, if a Case is moved into On Hold or Waiting for Details, the SLA timer will pause (and this will reflect on the Case form). When the Case is moved back to In Progress or Researching, the SLA timer will continue where it left off. This functionality is only available with Enhanced SLAs (described in more detail in the next section).

您现在可以通过更新记录 (IOrganizationService.Update) 以编程方式更改案例状态,以暂停 SLA and/or 恢复 SLA。