ServiceNow - Utilising Instant Feedback loops to build workflows to top of HappySignals data

HappySignals provides extensive reporting possibilities through our Service but sometimes it's needed to take actions in ITSM system based on users survey inputs. Here is short guide for inspiration.

To implement following kind of use case some technical knowledge is needed from ServiceNow platform.

HappySignals Feedback
(x_pgo_happysignals_happysignals_feedback) table contains existing survey data. As example here is an record from incident process containing feedback text given by user, score, given profile, who was resolved by user and the reference to the actual incident record.

Screenshot 2021-11-17 at 13.12.21

ServiceNow provides numerous tools for implementing different kind of workflows. This article presents how to implement following use case using business rule and email notification with ServiceNow eventing:

Send a notification to the specific team or user in ServiceNow if 'lets say' a certain amount of people log a negative experience and choose a certain factor? I.e 25 people say that they experience with service desk is poor because of slowness, this sends a notification to the CS team to look at this.

1) Create Event (System policy/Events/Registry)

Screenshot 2021-11-17 at 13.32.01

2) Create Business rule below HappySignals Feedback table. Add Conditions based on your business requirements. Screenshot 2021-11-17 at 13.37.16

And following Business Rule script to trigger the event:

(function executeRule(current, previous /*null when async*/) {

    var thresHoldToTriggerEmail = 25;
    var gr = new GlideAggregate('x_pgo_happysignals_happysignals_feedback');
    var feedbacks = 0;
    if ({
        feedbacks = gr.getAggregate('COUNT');
        if (feedbacks == thresHoldToTriggerEmail) {
            gs.eventQueue('x_pgo_happysignals.HappyFeedbackEvent', current, gs.getUserID(), gs.getUserName()); 

})(current, previous);


3) Define email notification to listen event which was created in the first step. Please note email notification needs to be in global scope to receive events.

Screenshot 2021-11-17 at 13.49.48

If you have requirements to do something different, for example creating Incidents or Change Requests when reaching defined threshold, you can use similar type of Business Rule conditions presented here. But instead of triggering an event to send email notification, create the Incident or Change record based on your needs (for example scripting using GlideRecord insert).