Sunday, March 15, 2015

Filled Under: , , ,

Using the New Process Builder - Part 3 - Adding Scheduled Actions to a Process

This is part of the series - Using the New Process Builder

This time let us create a scheduled action for a process
My requirement is when - an Account is created with Rating Hot, after an hour, I will generate an email alert to notify the account owner.

*Note: (I have a custom picklist 'Account Rating' on my Account object with values - Cold,Warm, Hot)

Scheduled actions can be used for Business use cases like:

  1. When a Case remains open for more than 2 days, send an email alert to the owner for attending the case.
  2. Auto update any field after some time of a record creation etc.

For us, let us create a new Process - name it Process to 'Account Create Email Alert'.

First let us create an Email Template we will use for the process.

Create the Email Alert, we need to create an Email Alert on the Account object, with Process Builder only Email Alerts on the object for which the process is being created is available for use. Also remember, if you configure an email alert to be sent from an organization-wide email address, that email alert isn't supported in flows and processes.

Now we come to the actual process.

Step 1: Create a New Process, we name it 'Account Create Email Alert' add a nice description as well :)

Step 2: Add the Account object to the process, we want to have the process working on Account create/edit.

Step 3: Add a criteria, we check the 'Account Rating' to be Hot, we check both on Account creation as well as on Account update.

Do select 'Do you want to execute the actions only when specified changes are made to the record?' as Yes. Only on selection of this the Scheduled action is enabled. This setting is similar to the setting 'created, and any time it’s edited to subsequently meet criteria' used for workflows.

Step 4: Now we add the schedule, we add a schedule of 1 hour after the Account is Last modified.

Step 5: Let us add the final step, that is, the scheduled action. The email alert we created.

Step 6: All done, we activate the process.

Step 7: To check the Scheduled action we can see the 'Paused and Waiting Interviews' under Workflow & Approvals -> Flows. Basically, Salesforce creates a flow in result of a process to handle the scheduled task. Notice, the 'Workflow' type in the Flow created, different from the usual 'Flow' or 'Autolaunched Flow'

To do a test, we create a new Account and mark it as Hot

Wait for an hour and voila! I receive an email alerting me that a new Hot Account is created.

See the time, exactly and hour after I created the Account. :)

We can do the same by updating an exisitng account and marking the same as Hot. This will work as we selected the 'Do you want to execute the actions only when specified changes are made to the record?'

Next Post: We do a field update in a process.