I am using flow builder to create cases and assign them to specific queues based on criteria within the flow.

In the Assignment element, I can set OwnerId to a hard coded id string or a resource.

I would like to use a resource to keep it dynamic, but am not seeing an obvious way to get the queue id by name.

At the beginning of the flow, I could run an invocable action that pulls the queues through SOQL and return a list of queues back to a resource, but this seems inefficient and excessive.

I looked into using a formula variable resource, but I'm not seeing a path in formulas to query a queue based on name either.


Use the GetRecords Data Element to Query for the Queue SObject.

enter image description here

|improve this answer|||||
  • 1
    does this work? The Queue SObject has only two fields: QueueId and SobjectType. How would you query by name? – cropredy Jan 4 at 2:10

You can retrieve Queue Id dynamically by performing a lookup against Group object, check the query below

select Id , Name , Type from Group where Type= 'Queue'
|improve this answer|||||
  • OP asked for querying by queue name so you need to extend the Where clause – cropredy Mar 7 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.