Welcome to Skill Station 3. Today, we will learn how to automatically direct expense approvals to the right person based on an amount.
Learning Concepts in this Station:
Using a decision matrix with condition columns
Configuring user tasks with due dates
Using event actions to automate notification emails
Let's start by going accessing our Streams Management area. In your Streams Catalog, click on the expense pre-approval stream. We have a few versions of this stream. Let's check out the currently published version.
As we learned in another Learning Line, we create new versions of a work stream, so that we can enhance one without disrupting the streams that are in use by our colleagues. The working version is the one that we are going to edit, while the production version is the one that is published and in use by others. Changes you make to the working version will not impact the one that is in production. Later when we check the stream back in, the edits we made to the working version will be merged into the production version.
Click the checkout button. Add checkout comments to maintain precise records of our edits to the work stream.
Using a Decision Matrix with Condition Columns
Access your Stream Definition canvas. Delete the Approve End step and the connection line to it. In your Stream Definition canvas navigation menu, look for the Gateways. Drag a Decision step onto your canvas where the Approve End step used to be.
In the Decision Matrix popup, give it a title: “Decide based on amount.” Check the “Decision Matrix” radio button. Underneath the title, there is an “Add condition columns” link. Click on that to add one.
We are going to make the decision with the amount of the request, so in the property pull-down menu, choose “Amount.” For the operator, choose “Greater than.” The label will also be “Amount.”
The Amount should now appear in the condition column as something that can be edited.
Click on the “Add Results” link to add possible outcomes that are based on an amount. In the Decision Results popup box, set 2 outcomes:
1) “No Further Approval” and
2) “Higher Approval Needed.”
Save your changes.
At this point your Decision Matrix configuration will look like this:
Now it’s time to configure the decision. In the Amount field to the right of the if word, put 5000 in the field. Do not use commas or currency symbols. In the Result pull-down menu, select “Higher Approval.” To the right of the else word under the Result, select “No Further Approval” from the pull-down menu.
Save your changes.
On your Stream Definition canvas you should now have an additional Decision Gateway on the canvas. Connect the first Decision Gateway to the one we just configured. Hover your mouse over it to reveal the arrow. Click on that and hold your mouse down to drag it to the second decision diamond. This will make a connector line. In the Connector popup box, tell Pulpstream that the work stream should flow down this line when the result is “Approve” by choosing that in the pull-down menu. Your stream will look like this:
Drag and drop items on the screen to rearrange them if you want more space between the Decision Gateways.
Configuring User Tasks with Due Dates
Now we need to add a User Task step. In your Stream Definition canvas navigation menu, click on the User Task options button and drag it onto your canvas below the second Decision Gateway. Notice that we have a few tabs here. We’re going to start on the General tab. Configure the user task by giving it a subject. Let's go with “Supervisor Approval.” Under select a form to show record details to task assignee, choose “Request Form.”
No completion form is needed in the select an optional form… section. We are going to give the user two days to complete this task. In the when will this task be due after creation pull-down menu, select “It will be due in days specified here.” Enter the number of days, which is 2. I always like to select using a business calendar to avoid tasks being due on days that I’m off. Go with the option that suits your business culture.
Your General tab configuration should look like this:
Next click on the Assignment tab to assign this task to the supervisor of the submitter. Make sure that both assignment option boxes are checked. Let's give this 2 outcomes. For the action buttons available to the task assignee(s), choose “Approve/Reject” from the pull-down menu.
Using Event Actions to Automate Notification Emails
Lt's move on to the Event Actions tab. On this tab, we are going to catch the “Approve” and “Reject” actions, and set the conditions that send the appropriate emails. Add two events, by clicking on the Add an Event button.
Event 1: In the Event that the task is completed, the Completion Action should be Approved. The event condition will be “Always.” The Event Actions will be 1. Send Email. Use the template called “Approval Notice.” The recipient(s) will be the Record Submitter.
Event 2: In the Event that the task is completed and the Completion Action is Rejected, the Event Condition should Always be to Send an Email that uses the Rejection Notice template. The recipient should be Record Submitter.
When you are done, your Event Actions tab should be configured like this:
Save your changes to the User Task.
Back on your Stream Definition Canvas, connect your Decision Gateway to the Supervisor Approval step that we just created. (Hover your mouse over the step to reveal the arrow. Click on that and hold it down to drag a line to the Supervisor Approval step.) In the Connector popup box, select “Higher Approval” from the pull-down menu. Save your Changes. Afterwards your stream will look like this:
Back on your Stream Definition canvas, click on your Smart Steps options in the navigation menu. Drag a Send Email step onto the canvas to the right of your Decision Gateway.
In the popup, configure the step to send an “Approval Notice” email to the Record Submitter. Call it “Approval Email.”
Save your changes.
Now you should have a new email step on the canvas. Connect the Decision Gateway to the Approval Email step. In the Connector popup, choose “No further approval” from the pull-down menu. This will make it so that when no further approvals are needed, an approval notice email will be sent to the request submitter. Save your changes.
Now both outcomes in your Decision Gateway have pathways through which the stream will flow. Drag an End step onto the canvas. Connect both the Approval Email and the Supervisor Approval email to the end step. At this point, Your work stream will look like this:
Now we need to remove the events from the first review step, because there’s no need to send an approval or rejection email at that early of a stage. Double click on the Review Request step to edit it. Click on the Event Actions tab and delete both events. Find the delete function by clicking on the gear icon to the right of the Event ID number.
After deleting both events, save your changes. And we’re ready to save the process. Check in the stream and publish the new version.
Important: The new version of the process requires a supervisor to be specified in a user record. If the request submitters supervisor doesn’t exist in the system, the task will be sent to the administrator of the stream, which right now is you.
At the next Skill Station we will learn about approving requests with a modified quantity.