Hands on 5 – sending an email to the opportunity owner

Process Builder also allows you to send emails to users; for example, it allows you to send an email alert to the account owner as soon as an opportunity has successfully closed. 

Let's look at a business scenario. Suppose that 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 email to the opportunity's account owner five days after its creation.

Follow these instructions to achieve this by using Process Builder:

  1. Process Builder doesn't allow you to create a new email alert, but it allows you to use an existing email alert that you created in the past, for the same object upon which you created a process. First of all, create an email 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 email 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 as follows:
  1. To add this email 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 a 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 Time for Action to Execute to five days after the opportunity's created date, as shown in the following screenshot:
  1. Once you are done, click on the Save button.
  1. The next step is to add a scheduled action to send an email. 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 will have to enter the following details:
    • Action Type: Select the type of action. In this case, select Email Alerts.
    • Action Name: Enter Email to Account Owner.
    • Email Alert: Select the existing email alert. In this case, select the email alert, Email to Account Owner, which you created in step 2.

Scheduled actions will appear, as shown in the following screenshot:

  1. Once you are done, click on the Save button.
  1. 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 the following screenshot:

Now, this process will perform both of the jobs: posting the opportunity details to a Chatter group, and sending an email to the opportunity's account owner five days after record creation. The email will look as follows:

Flow also allows you to send emails. You have to use the Send Email static action, available inside of Flow. 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 will need to use an Inline Visualforce page on the opportunity object to fulfill 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
18.116.40.177