Hi all,
I’m thinking about automating adding the time to the ticket based on tasks. Has anyone of you ever tried doing something like this?
While performing onboardings and offboardings I have created a scenario that adds tasks to the ticket.
I would like to automate tracking time for these tasks. The idea is When agent changes the task status ti In progress, the add time stopwatch is started (assigned to the task). When the task status is set to Completed, this time entry is stopped. And this should be repeated for all tasks.
My initial idea at implementation involves two workflow automations (both working on Tasks).
If you have better ideas I am all ears.
- Automation:
Event: Task status changed from Open to Inprogress
Action: API Web Request to start the adding time stopwatch assigned for the task
This one is quite easy I think.The problem comes with stopping the clock.
- Automation
Event: task status changed from In progress to Closed
Web Request - Get all ticket time entries (to find the id of the time entry to be stopped)
Parse the response
Somehow find the time entry added by this particular agent for this particular task
Web Request - update the time entry to stop the clock.
There is no problem with this setup if I have only one Time entry. Then the parser would have only one id for the entry and that is all. If I have more than one netry, then the parser will take all the IDs (task and time entry alike) into array of numbers. And then there is a problem how to match the ids.
I will add more actual details and screens to this topic when I have the basic flows prepared.
For now, do you have any ideas how to tackle either this particular problem or the idea itself?