[SalesForce] Prioritizing Cases Using Entitlements / Case milestones

I have currently set up Entitlements to manage a few SLAs:

  1. First Response Time (time to get a response to the customer for the first time)
  2. Relief Time (time to get a proposed solution to the customer)
  3. Customer Update Time (time between the customer sending us a communication and us responding to that communication).

The SLAs change based on the Priority field (P1, P2, P3, P4)

Everything is working awesome, I have set up all my needed triggers to automatically update completion time, etc.

What is not awesome is that I am having a difficult time figuring out how to, on the case, display the next target date and next target date milestone name. I can not trigger on CaseMilstone and so I am not sure how to proceed.

Does anyone have any experience solving this type of issue? Are there any pointers you can provide?

Thanks!
Tyler

Best Answer

Unfortunately this is not an easy thing to do, however I can tell you how we do it.

We have a trigger on the Case object that fires on insert and update and anytime we have criteria that matches (for us, Status change). This then passes a set of Case Ids to an @future call. In that @future call we pull the TargetDate from the CaseMilestone Object (for the given Case Ids) and store it on the Cases.

This has to be done via an @future call because the CaseMilestone creation / updating occurs after both Triggers and Workflows.

Related Topic