Ticket assignment

When tickets are assigned to Engg. they should be assigned in a circular fashion to the agents who are available in that group.

Eg: I have multiple queue, my RPA is able to read the name of queue ticket is currently in. I want to use this get text output for assignment to engg. Round-robin method equitably distributed

Let say I have2 queues for Tier3 and tier2. I have 2 engg in tier 3
Now I want ticket to assigned to engg in tier 3 in roundrobin method

First ticket to first engg , Second to second engg and third INC first engg name again

And same method to be used in other groups as well. Any suggestion how can I achieve this?

how to achhieve this?

i wrote a small java script to solve round robin issue and RPA pick the next name from the script output.