function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srinivasa Rao Balle 1Srinivasa Rao Balle 1 

case management queue in and out time updates

Hi All,

I have one requirement. 

I have created two queues in Salesforce to use them on case object. 

1.Supplier Management  (I assigned A,B,C users in to this queue)
2.PO Purchasing (I assigned d,e,f users in to this queue).

When a case is created in salesforce there are couple of case assignment rules executing and updating owner id to any of these queues based on the conditions.

Now the requirement is once a case got created and assigned to a queue(Queue1), one of the user from the queue works on the case and if I have to moved the case to another queue(Queue2) then I have to update out time of the  queue1 and in time of the queue2.

I tried doing this using a trigger, but could not due to multiple assignment rules. Same record is updating more than two times, so my trigger is updating previous queue time value and new queue time value.

Is there any standard out-of-box feature for this kind of requirement.

My requirement is to grab the in times and out times and need to update the difference between the times.
GauravGargGauravGarg
Hi Srinivas,

This might help you. 
  1. Create a child Object (Let say Case Owner Management) for Case with Three fields
    1. Queue Name
    2. In TIme
    3. Out Time
  2. Write a Trigger on Case
    1. When the case is created and assied to queue1. 
      1. It will create a new entry in Case Owner Management with queue name and In-Time
    2. When the case is transfer to another queue. 
      1. search the last created record (using filter created Date)
      2. Update the out-time with NOW. 
      3. Create another record for object Case Owner Management with new Queue name and in-time. 

Hope this helps, let me know if you need any help on this. 

You can directly contact me on skype: gaurav62990, email: gauravgarg.nmims@gmail.com

Thanks,

Gaurav