Share This:

Some Background Info:

 

Inspired by this idea https://communities.bmc.com/ideas/2124 to automatically have incidents assigned to current user by taking some action on the incident. This solution uses a workflow rule and flow to automatically assign current user as staff and set responded date to "now" whenever the Status field changes from OPENED to any other stage (e.g. acknowledged, in process, closed). Another great approach is to provide users a custom action to invoke the flow with any custom logic as done by Mike Leveiller here https://communities.bmc.com/ideas/2124#comment-49445

 

**Please note, as of December 2014, Salesforce has a private beta feature called Processes which will supersede Workflow Rules and Flow Triggers. However, since it is in beta, my instructions still reference the traditional Workflow Rules and Flow Trigger mechanics. Just FYI in case you read these instructions then read Salesforce documentation and the docs recommend doing this via their Process Builder instead.

 

What we'll be doing in this setup:

 

  1. Create one (1) flow with the logic to assign current user as staff and set responded date of the incident
  2. Create one (1) flow trigger to invoke the flow and pass parameters
  3. Create one (1) workflow rule on incident object to invoke the flow trigger

 

Step 1: Create Flow

 

The quickest way to get this flow setup in your sandbox is to deploy it from my github repository. Once deployed, make sure to go to Setup | Create | Workflows & Approvals | Flows to activate it.

 

This flow will assign the current user as the Staff field of the incident under two conditions: the user belongs to the incident's queue and the staff field is blank. It also will set the Responded Date field to "now" if it is blank. This logic of course is completely customizable to your purposes.

 

screenshot

 

Step 2: Create Flow Trigger

 

  1. Go to Setup | Create | Workflows & Approvals | Flow Triggers
  2. Click New Flow Trigger button
  3. Choose Incident object then click Next button
  4. Specify a name for the flow trigger (e.g. "Auto Assign Acknowledged Incidents")
  5. Choose the flow you created in Step 1
  6. Check the option to Set Flow Variables
  7. Specify the incidentId input variable to be the value {!id} This is the incident record id to update in the flow.
  8. Specify the assignToId input variable to be the value {!$User.Id} This is the id of the current user that caused the workflow to run and who the flow will try to assign as Staff on the incident.
  9. Finish saving the flow trigger

 

 

Step 3: Create Workflow Rule

 

  1. Go to Setup | Create | Workflows & Approvals | Workflow Rules
  2. Click New Rule button
  3. Choose Incident object then click Next button
  4. Specify a name for the workflow rule (e.g. "Auto Assign Acknowledged Incidents")
  5. Set the evaluation criteria to "created, and any time it's edited to subsequently meet criteria"
  6. Set the rule criteria to be Incident: Stage~ not equal to Opened
  7. Save workflow rule
  8. Edit the Workflow Actions section
  9. Click the Add Workflow Action drop down button and choose Select Existing Action
  10. Choose the Flow Trigger created in Step 2
  11. Finish saving the workflow rule and activate it