Hi Nuttapong,
We use a custom data action to check the on-queue agent count and go from there. We're basically doing what is outlined here: How to find the number of agents logged in with a queue? - Data Actions - Genesys Cloud Developer Forum
Seems a bit complex for your goal of Agent > Supervisor > Leader. Why not just Skill agents 5/5, then supervisors 3/5, leader 1/5 and use best available skills routing on the queue? Then you'd only have one queue + an in-queue flow that offers callbacks after your desired hold time.
------------------------------
Caleb Smith
Interstate Gas Supply, Inc.
------------------------------