How to configure surveys to only go out at a set frequency.

Version 1

    Details

    This HEAT Service Management article reviews how to configure business rules and global variables that control how often surveys are sent out. This can be helpful in adding or restoring survey frequency to business objects.


    Resolution

     

    1.         Creating the field in the business object

    a.                  The first thing the business object needs is a field to store the boolean value

    b.                 Create a boolean field in the target business object, SendSurveyNotification

    c.                  Save the business object

     

    2.         Adding the global constant

    a.                  In ‘Configure Application’ workspace open ‘Global Constants’

    b.                 Add a new global constant

    c.                  Supply the name so it can be easily identified, ie. <Object Name>SurveyFreq

    d.                 The number will be the frequency the surveys are sent. Ie. 5 = 1 survey every 5 incidents.

    e.                  The type will be ‘Number’

    f.                    If desired, enter a description

    g.                 Click on the save button at the top.

     

    3.         Adding the business rule to calculate the frequency

    The frequency is a modulus calculation against the main tracking number (Incident #, Service Request #, etc) and the frequency. True will be returned when the modulus is zero.

    a.                 Create a new calculated business rule in the target business object for the boolean field created earlier.

    b.                 Configure the condition to fire ‘BeforeSave’

    c.                 Enter the modulus formula


     Incident Example: $(if IncidentNumber % GetGlobal("IncidentSurveyFreq") == 0 then true else false)


     IncidentNumber – This will be the main counter for the business object.

     % - This is what performs the modulus function

     GetGlobal(“IncidentSurveyFreq”) – This will be the global constant configured for the frequency value.

     When zero (0) is returned, the If statement will return true, otherwise it will be false.

     

    4.         Creating the survey workflow

    a.                 Create a workflow in the target business object.

    b.                 The triggers watch for the boolean field to be true along with any additional clauses. Out of the box,  Incident will only send the survey if the incident has been closed and the send notification flag is true.

                                                         

    c.                 The workflow consists of a notification block between a start and stop block.