Fetch Agents from a Work Queue Using Guided Workflows

Updated 

Guided Workflows now support a new Execute Action — Get Users in Work Queue — that lets you retrieve the agents mapped to a specific work queue, along with their real‑time availability and queue activation status. You can use this data to build a custom, condition‑based agent assignment flow.

The standard Assign to X macro assigns a case to an agent or queue, but it does not let you filter agents by criteria such as:

  • Whether the agent is logged in.

  • Whether the agent is currently available.

  • Whether the agent is activated for the queue.

If your assignment logic depends on these conditions, use the Get Users in Work Queue action inside a Guided Workflow instead of the macro. The action returns the full list of agents for a queue with their status, so you (or the agent running the workflow) can pick the right person before the case is assigned.

The Get Users in Work Queue action:

  • Fetches all agents mapped to a selected work queue.

  • Returns each agent’s real-time availability status and queue activation status.

  • Lets you display the results in a table and let the user select an agent.

  • Feeds the selected agent into a downstream assignment step.

For further details, see Why Macro's are important in Case Workflow?, Guided Workflows - An Overview and Guided Workflow Screen Components - Dynamic Table.

Configuring the Get Users in Work Queue Action

  1. Click the New Tab icon. Under the Sprinklr Service tab, select Guided Workflows within Resolve.

  2. Select the desired Guided Workflow and click the Options icon next to it. 

  3. Click Edit Workflow.

  4. Click the Add (+) icon to add a new node.

  5. Select the screen and provide a name for it.

  6. Click the Add (+) icon and select Execute Action.

    The Execution Action screen is displayed.

  7. Enter Name for the Execute Action node.

  8. In the Action field, select Get Users in Work Queue.

  9. Specify an Output Variable to store the list of users returned by the action.

  10. Select the Work Queue input variable created in the previous screen.

  11. In the Exception Variable field, specify a variable to capture any execution errors.

  12. Click Save.

  13. From the Success branch of the execute action, click the Plus (+) icon.

  14. Add a new Screen node.

  15. Configure the screen to load the returned output variable in a Table view.

  16. Click the edit icon at the top of the node.

  17. The table displays the agents associated with the selected work queue, including:

    • Agent ID

    • Agent Name

    • Availability Status

    • Queue Activation Status

  18. Click the table and enable row selection in the third pane. If enabled, users can select agents.

  19. Select single selection and enable pagination. It sets the number of rows displayed per page in the dynamic table. This applies only to API-type tables when the external API supports pagination.

  20. You can review the displayed information and select an appropriate agent for the next step in the workflow.

  21. Configure the Failure branch if the execute action encounters an error, the Failure branch displays an exception handling screen or appropriate validation message before ending the workflow.