Would you like to notify users when checklist items are assigned to them? Well, it is certainly possible to set up such a customization using Salesforce Workflow Rules. You would first need to create an email template for the purpose and then you would need to set up the Workflow Process.
Create Email Template [Admin]
- From Setup, navigate to:
- Lightning: Email | Email Templates.
- Classic: Communication Templates | Email Templates.
- Click on New Template.
- Step 1: Choose the preferred template type. Select Custom (without using Letterhead). Click Next.
The Custom (without using Letterhead) option allows you to use basic HTML for a more polished look and feel. - Step 2: Select a Folder, check the Available for Use checkbox, enter Email Template Name and Description. Click Next.
- Step 3: Draft the email. Enter the Subject. For the HTML Body, you can use the sample text below. Click Next.
Note: If you use the sample HTML text below, make sure to replace the URL to make it work for your org. Notice that the link in the sample text includes "taskray.na1...". To make the URL work, you must replace the na# to match your production. Look at your web address while in Salesforce and note the first three or four digits (na#). In the sample code below, change na1 to match the number from your own production instance.Sample HTML Text:
<html>
<body style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size:12px;">
<p>{!User.Name} has assigned you the following checklist item:</p>
<p>{!TASKRAY__trChecklistItem__c.TASKRAY__trLongName__c}</p>
<p>To access the checklist go to the task <a href="https://taskray.na1.visual.force.com/apex/TASKRAY__trtaskboard?taskid={!TASKRAY__trChecklistItem__c.TASKRAY__Project_TaskId__c}">{!TASKRAY__Project_Task__c.Name}</a>.</p>
</body>
</html>
-
Step 4: Create text-only version. Click on the Copy text from HTML version button to add a plain text version of the notification. In the Warning dialog, click OK. Click Save.
-
On this page, review the HTML and the Plain Text message versions. If you would like, you can send a test email by clicking on the Send Test and Verify Merge Fields button.
Create Workflow Rule [Admin]
Now that you have a notification template, you need to create a workflow rule that will detect the overdue tasks and send an email to the task owners.
- From Setup, navigate to:
- Lightning: Process Automation | Workflow Rules.
- Classic: Create | Workflow & Approvals | Workflow Rules.
- Click on New Rule.
- Step 1: Select object. Click on the Object field and select TaskRay Checklist Item from the dropdown. Click Next.
- Step 2: Configure workflow rule. Enter the Rule Name and Description.
- In the Evaluation Criteria section, select Created, and every time it's edited.
- In the Rule Criteria section, select formula evaluates to true.
- Enter the formula in the text box: ISCHANGED(TASKRAY__trOwner__c).
- Click Save & Next.
- Step 3: Specify workflow actions. Under Immediate Workflow Actions, click on the Add Workflow Action button and select New Email Alert.
- Create the new email alert. Enter Description and Name.
- For the Email Template field, click on the magnifying glass icon and select the new Checklist Owner Assignment template that you created earlier.
- For Recipient Type, select Related User.
- From Available Recipients, select Related User: Assigned To and click the Add arrow to move it to the Selected Recipients section. Click Save.
- Back on the Edit Rule page, click Done in the top right corner.
- You will be taken to the Workflow Rule detail page. Click on the Activate button.