Automatically Add Users In Queue OR Group

A guide on automating user addition to specific Salesforce queues or groups using Process Builder and Flow. This involves creating a queue, building a flow with decision and record elements, and setting up a Process Builder on the user object. After configuration, users will be added to their specific queue automatically.

Scenario : There could be a business need to automatically add the users (On creation/updation) to particular queue or group based on some condition.

To implement this need I am going to use the Salesforce automation tool ~ Process Builder and Flow.

Step 1:

Create queue as per your requirement.

  • ABC
  • CDE

Step 2:

Create a flow

Create variables to store the values from process builder & decision outcome. In flow builder Goto > Manager tab >> click on “New Resource”.

Go to > ‘Element’ tab > Drag decision box in the flow builder page. Enter the required fields and add decisions (use previously created variable in resource).

Drag ‘Get Records’ element on flow builder page. This is used to find the record and store the value in previously created variable (QueueID).

Similarly add another ‘Get Records’ element to get ‘CDE’ queue record id.

Connect ‘Start’ with ‘Decision’ element and ‘Decision’ element to both ‘Get Records’ elements.

Drag ‘Create Records’ element on flow builder page. Enter the Label and others details (See screen below).

Save and Activate. Final flow will look like below:

Step 3:

Now, create a Process Builder on user object.

Note: If a Process Builder is already exists on user object in org. Do not create another one, it is best practice to use only one process for an object.

Goto Setup > Search ‘Process Builder’ > Under Process Automation – click on Process Builder.

Select object (User) and start process would be ‘when a record is created or edited’

Add criteria:

Add Action:

Save and Activate.

Now, update user with Job=ABC. You can see this user will be automatically added in the ABC queue.

Thanks

Arun Kumar

Arun Kumar
Arun Kumar

Arun Kumar is a Salesforce Certified Platform Developer I with over 7+ years of experience working on the Salesforce platform. He specializes in developing custom applications, integrations, and reports to help customers streamline their business processes. Arun is passionate about helping businesses leverage the power of Salesforce to achieve their goals.

Articles: 162

Leave a Reply

Discover more from SFDC Lessons

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from SFDC Lessons

Subscribe now to keep reading and get access to the full archive.

Continue reading