Print this page

Work.com: Calibration - How do I create an email alert Workflow for rating changes?

Knowledge Article Number 000205344
Description How do I create an email alert Workflow for rating changes?
Resolution
Section 1: Creating an Email Template

1. Go to Setup | Communication Templates | Email Templates

2. Click the 'New Template' button

3. Select Visualforce & click the 'Next' button

4. Select 'Unfiled Public Email Templates' from the folder picklist

5. Check the box next to Available For Use

6. Enter an Email Template Name

7. Click on the 'Template Unique Name' field to auto-populate a name for you

Note: If it doesn't auto-populate click on the 'Email Template Name' field add a space then remove it then click on the Template Unique Name' field

8. Enter a Description

9. Enter the Subject of the email

10. Select 'User' from the 'Recipient Type' picklist 

11. Select 'WorkFeedback' from the 'Related To Type' picklist

12. Click the 'Save' button

13. Click the 'Edit Template' button

14. Paste the following Visualforce markup and hit the 'Save' button:
 
<messaging:emailTemplate subject="Performance Evaluation Submitted" recipientType="User" relatedToType="WorkFeedback">
	<messaging:htmlEmailBody>
		Hi {!relatedto.owner.FirstName},
			<br/>
			<br/>
			{!relatedto.Request.Subject.Name}'s performance review for the {!relatedto.Question.QuestionSet.PerformanceCycle.Name} 
			cycle has been edited by {!relatedto.lastmodifiedby.name}.
			<br/>
			<br/>
			Thank you!
	</messaging:htmlEmailBody>
</messaging:emailTemplate>

Section 2: Creating a Workflow

1. Go to Setup | Create | Workflow & Approvals | Workflow Rules

2. Click the 'New Rule' button

3. Select 'Feedback' from the 'Object' picklist

4. Enter a name and description for the Rule

5. Select 'created, and every time it’s edited' from the Evaluation Criteria

6. Select 'formula evaluates to true' from the 'Run this rule if the following' picklist

7. In the formula textarea enter the following:

OwnerId <> LastModifiedById

Note: This formula is just checking whether the person who last edited a piece of feedback is the same person who owns the feedback.  There is no check to see whether it is a rating question or if it is ad hoc feedback.  This will work for most cases, as the only time a user would be editing someone else's feedback is through Calibration, which only includes rating questions.

8. Click the 'Check Syntax' button and verify that the 'No errors found' message is shown next to the button

9. Click the Save & Next button

10. Select 'New Email Alert' from the 'Add Workflow Action' picklist

11. Enter a Description and a Unique Name for the email alert

12. For Email Template click the magnifying glass icon and search for them template you created in section one of this guide

13. For 'Recipient Type' select 'Owner' from the 'Search' picklist

14. Select Feedback Owner from the 'Available Recipients' multi-select picklist and hit the 'Add' icon

15. In the 'Additional Emails' section add any other users (by email address) that should receive a notification.

16. Select 'Current User's email address' from the From Email Address picklist

17. Click the 'Save' button

18. Click the 'Done' button

19. Click the 'Activate' button to enable the workflow




promote demote