I'm hoping to route tickets for my service organization into the appropriate teams based on the time of the day (e.g. if a ticket comes in after hours, it's routed to the late shift team).
However, it appears that there's no out-of-the-box method to route tickets based on time of day.
My current idea is to have a scheduled workflow that updates some sort of global property (not sure where this property should live), and have tickets copy this property as they come in. So for example: 1. The day ends at 5pm, the scheduled workflow runs and the global property (let's call the property 'Current Shift') updates to 'late shift' 2. A ticket comes in at 6pm and one of the first actions as part of the 'New ticket' workflow is that it copies the 'Current Shift' property (with the 'late shift' value). 3. A second workflow branches this ticket to the appropriate team based on the 'Current Shift' value of the ticket. 4. In the morning the scheduled workflow runs, and updates the global property to 'Morning Shift'. All new tickets will now have the 'Morning shift' property.
Important to mention, I don't want to update every ticket with the 'Current Shift' value. Only new tickets.
Where I'm getting stuck is where to keep and update this 'Current Shift' property so that I can access it as tickets are created. Do I set this as property of all companies and the scheduled job updates that? Is there a way to store a variable like this that I'm not aware of? Any assistance would be appreciated!
Is there a reason you want to label this as "Current shift"?
Let's say you have two workflows, one set to run during shift A hours, the other during shift B hours. Wouldn't it be sufficient to mark each incoming ticket in a custom ticket property as A or B?
If not, could you explain in detail why?
Best regards
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
No particular reason for the naming convention - was simply for clarity. And your suggestion would work perfectly!
My question is how to mark the incoming tickets with the custom ticket property based on time of day. Are the workflows A and B scheduled workflows? Maybe I'm missing something.
I run a similar workflow, but like @KFrost6 I cannot figure out how to set my "unknown" property based on the schedule. I had used Ticket triggers for my 2 workflows and when the 2nd workflow schedule arrived (weekend) it had reprocessed all of the tickets from the week because I did not have this "unknown" property in place to differentiate the workflows.
@karstenkoehler is this something simple to do? What could I be missing?
For reference: I am differentiating between M-F 24x5 and Weekend OnCall tickets.