If a case is assigned to a particular team then milestone starts for that team then when we assign it to some other team then this particular milestone should stop and new milestone for the new team should start, and then when user assigns back to the first team, then that team's milestone should resume from where it was left. #Milestones & Entitlement Management #ServiceCoud
Hi Gauri, You can customize the logic to calculate remaining time.
Create a Custom Object which has look up to Case
EX: Team Milestone.
Create required fields to capture Case Details like Case id, Team Name, Target Time, Time Spent on Case, IsActiveTeam(Boolean).
Whenever Case is assigned to Team ex: Team A, Create a Record capturing all case details ensure to set IsActiveTeam as true.
The moment Case is assigned to Team B,
1) Calculate Team A's Time Spent on Case & set IsActiveTeam as false.
2) Create Record for Team B capturing all case details ensure to set IsActiveTeam as true.
Create a Entitlement Process & Milestone. Under milestone create a apex class which returns the remaining time.
Inside the Apex class : Query Custom Object record where IsActiveTeam = true.
calucate the remaining time by TargetTime - Time Spent on Case and pass it to the milestone.
Let me know if this works.