- Starter
- Standard
- Premium
Notifications are essential when it comes to having everyone on the same page and keeping the projects moving forward. As you might already know, in order to use TaskRay, all users need a Salesforce and a TaskRay license. But what if you need to notify a project stakeholder outside of TaskRay and Salesforce (i.e. vendors, customers, etc.) about progress on tasks? With a little setup, that is possible to do. Better yet, the process can be automated using the Lightning Process Builder.
Below are some examples of the automated email notifications that can be sent to external stakeholders:
- When a specific task is completed
- When a key task becomes overdue
- When a task is approved
In this article, we will set up a process that will send an email notification to the external stakeholder when a task is completed. However, keep in mind that you can modify the process to suit the specific needs of your organization.
In addition, you can also set up a process that would allow external stakeholders to create tasks in TaskRay. See Email to TaskRay for more information.
Summary
To summarize the process, you will first need to create a custom Email field and add it to Task Details in TaskRay. This will be the field where you will enter the email of the external stakeholder that you want to notify when a task is completed. Next, you will create an email template and then a workflow rule to send the email. Lastly, you will set up a process using the Process Builder, which will trigger the email to be sent when a task is completed in TaskRay.
Step 1: Create a Custom Field on the Task Object and Add It to the Field Set [Admin]
The first thing that you will need to do is create a custom Email field on the TaskRay Task object as well as add that field to the task's field set to make it visible in TaskRay. This is the field that you will use to enter the email address of the person that you want to send a notification to when something happens to a task.
Create the Custom Field
- From Setup, navigate to:
- Lightning: Objects and Fields | Object Manager.
- Classic: Create | Objects.
- Click on TaskRay Task.
- Under Fields and Relationships, click on New.
- Step 1: Choose the field type. Select Email and click Next.
- Step 2: Enter the details. Enter the Field Label (i.e. Email). Click Next.
- Step 3: Establish field-level security. Mark Visible for all necessary profiles and click Next.
- Step 4: Add to page layouts. Keep Project Task Layout checked and click Save.
Add the Field to TaskRay Task Field Set
- Back on the TaskRay Task object page (Setup | Create | Objects | TaskRay Task), navigate to the Field Sets section and select TaskRay Task Field Set.
- In the object palette, locate the new Email field and drag it into the In the Field Set container.
- Click Save.
Step 2: Create Email Template [Admin]
Next, you will need to create the email template that will be used to notify the stakeholders that the task has been completed.
- 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.
Note: 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 (i.e. Completed Task Notification - External) and Description. Click Next.
- Step 3: Draft the email. Enter the Subject. For HTML Body, you can use the sample text below. Click Next.
Sample HTML Text:
<html>
<body style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size:12px;">
<p>Hello,</p>
<p>The task {!TASKRAY__Project_Task__c.Name} for {!TASKRAY__Project_Task__c.TASKRAY__Project__c} was finished on {!TASKRAY__Project_Task__c.LastModifiedDate} by {!TASKRAY__Project_Task__c.LastModifiedBy}.</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.
Step 3: Create Email Alert Workflow Rule [Admin]
Now that you have a notification template, the next step is to create an Email Alert Workflow Rule to specify who the alert should be sent to. In this case, it will be the person whose email will be specified in the custom Email field on the task.
- From Setup, navigate to:
- Lightning: Process Automation | Workflow Actions | Email Alerts.
- Classic: Create | Workflow & Approvals | Email Alerts.
- Click on New Email Alert.
- Enter a Description (i.e. "Notify Stakeholder When Task Is Completed - External"). The Unique Name field should populate automatically.
- For Object, select TaskRay Task.
- For Email Template, click on the lookup icon and select the Completed Task Notification - External template that you created previously (from the section above).
- Select Recipient Type. For Search, select Email (the custom field created in Step 1). This will filter the list of Available Recipients below. From the list, select Email and move it to the Selected Recipients section using the Add button.
- Click Save.
Step 4: Build the Process [Admin]
The final step is to build out the automated process to trigger the email notification when a task is completed.
Create a New Process
- From Setup, navigate to:
- Lightning: Process Automation | Process Builder.
- Classic: Create | Workflow & Approvals | Process Builder.
- Click New.
- Enter the Process Name (i.e. "Send Email Notification to External Stakeholder When Task Is Finished"), API Name, and Description.
- For The process starts when field, select A record changes.
- Click Save.
Select the Object for the Process
- On the canvas, click on + Add Object.
- For the Object field, select TaskRay Task.
- Under Start the process, select When a record is created or edited.
- Click Save.
Define the Criteria That Triggers the Process
- On the canvas, click on + Add Criteria.
- Enter the Criteria Name (i.e. "Task Is Complete").
- Under Criteria for Executing Actions, select Conditions are met.
- Under Set Conditions, select the following:
- Field = [TaskRay Task] Completed
- Operator = Equals
- Type = Boolean
- Value = True
- Under Set Conditions, click on + Add Row and set the following:
- Field = [TaskRay Task] Email (the custom field from step 1)
- Operator = Is null
- Type = Boolean
- Value = False
- Under Conditions, select All of the conditions are met (AND).
- Click Save.
Define the Actions That Occur When the Process Runs
- On the canvas under Immediate Actions, click on + Add Action.
- For Action Type, select Email Alerts.
- Enter the Action Name (i.e. "Send email alert to external stakeholder").
- Click into the Email Alert field and search for the email template that you created earlier(i.e. "Notify Stakeholder When Task Is Completed - External").
- Click Save.
Activate the Process
- Click Activate.
- In the dialog, click Confirm.
Test It Out!
That's it! You can now give this a try. Go to TaskRay and create a new test task. In Task Details, you should see the new Email field. Enter your own personal email (one that you don't use for Salesforce) in that field and save. Move the task to the final column to complete it and check your email. You should see the notification there!