[SalesForce] How to assign new object to a queue using Process Builder, without using the queue ID

I want to create a Case using Process Builder and the owner of the Case should be a specific queue. However, I don't want to hard-code the Queue ID in the Process, I consider that bad practice. The Case is created when some Opportunity is altered, so I could use an Opportunity formula field to get to the Queue ID. I use that technique to give the Case its proper name, viz. the concatenation of some Opportunity fields.
As far as I know, it is not possible to create a lookup to a queue. Also, the Opportunity is not owned by the queue, nor by a member of the queue.

So I guess my question turns out to be: how do I get a Queue ID, in a formula, given just the name of the Queue?

Best Answer

I came across this same issue in process builder. For me I was trying to allocate new cases to specific queues, each queue is made of sales guys representing different regions of Canada, so I had 3 sales reps in the West Coast Queue, 2 in East Coast Queue etc...

So in process builder I was only able to assign the case to the owner id of the contact and not the queue. My solution was to create a separate workflow rule outside of the process builder that would fire once process builder had created the case and assign it to one of the regional queues using filter logic of the rule to filter by the mailing province field of the contact. Then I used a field update to reassign the owner to one of the regional queues (i.e. contacts with cases from British Columbia, Alberta, and Saskatchewan were reassigned to the West Coast Queue).

Not sure if this is the exact answer you're looking for, but maybe you might have better luck with using workflow rules with process builder.

Related Topic