Hi Eystein,
I would first look at Workitem Flows before trying to solve this with Task Management triggers.
Unlike voice, messaging, or email, Workitems do not have In-Queue Flows, but Genesys provides dedicated Workitem Flows that can automate workitem processing throughout its lifecycle. Workitem Flows can read and update workitem attributes, priority, status, assignee, and even transfer workitems to users or queues. They can also execute automatically based on workitem events such as status changes.
One thing that caught my attention in your design is that you're updating the status before the transfer occurs. At that point, the workitem is still associated with the original queue, which explains why you're retrieving the old queueId.
Instead of trying to act before the transfer, I would investigate whether you can:
- Transfer the workitem first.
- Use a status transition after the transfer is completed.
- Trigger a Workitem Flow from that status change.
- Recalculate priority, skills, or other attributes based on the current queue assignment.
I haven't found documentation indicating that a queue transfer itself directly triggers a dedicated event that can be filtered natively, so I'd be cautious about relying on Task Management triggers for transfer detection alone.
If Workitem Flows cannot provide the exact event timing you need, then an event-driven approach using APIs and external automation may be required. However, I would exhaust the Workitem Flow capabilities first since they are the native mechanism designed for workitem lifecycle automation.
https://help.dev-genesys.cloud/articles/work-with-workitem-flows/
------------------------------
Gabriel Garcia
NA
------------------------------