One way to automate your business processes is with Workflow Rules. If you send Email Templates from field data updates, rules are the way to go! Workflows let you trigger on almost any Salesforce Object. If the criteria for the trigger is met, an action takes place.
One of the available actions is to send an Email Template. The Template can be assigned to a user or user field values, roles, the record owner and to the Primary Contact. The template must be created prior to configuring the rule and will contain the sender and body.
Email Templates can be used to notify record owners of changes or contacts of due dates.
For this example we will send an email to the primary client when the Account Active data field is updated to Yes. The template includes a welcome message to the new customer from the Sales Team.
There are 3 steps to creating a Workflow Rule:
- Select the Object to trigger on – Account object / Active field
- Configure the rule criteria – When a record is created or updated to meet the criteria of Account:Active = Yes
- Configure the action to perform if the rule is met – The Send New Customer Email Template is sent to the Primary Contact’s email address.
- Go to Setup (Gear Icon) and type “Workflow Rules” into the Quick Find Click on Workflow Rules.
- Click the New Rule
- Select the object you want to ‘trigger’ on. For this example we want to trigger on the Account Active Status field so Account is chosen. Click Next.
- Next, give the Rule a name and configure the criteria. For this example the criteria will be:
Evaluation Criteria: Created, and any time its’ edited to subsequently meet criteria. This means it will look at the value of the Active field when an Account is initially created AND when the field is changed to meet the Rule Criteria.
Rule Criteria: Account:Active equals ‘Yes’. This means the Account object’s Active field must equal ‘Yes’ in order to perform the action.
**Use Filter Logic to add AND /OR statements to the rule criteria for more flexibility.
- Click the Save & Next
- Click the Add Workflow Action dropdown and choose New Email Alert.
- Configure the Alert to use the desired template. For this example the criteria will be:
Description – Email Template Name
Email Template = Send New Customer Email
Recipient Type = Related Contact
Recipients = Related Contact: Primary Contact
- Click the Save The new workflow rule is created. Click the Done button.
- Before you can test OR implement, you must click on the Activate button at the top of the page.
- Test the rule and make any necessary edits until it is working correctly. It’s a good idea to use a test record to verify the email template is sending correctly and then change it to the Customer after testing is complete.
- To make edits to a Workflow Rule, click the Edit button in the Workflow Rule Detail section.
- To make edits to the Action, click the Edit button in the Workflow Action section.