Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/switch/field_switch.php on line 17

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/switch/field_switch.php on line 17

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/media/field_media.php on line 46

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/media/field_media.php on line 46

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/select/field_select.php on line 17

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/select/field_select.php on line 17

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/editor/field_editor.php on line 46

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/editor/field_editor.php on line 46

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/text/field_text.php on line 17

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/text/field_text.php on line 17

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/slider/field_slider.php on line 40

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/slider/field_slider.php on line 40

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/radio/field_radio.php on line 17

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/radio/field_radio.php on line 17

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/info/field_info.php on line 45

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/info/field_info.php on line 45

Deprecated: Optional parameter $field declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/typography/field_typography.php on line 50

Deprecated: Optional parameter $value declared before required parameter $parent is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/fields/typography/field_typography.php on line 50
Send Email Using Lightning Process Builder - Salesforce Next Gen
Send Email Using Lightning Process Builder

Send Email Using Lightning Process Builder

Your Business has a process that when an opportunity is won, an email has to be sent to the account owner. You want to automate this process and reduce one redundant task from your executives. To Automate this requirement you would do the following. 

To Send an email from process builder you need the following components to work together

  1. An email template – (This has to be done in Salesforce classic)
  2. An Email Alert 
  3. A Process Builder

To create an email template, switch Salesforce Classic if you are in lightning experience. 

  1. Click on setup
  2. Type ‘Email Template’ in quick find/search and click on ‘Classic Email Template’
  1. There are 4 types of email template type but for this scenario we will select ‘Text’.
  1. On the new email template page, you will see two sections. Top section, where you can find the merge fields of the related record and Email template information where you can enter the below information.
  2. Folder – Unified public Classic Email Template
  3. Available for use : checked
  4. Email Template name: AccountOwner
  5. Template Unique Name: AccountOwner
  6. Encoding: General US & Western Europe (iso-8859-1 iso-latin-1)
  7. Description: (optional)
  8. Subject: Opportunity Closed Won for Account: {!Account.Name}
  9. Email Body: 

Hi {!Account.OwnerFullName}

Congratulations, we have just won an opportunity for the Account: {!Account.Name}

Please Follow the next steps in the process.

Regards

As shown in the image below

Create An Email Alert

Next in the process we need to create an Email Alert, which we can call from the process builder.

For this do the following steps. 

  1. Click on setup 
  2. Type Email Alert in the quick find/ Search. And click on Email Alert
  1. Click on the new email alert button on the email alert list view screen.
  1. On the new email alert page enter the below information.
    1. Description: Send Email to Account Owner of Opportunity
    2. Unique Name: Send_Email_to_Account_Owner_of_Opportunity
    3. Object: Opportunity
    4. Email Template: AccountOwner
    5. Recipient type: Account Owner and from recipient select Account Owner
    6. From Email Address. 
    7. Additional Email: Leave this blank
  1. Click save

Until now you have made an email template and an email alert. Now it’s time to wire these two individual components to a process which will trigger it on the required event. 

Create Process

To create a process builder, switch to lightning experience and follow these steps. 

  1. Click on the gear icon on the right hand top corner and click on setup. 
  2. Then in quick find box type process builder and click on process builder. 
  3. Click on the new button and fill out the new process details as below. 
    1. Process name: Opportunity won
    2. API Name: Opportunity_won
    3. The process starts when* : A record changes
  4. Click on save
  1. Click on the object button to select the object on which you want this process to be triggered. In this case we select Opportunity and select option when a record is created or edited. 
  1. Next you will click on criteria and define the condition when you want to execute this process. Give criteria name: Opportunity Closed Won, and select the criteria for executing Actions, there are three options, in this case select Conditions are met. 
  2. Next you define the set conditions. This is where our business logic will come into the picture, we want to send an email to the account owner when the opportunity reaches the stage closed won. For this select the field for the criteria by clicking on the field text box, this will open another modal box, in this modal box type ‘stage’ and select stage. 
  1. Set operator : Equals and type: Picklist , these values will come by default but if not then select what is mentioned. 
  2. Select value : closed won 
  3. In conditions let the option All of the conditions are met (AND) selected. 
  1. Click on save.
  2. Now click on the immediate action next to the criteria node you just created and select email alert from the Action Type picklist. 
  3. Set Action Name: Send Email to Account Owner
  4. Find the Email alert that you created earlier using the unique name: Send_Email_to_Account_Owner_of_Opportunity
  5. Click on save 
  1. Click on the Activate button to activate the process. 

Consideration:

  1. Email template, available for use checkbox should be checked to use the email template
  2. Object select in Email Alert should be the same on which the process is created, in this case both were on opportunity. 

For More Examples refer : Automate you Business Process

Sumit Datta

Sumit Datta

I am a 5x Certified Salesforce developer with overall 7 years of IT experience and 5 years of Implementation experience in Salesforce. I am here to share my knowledge and help Beginners in Salesforce to understand the concepts of Apex, Visualforce, Salesforce Lightning and Salesforce Configuration.

Leave a Comment

Your email address will not be published.