Add a timer in forms to track time against enhanced SLAs
Note
- Enhanced SLAs have been deprecated and replaced with Unified Interface SLAs. Learn more in SLAs in web client are deprecated.
- For more information about adding a timer control to Unified Interface SLA-enabled entities, go to Add a timer control for SLA-enabled entities.
A timer helps users gauge the amount of time they have to complete a key performance indicator (KPI) that is typically associated with a service level agreement (SLA). If your organization uses enhanced SLAs, you must use quick view forms to add a timer to track time against such SLAs.
The timer control initially displays a count-down timer to show the time remaining to complete the KPI.
Note
- A timer control can be used independent of SLAs, too.
- The timer control is designed to visually show the current state or show the remaining or elapsed time relative to the date and time specified in the Failure Time field of the SLA KPI instance. It doesn’t calculate or keep track of the time for which the Pause condition is true.
The timer control can show any of the following, depending on the actions of the user and what you as a system administrator or customizer specify when you set up the timer control:
If the user completes the task within the remaining time, the control shows the word Succeeded.
If the user doesn’t complete the task within the remaining time, the control shows the word Expired.
As the timer counts down, the color changes to yellow as the time remaining nears non-compliance. If the time remaining expires, the timer shows the word Expired. Then the timer color changes to red and the timer starts counting up to show the elapsed time since the task should have completed.
If a condition causes the SLA KPI to pause, the control shows the word Paused.
If a condition causes the SLA KPI to be canceled, the control shows the word Canceled. This behavior is optional.
If either of the required fields in the Timer Control dialog box doesn't a value in the record, the control shows the words Not Set.
To add a timer to track time against enhanced SLAs:
Ensure the entity is enabled for SLA.
Create SLA KPI fields for the entity for which you want to create the SLA.
Create quick view forms for each SLA KPI instance field that you created.
Create an SLA.
Add the quick view forms that you created to the primary entity form
Enable an entity for SLA
To add a timer for an enhanced SLA to an entity form, that entity must be enabled for SLA. Learn more in Enable entities for service level agreements.
Create SLA KPI fields
Make sure you have the System Administrator security role or equivalent permissions in Microsoft Dynamics 365.
Check your security role
Follow the steps in View your user profile.
Don’t have the correct permissions? Contact your system administrator.
Go to Settings > Customizations.
Choose Customize the System.
Under Components, expand Entities, and then expand the entity you want.
Click Fields.
On the Actions toolbar, click New, and then enter a Display Name to generate the Name.
In the Data Type drop-down list, select Lookup.
In the Target Record Type drop-down list, select a SLA KPI Instance.
If you create a lookup field in an entity form, the relationship is automatically generated. A lookup field is created as a relationship field.
Click Save and Close to close the form editor.
Publish your customization.
To publish customizations for just one entity, under Components, select Entities. Then, on the Actions toolbar, select Publish.
To publish all customizations you made to any entities or components, on the Actions toolbar, select Publish All Customizations.
Create quick view forms for the SLA KPI Instance entity
Quick view forms help you show data of a related entity in the primary entity form. For enhanced SLAs, all the SLA-related states and times are stored in the SLA KPI instance entity. To show this data in the primary entity like a lead or an opportunity form, you must create a quick view form for each SLA KPI field that you created for the primary entity. Add a timer to the quick view form so it shows the count down for the SLA.
Create a quick view form
Go to Settings > Customizations.
Choose Customizations, then choose Customize the System.
In the solutions explorer, expand the SLA KPI Instance entity, and then select Forms.
Select New > Quick View Form from the tool bar.
In the Form group, click Form Properties, and then specify a form name.
Double-click the section, type a meaningful name for the section, and then click OK.
Select the section, and on the Insert tab, click Timer.
Specify a name and label for the timer, and the data source for the failure time.
Following is an example of the properties you'd set for a timer for a Case entity.
Note
Typically, for enhanced SLAs, the timer control is set up using the SLA KPI Instance status field values only.
When you're finished, select OK.
Publish the customizations .
Create an SLA
Create an SLA for the entity you want to track. For example, you may want to track the time taken by sales person to take action on a lead, like qualifying or disqualifying a lead. For this tracking, create an SLA for the lead entity. For more information on creating an SLA, go to Define service level agreements
Add the quick view form to the primary entity form to show the timer
You can add the quick view forms you created earlier as quick view controls in the primary entity forms.
Make sure that you have the System Administrator or System Customizer security role or equivalent permissions.
Check your security role
- Follow the steps in View your user profile.
Go to Settings > Customizations.
Select Customize the System. In the solution explorer, in the left nav pane, expand Entities, expand the entity you want to add the quick view form to, and then select Forms.
To add the timer to use in the Dynamics 365 Customer Service app, open the form of type Main.
-OR-
To add the timer to the interactive experience form so users can use it in the interactive service hub, open the form of type Main – Interactive experience
Add a section to insert the quick view control. On the Insert tab, in the Section group, select Section, and then select One Column. Double-click the section to specify the section properties. Learn more in Section properties.
Note
You can't add an SLA timer to the reference panel section of the Main - Interactive experience form.
Select the section that you just added, and on the Insert tab, in the Control group, select Quick View Form .
Specify a name and label for the quick view control. In the Lookup Field drop-down list, select the lookup field that you created to point to the SLA KPI Instance entity.
The Related Entity drop-down list is automatically set to "SLA KPI Instance".
In the Quick View Form drop-down list, select the quick view form you created in the SLA KPI Instance entity.
Select OK to close the Quick View Control Properties dialog box.
You must save and publish the Main form before the quick view control changes are visible.
Related information
Add a timer control to the Case form to track time against an SLA