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
Tim KlineTim Kline 

Omni Channel Time of Day/Time Zone Based Routing

When a record is sent from external system to Salesforce, via web service, the case record needs to route to a specific agent population only within business hours (i.e. 7am to 10pm), and within federally mandated outbound calling time frame (i.e. 9am to 9pm) and within the given time zone of where the customer lives (i.e. 9am to 9pm local time zone of target customer location - eastern, central, mountain and western time). Notice how the business hours are different than the federally mandated calling time regulated hours. 

This is the use case am trying to solve for existing project that has a short timeline. I am not sure how to handle this since Omni-Channel is not smart enough. I do not have Einstein and do not want to use that as part of the solution. The timeline will allow for anything in Winter '19 release (production) and apex coding, if necessary.  (see use case details below - the call center agent works in the eastern time zone)

1) Records are sent to Salesforce, from external system 24 hours daily (i.e. outside of business hours, inside business hours).
2) Agent signs into Salesforce at 7am Eastern time zone (agent population start time)
3) Eastern time zone, Central time zone, Mountain time zone, Western time zone records are being sent to Salesforce for agent routing
3.a) As an agent, it is 7am to 8:59pm and still not time to receive case records - federally mandated calling start time not reached. However, I may be asked to perform other case work - not part of this process.
3.b) As an agent, it is now 9am and I can begin receiving only case records for the Eastern time zone
3.c) As an agent, it is now 10am and I can begin receiving only cases records for both Eastern and Central time zones
3.d) As an agent, it is now 11am and I can begin receiving only case records for Eastern, Central and Mountain time zones.
3.e) As an agent, it is now 12pm and I can begin receiving only case records for Eastern, Central, Mountain and Western time zones.
3.f) As an agent, it is now xxpm and I can begin receiving only case records for ... this could continue beyond continental time zones for North America. Likewise, it could be for time zones East of the Eastern time zones. (i.e. it needs to be flexible)
3.g) As an agent, it is now 9pm and I cannot receive any cases because I have reached the federally mandated limit for outbound communications to customers.
3.h) As an agent, it is now 10pm and the call center is closed for the day.
4) Eastern time zone, Central time zone, Mountain time zone, Western time zone records are being sent to Salesforce for agent routing
4.a) Cases are still being sent to Salesforce from the external system and their are no agents available
5) Agent signs into Salesforce at 7am (agent population start time)
5.a) As an agent, it is 7am to 8:59pm and still not time to receive case records - federally mandated calling start time not reached. However, I may be asked to perform other case work - not part of this process.
5.b) As an agent, it is now 9am and I can begin receiving only case records for the Eastern time zone
..... everything repeats
Tarun Agarwal 24Tarun Agarwal 24
@Tim- were you able to solve this out? If yes can you share the solution please
Rick MontezumaRick Montezuma
Was anyone able to figure out how to do this?
 
SimbaSimba
Was anybody able to come up with a solution to solve this issue ? 
Rhadisha DavisRhadisha Davis
Adding to this string to see if anyone was able to determine a solution.
Leo10Leo10
Hi, anybody able to figure out the solution?
 
Vlad LuzhnovVlad Luzhnov
We have solved similar problem with a custom Schedulable Batchable Apex. Basically, for each Queue that is assigned to the omni for distribution to agents we have created a duplicated queue called "OFF HOURS Q". Then we have defined all of the ON / OFF rules in custom meta data. A scheduled job, going to the Q, and validate Cases against custom meta data rules. If actual Time is OFF time, when agents should not be attempting to reach out to a customer, even if agent is still at work, we MOVE the case to the OFF Q. And OFF Q is not connected to OMNI. And when it is time to call again, the same JOB will move it back to the ON Q which is connected to the omni.