Do you have a need to assign incoming requests to different agents based on the hour of the day? In most cases teams do have this need, or at least my team does. So how do you do this in JSM. Well, you have three options that we will look at, the first one is to use automation.
In this example we are assuming that each agent is coming on-line on the hour, and we are not considering local time zones, instead we are basing the schedule on UTC (Coordinated Universal Time), that is how JSM stores the date/time data.
The automation will trigger when a request is created, and it will check the hour the request was created using the smart value {{issue.created.format("H")}}
You can then create if/else condition to check the hour and assign to the agents that are covering it. Each if/else condition can either cover a single hour or multiple depending on how your coverage schedule looks like. In the example below each if/else covers two or more hours.
My take on this - this is a good way to get started. The drawback is that if there is a change in the schedule you would have to go in and modify the automation, and if you want multiple people to be able to do that then they have to be project admin in order to access the automation. You would also have to maintain the schedule outside of JSM if you want users to know who is available to be assigned requests.
The second option that we will look at is a combination of automations, the on-call schedule in JSM, and an iPaaS application. In this example we will be using tray.io which is a low-code workflow builder that allows you build integrations and automations.
We will be using two automations, the first one triggers on when the request is created and will send a web request with the issue key and the web hook URL for the second automation to the tray.io workflow. The second automation is the one that sets the assignee.
The workflow in tray.io will use the Opsgenie API to get the current on-call responders and filter them out from the response. If there are one or more responders on will be picked based on round-robin and the responder’s Atlassian Id is returned to the second automation that sets the assignee.
My take on this - If you have multiple on-call responders during the day this is a good option. Agents have access to the on-call schedule from within JSM and can also go in and update the on-call or override it if people are out. It can also scale if you would like to apply this to multiple on-call schedules/teams with just a small change to the first automation and the tray.io workflow. The drawback to this solution is that you would need to use a third-party product.
And the last option that I will mention here is to use one of the apps in the Marketplace that allows you to auto-assign based on a schedule. A quick search shows that there are a handful of apps that can do this, so that is definitely worth a look.
My take on this - Apps are definitely worth a look, since they can easily solve your use case without having to invest too much time.
If you have implemented something similar or have any questions let me know in the comments below.
Mikael Sandberg
Sr Systems Engineer
Outreach
Seattle WA
1,824 accepted answers
5 comments