Learning Concepts at This Skill Station:
Adding hint text to fields
Setting file attachment number limits
Sending custom task assignment notification emails
Many times when employees submit expense requests for approval they have to supply supporting documents via email to the request approver. How can we streamline with Pulpstream? At this Skill Station, which is the final one in this Learning Line, we will learn how to do that.
Start by accessing your work stream. Unlock it. We will start by editing our Request data component. Add a new field called “Supporting documents.” The field will contain information that is of the type “File Attachments.”
Save the field. Save the data component.
Next let’s edit the Request form. In the Available Fields, you will see the Supporting Documents component field available.
Grab it with your mouse, drag it and drop it into the form.
In the Supporting Documents configuration popup, let's add a hint for the end user. In the Field Hint, type in a hint that will be displayed on the user’s screen such as “Please supply necessary documents for facilitating approval of this request.” Make the field required by selecting that from the Field Attributes pull-down menu. Since this is a field file, you can set a maximum number of files that can be attached by a user underneath this Field Attributes field. We are going to set a max of 5.
Save your changes.
Now so far we haven’t configured any specific email templates for this task notification. However, every work stream in Pulpstream comes with two “out-of-the-box” starter email template that cannot be deleted. But they can be customized. As you see in your Components Catalog in the Email Templates section:
1. Record Creation Email - This template simply informs someone that a new record has been created. It comes with a link to that record.
2. Task Assigned Notification - This template is used whenever a task is created. Every task owner is notified, when this email template is used.
So could we configure this standard task notification email to suit our purposes? Yes, but doing so would affect every task. Let’s build a brand new task notification email template.
Hover your mouse over the Email Templates title to reveal the “New” function. Click on that.
In the Add Email Template popup, get started.
Title it “Custom Task Notification Template.”
We can customize whom we want this email to be sent from. We have 3 options:
- Record Submitter - The email will be sent on behalf of the person who submitted the request.
- User Present in a Field - This is useful when a rejection or approval email is being sent. In that case, if an approver user is present in a field, we can use that, so that the email is sent on behalf of that user.
- Specify Here - This is useful when you want to hardcode the sender name.
Specify Here is the option that suits our needs today. Select that in the pull-down menu. In The From Name type in what you want displayed in the email from text, such as Acme Accounting. In the From Address field, type in the email address. Use a real email address here if you are planning to test your stream. The Subject line will be: New Expense Pre-Approval Request.
In the Body, create a personalized email. Use the merge field value finder tool to create dynamic emails. In the Select A Field tabs, use the Record Meta Data Fields and Request Data Component Fields in the body of your email. Copy them and paste them into the email to create an email template that suits your business culture.
At this stage, the email template should look similar to this one:
We also want to insert a URL so the approver can click on a link to visit that record. For this purpose Pulpstream has a variety of Task Meta Fields in the merge field value finder tool. One of those is the meta field called “Access URL.”
Note: Task Meta Data Fields will only work in the email templates that are used with User Task steps.
Now if we simply put this $!task.url in the email body, it might not display in all email clients as a clickable link. To solve this problem, we are going to use a little bit of HTML. Put the merge field value for the URL into an a href tag like this into the body of the email:
<a href=“$!task.url”>Click to open task and approve<a/>
Add text that the user will click on in between your a tags.
We also want to send the supporting documents as attachments to this email. Scroll down to see the Attach from Contents... pull-down menu. Select “Supporting Documents” from the menu. Finally if there are multiple pdfs attached, you can combine them all into one file. If that satisfies your business requirements, check the box next to Combine All PDF Attachments.
Save the template. You’ll see it appear in your Email Templates catalog.
Next we need to modify our Review Request step so that it uses our custom email template to notify request approvers. Double click it to open it. Go to the Assignment tab. In the Assignment Options, turn off the standard task notification email by unchecking the box by Send task assignment notification email.
Go to the Event Actions tab. Add a New Event.
In the Event that a Task is Created, we always want to send an email that uses our custom task notification email template. We want the recipients of this email to be the task owner.
Save your changes to the user task. Save your changes to the process. That’s it!
Before we call it a day, let's test the process. Go to the home page and submit an expense approval request.
Notice that there is now a supporting docs field with which you can attach multiple documents.
After you submit the request you can find the records Your Records in the Submitted by You tab. Click on Attachments tab in the record itself to see all the attachments that were added to a request.
The email address you specified earlier should have received an email with the format of our email template. You’ll see all the attachments and a link to the task.
The approver would also be able to see all the attachments in their Tasks on the Tasks tab on the Task detail page.
Thus concludes our visit to this Skill Station. This is also the end of the Learning Line. Learn new ways to streamline operations by riding the Purple Express to new Skill Stations. Click on the home page to see your options.