Creating an opportunity close date e-mail alert using workflow

As best practice in CRM systems, when creating sales opportunities there should always be a close date with which we can forecast, report, and monitor the progress of the sale.

In Salesforce CRM, the close date can be referred to in order to automatically trigger an e-mail that alerts the opportunity owner that the sales opportunity is nearing the scheduled close date.

To create this automatic sending of close date e-mail alerts, the following recipe makes use of a Salesforce workflow rule and e-mail alert.

Getting ready

Create an e-mail template using the following steps:

  1. Navigate to the new e-mail template creation page, by going to Your Name | Setup | Email | My Templates.
  2. Select My Personal Email Templates from the Folder drop-down list.
  3. Click on the New Template button as shown in the following screenshot:
    Getting ready

    Note

    Here, we are presented with the Step 1: Email Template: New Template page.

  4. Choose the Text option and click on the Next button.

    Note

    Here, we are presented with the Step 2: Text Email Template: New Template page.

  5. Choose the Unfiled Public Email Templates option from the Folder drop-down list.
  6. Set the checkbox Available For Use.
  7. Enter the name of the e-mail template in the Email Template Name field. In this recipe, type the text Alert Opportunity Close Date.
  8. Accept the default text Alert_Opportunity_Close_Date that is automatically set in the Template Unique Name field.
  9. Optionally, enter a description in the Description field.
  10. Enter the subject for the e-mail in the Subject field. In this recipe, type the text Alert Opportunity Close Date.
  11. In the Email Body text area, enter the following code:
    {!Today}
    
    Dear {!User.FirstName},
    
    The close date for the opportunity, {!Opportunity.Name} for the account {!Opportunity.Account.Name} is due within 21 days.
    
    Sincerely
    
    Salesforce System Administrator

    This is shown in the following screenshot:

    Getting ready
  12. Click on Save.

How to do it...

Carry out the following steps to create an opportunity close date e-mail alert using workflow:

  1. Navigate to the workflow setup page, by going Your Name | Setup | Create | Workflow & Approvals | Workflow Rules.
  2. Click on Continue (if shown).

    The Continue button is found on the Understanding Workflow page (if this is shown) as in the following screenshot:

    How to do it...
  3. Click on New Rule.

    Note

    Here, we are presented with the Step 1: Select object page.

  4. Select Opportunity and click on Next as shown in the following screenshot:
    How to do it...

    Note

    Here, we are presented with the Step 2: Configure Workflow Rule page.

  5. Enter the name of the new workflow rule in the Rule Name field. For this recipe, type the text Alert Opportunity Close Date.
  6. Optionally, enter a description for the new workflow rule in the Description field. For this recipe, type the text Automate the alerting of Opportunity Close Dates.
  7. Select the When a record is created, or when a record is edited and did not previously meet the rule criteria option from the Evaluation Criteria options list.
  8. In the Rule Criteria section, set the Run this rule if the following option to formula evaluates to true.
  9. Enter the following formula (as shown in the following screenshot):
    NOT(IsClosed)
    How to do it...
  10. Click on Save & Next.

    Note

    Here, we are presented with the Step 3: Specify Workflow Actions page.

  11. In the Time-Dependent Workflow Actions section, click on the Add Time Trigger button as shown in the following screenshot:
    How to do it...

    Note

    Here, we are presented with the Add Time Trigger page.

  12. Enter 21 in the first text field and select Days from the next drop-down list. Select Before and Opportunity Close Date as shown in the following screenshot:
    How to do it...
  13. Click on Save.

    Note

    Here, we are presented with the Step 3: Specify Workflow Actions page.

  14. In the Time-Dependent Workflow Actions section, set the Add Workflow Action option to New Email Alert as shown in the following screenshot:
    How to do it...

    Note

    Here, we are presented with the Email Alert Edit page.

  15. Enter the description for the e-mail alert in the Description field. For this recipe, type the text Alert Opportunity Close Date.
  16. Accept the default text Alert_Opportunity_Close_Date that is automatically set in the Unique Name field.
  17. Now choose the template that we created in the Getting ready section of this recipe. We called this template Alert Opportunity Close Date.
  18. Set the Recipient Type to Owner.
  19. Set the Selected Recipients to Opportunity Owner as shown in the following screenshot:
    How to do it...
  20. Click on Save.

    Note

    Here, we are presented with the Step 3: Specify Workflow Actions page (as shown in the following screenshot).

    How to do it...
  21. Click on Done.

    Note

    We are now redirected to the new workflow rule where we can activate the rule (as shown in the following screenshot).

    How to do it...
  22. Finally, click on Activate.
  23. Set Default Workflow User if the message that is shown in the following screenshot is shown:
    How to do it...
  24. Click on OK.

    Note

    We are now redirected to the Workflow & Approvals Settings page where we can set Default Workflow User (as shown in the following screenshot).

    How to do it...
  25. Set Default Workflow User.
  26. Click on Save.
    How to do it...

Note

We are now finally redirected to the Workflow Rule Detail page with the Active checkbox checked as shown in the preceding screenshot.

How it works...

An automatic e-mail alert is now triggered using a Salesforce workflow rule that sends the e-mail alert when nearing the opportunity close date. In this example recipe, we see that an e-mail alert is received 21 days before the opportunity close date, as shown in the following screenshot:

How it works...

Note

If the opportunity close date is less than 21 days in the future, the e-mail alert will be sent immediately.

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

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