Hands on 5 - sending an e-mail to the opportunity owner

Process Builder also allows you to send e-mails to users, for example, sending out an e-mail alert to the account owner as soon as an opportunity is successfully closed. 

Let's look at a business scenario. Helina Jolly is working as a system administrator at Universal Containers. She has created a process (Post Opportunity Information to Chatter Group) to post Opportunity details to a Chatter group if the amount is greater than $1,000,000. She receives another requirement to send an e-mail to the Opportunity's Account owner after 5 days of its creation.

Follow these instructions to achieve this using Process Builder:

  1. Process Builder doesn't allow you to create a new e-mail alert, but it allows you to use an existing e-mail alert that you have created in past for the same object on which you created a process. First of all, create an e-mail template Account owner notification by navigating to Setup (Gear Icon) | Setup | ADMINISTRATION | Email | Email Templates, as shown in the following screenshot:

  1. The second step is to create an e-mail alert on the Opportunity object by navigating to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder | Workflow Actions | Email Alerts. Click on the New Email Alert button and save it with the name Email to Opportunity Owner. It should look like what is shown in the following screenshot:

  1. To add this e-mail alert to the existing process, navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder. Open the Post Opportunity Information to Chatter Group process that you created to post the Opportunity details to the Chatter group. Save it as New Version because you can't modify an activated process.

  2. Now we have to modify the process entry criteria to make sure that the process will fire only when a new opportunity is related to an account record. To do that, add an entry criterion in your process, as shown in the following screenshot:

  1. To add the scheduled time, click on Set Schedule available under SCHEDULED ACTIONS, and set Set Time for Action to Execute to five days after the Opportunity created Date, as shown in the following screenshot:

  1. Once you are done, click on the Save button.

  2. The next step is to add a scheduled action to send an e-mail. For this, we will use the Send an Email action available in Process Builder. To add schedule actions, click on Add Action available under SCHEDULED ACTIONS. This will open an additional window on the right-hand side of the Process canvas screen, where you have to enter the following details:

    • Action Type: Select the type of action. In this case, select Email Alerts.

    • Action Name: Enter a name for this action. Enter Email to Account Owner in Action Name.

    • Email Alert: Select the existing e-mail alert. In this case, select the e-mail alert Email to Account Owner that you created in step two.

Scheduled actions will appear as shown in this screenshot:

  1. Once you are done, click on the Save button.

  2. Once you are done with the process creation, don't forget to activate the process by clicking on the Activate button. Finally, the process will appear as shown in this screenshot:

Now, for this process will do both the jobs: posting the Opportunity details to a Chatter group and sending an e-mail to the Opportunity's account owner after 5 days of record creation. The e-mail will look like what is shown in the following screenshot: 

Flow also allows you to send e-mails. For this, you have to use the Send Email static action available inside it. To learn more about this, go to https://rakeshistom.wordpress.com/2014/09/08/reminder-email-to-upload-chatter-profile-photo/.

If you have embedded the Flow in a Visualforce page, you need to use an Inline Visualforce page on the Opportunity object to achieve the preceding business use case.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.138.134