Placeholder

Customer Forum

Automatically create Public/Private Activities to log recent Case updates and drive portal notifications

Jamie (Workbooks Online) Posted: 2018-12-17 14:03

This article follows on from our "Setting up the Case Portal" post, where we talk about some advanced options to create Activity records for each action taken on a support ticket. Our own internal Support team use this method, and we find it is currently the most efficient way to work when dealing will a small - medium volume of Cases. The Activities created can also then drive automated emails to the Case's Primary Contact and/or drive Notifications that appear in a "Facebook-like" notification area within the Case Portal navigation bar.

In the Case Portal Plugin, you should have selected "On" for the "Use Portal Notifications" setting - this will automatically show the following icon when any user logs into the Portal. It will also create four new fields on your Case record that are hidden by default. These are:

  • Task Type (Picklist) - Next Steps, Notes, Resolution, Phone call
  • Activity Sub Type (Picklist) - Public or Private options
  • Next Steps Due (Date)
  • Task Description (Rich Text)

The "Activity Types" picklist will also have the following values added automatically - "Next Steps", "Notes", "Resolution", "Phone call"

If you are using this script as a standalone feature without the Case Portal, you can create the above fields manually.

with_notif.png

This forum post outlines how to setup a Script Library script as an On-Save button process to store an Activity for an action taken against a Case - this process will also drive the Case Portal notification area shown above. A separate forum post can be found here on how to configure automated email notifications.

Step 1: Create a Recent Activities Report Cell

Using a Report field, you can display the most recent Activities that have been created against a Case. This will allow anyone viewing the case to see exactly what has happened with the Case in chronological order without having to navigate away from the Main tab of the Case record.

recent.png

To begin with, you will need to build a report prior to creating this field. We have given you access to a Report Template to get you started but of course you can add further details as required. Click Start > New > Report > Create a Report from a template Report and choose "Cases and their recent Activities". Add a constraint as follows (this will ensure that only the Activities for that Case are show in the grid):

constraint.png

Next - go to Configuration > Customisation > Record Types > Cases. Create a new Custom Field of type "Report" and call it "Recent Activity" and select the report that you just created. Save the field. In Step 3, we will place this field in the correct location on our Form Layout.

Step 2: Configure the On Save

Under "Form Layouts" tab, choose one of your Form Layouts that you would like to apply this script to. Under the Automation Tab of your Form Layout, we will configure a new script. Click "New Process Button" and then fill out the following information:

  • Script Name: Create Activities from Case
  • Script Location: Script Library
  • Script: Create Activities from Case
  • Enable: True (tick)
  • Run As: Current User
  • Position: On Save
  • Show Confirmation Message: False (un-tick)

Click Save once you have entered the above information. A new tab will appear called "Parameter Values". There are two parameters to consider:

script.png

  • case_activity_sub_type_val: Set this parameter to "Public" or "Private" if you want the script to always create an Activity of a certain Sub Type. On most setups, you will probably want the ability to create both. However, on some occasions, you have certain form layouts where you wish to log Activities for actions taken that are always Private (Internal Notes) and are not visible on the Case Portal.
  • enable_notifications_for_portal: If you are using the Case Portal, you must set this parameter to "true", otherwise the Portal Notifications area will not work correctly. 
Step 3: Show Custom Fields

On your Form Layout, under the "Sections" tab, create a new one column section called "Case Notes". Set the parent section to "Form" and place in the relevant place on your layout. Then create a 2 column section called "Case Notes Sub Section". Set the parent section of this 2nd section, to "Case Notes".

From here, you can now place the fields described at the start of this post:

  • Task Type (Picklist) - Next Steps, Notes, Resolution, Phone call
  • Activity Sub Type (Picklist) - Public or Private options
  • Next Steps Due (Date)
  • Task Description (Rich Text)

We'd recommend the following setup as this works well for our team:

case_notes.png

As a final step, place the Report field created in Step 1, either above or below the "Case Notes" section.

That's it! You are now ready to use this process. See below for a worked example of what this script does.
Worked Example:

We'd recommend that you setup a Portal test user to fully test this example. Please review the "Setting up the Case Portal" post to see how to do this. Create a new Case and set any required fields. Also set the following fields:

  • Set the "Task Type" field to "Next Steps" 
  • Set the "Activity Sub Type" to "Public"
NOTE: Private Activities are not visible to any Case Portal users and are designed for internal notes only. For instance, the Workbooks Support team use "Private" notes to track any conversations that they have with 3rd parties or a Workbooks engineer before providing a customer friendly response.
  • Set the "Next Steps Due" to TOMORROW
    • If the Next Steps Due date is set, then the Activity will not be marked as "Complete". Instead it will be marked as "New" with a Due Date of the value set in the Next Steps Due field to allow you to drive Activity Reports & Dashboards and spot non-actioned Activities.
  • Set the "Task Description" field to some relevant text. For this example we'll just use "A test update".

When you save the record, an Activity will be created that is visible under the "Activities" tab. It should also show up in the Recent Activity grid that you created at the top of the list as it is the most recent activity. As a final step, the script clears the above fields so that you can log a new update next time. Try the same thing again with a "Private" Activity Sub Type.

Finally, login as your portal test user to your Case Portal. You should see 1 update under the Notifications menu. Click the update in the notification pane, which will show you the relevant Case in the portal. Notice how the "Private" Activity is not shown here. 

NOTE: Remember that this update will not send an email to the customer. You may wish to set up our Case Notification Emails script as well. See our separate forum post here to automatically send the customer an email with the update given in your Public Activity.