The Blog - Expert Thoughts & Opinions

SLAs and Entitlements Automation for Customer Service [with Project Example+Package]

Entitlements are a built-in feature of Salesforce that can allow users to manage the levels of support given to specific accounts. Different features such as milestones and entitlement processes can allow the easy management and handling of different support processes that customers may require.

Milestones can be used to indicate that an important step of the support process has been completed. A timeframe can be set for these milestones to be completed, with warning and violation actions that can be performed when the timer reaches a certain point or is elapsed. A success action can also be used which triggers when the milestone is completed. Each milestone action can perform various tasks, such as sending an Email Alert through the use of an Email Template, sending an Outbound Message or Updating a Field on a record.

Multiple milestones can be used within the same entitlement process. These milestones can be set by their order of execution and by their entry criteria, which can be created to use different milestones based on different case scenarios.

An entitlement process can be attached to an entitlement to associate the timeline provided by the milestones. Different versions of the entitlement process can be used by selecting the Enable Entitlement Versioning checkbox which is found in Entitlement Settings in Setup.   

Business Needs

This project consists of automating the entitlement management process through the use of built-in Salesforce automation processes and flows. The company structure consists of three different support package levels; Standard, Premier and Premier Plus. 

The higher the level of support purchased by the customer corresponds to a shorter time required to complete the milestones for that case as shown in the tables below. The time required will also be dependent on the priority of that case. The company also operates under the business hours of 9:00 - 17:00 Monday to Friday.

Milestones

A master milestone must be created before creating an Entitlement Process. The name of the milestone and its recurrency type has to be entered. The recurrence type can be of No Recurrence, Independent or Sequential. Once the milestone is saved. It can then be used within any entitlement process created.

For the project, two master milestones named 1st Response and Case Resolution are created, both of type No Recurrence.

The Entitlement Processes

Before setting up any automation, we have to create an Entitlement Process for each of the support packages. It can be set up by following these steps:

1. Create a new Entitlement Process, found in the Entitlement Processes page, ensuring that the type of the process is Case, the case enters the process based on its creation date and exits when it is closed. Also, attach the correct business hours as specified above to the process, this can be done by editing the Default business hours of the system or by creating a new record.  

2. Create the required milestones for each process, including the milestone name, time to complete, start time basis, business hours and order of execution. Criteria can also be set to filter which milestones are used in certain scenarios.

3.  Actions can then be added to each milestone to handle when it completes or a time trigger set up expires. The different actions that can occur at these points are; creating a new Task, a new Email Alert, a new Field Update, a new Outbound Message or selecting an Existing Action.

Once each of these steps has been set up, the Entitlement Process can be Activated and used in different entitlements by using the Entitlement Process lookup on that entitlement. For this project, three Entitlement Processes are created with six milestone actions for each. These are three each of 1st Response and Case Resolution, with each type having different time triggers based on the Case Priority. Different milestone actions such as email alerts and tasks are then set up based on these milestones. 

Flows & Processes

Two Flows and two Processes are needed to be created for this project. The flows handle entitlement creation when an Account is set up and when the support package is changed. The processes handle cases and the creation of an entitlement.

The first flow created handles when Accounts are created. It first retrieves each of the Entitlement Processes for each support package. The flow then gets the business hours for the company. Three entitlements are then created, again one for each entitlement process that has been retrieved. Three Entitlements are created to allow for future changing of support packages as previously created cases should retain their linked entitlement, even when the account it is linked to changes. Each Entitlement is then assigned the corresponding process, the account, the start date (the current date), a name based on the entitlement type and the support package the entitlement represents.

The second flow changes the entitlement assigned to an Account when the support type is changed for that account. A decision element is used to relate the account to a specific entitlement from which each branch retrieves that entitlement and updates the account object’s lookup field accordingly.

The first process created is the ‘Entitlement Set Up’ process which is used to associate an Entitlement to its corresponding Account if both records Support Package type match when an entitlement is created by the first Flow.

The second process focuses on the management of the Case object. It firstly ensures that the Priority field is never set to null, and changes null values to low priority. If the Case is linked to no Account, the entitlement will be null and the process will end. Otherwise, it then checks if that Case is either New, the priority has changed or a new account has been assigned and updates the related entitlement to the correct one. The final section of the process will complete all related milestones if the case closes.

Final Set-Up

Before completing the project a few things still need to be done. Firstly the milestone tracker has to be added by editing the case app page to allow for support users to manually complete the first response milestone. This will show the completed and upcoming milestones alongside the current milestone with a counter displaying the time left until the case becomes overdue. A ‘Close Case’ action can also be created for the purposes of quickly completing the case resolution milestone.

Email-to-Case can be enabled and set up to allow for emails sent to a specific routing address to create a case from the sent email. This can be done through the email tab on a case feed page or through an external email application.

As set up in the entitlement process, different milestone actions can occur when certain criteria are met, such as a Task being created for the support user to ensure that they have made the first response before the milestone becomes overdue. An example of this is shown below:

The below link contains the package which includes the functionality implemented in this project:
https://login.salesforce.com/packaging/installPackage.apexp?p0=04t090000002fBG&isdtp=p1

For the functionality to work, entitlements and email-to-case must be enabled in the org and the case milestones tracker component will have to be added to the case record page. Some page layout changes must also be made if the user would like to view any of the entitlement related lists, fields, etc.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Today's post is by one of our Graduate Salesforce Developers, Ian Gilligan.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

As always, thanks for reading, if you enjoyed this post please feel free to share it and tag us @Pexlify. 

Pexlify is a Salesforce Platinum Partner in the UK & Ireland. 

Want to know more about our Salesforce SolutionsContact us today to set up a hassle-free consultation.