How to ensure a user does not receive an Incident Survey more than once every 14 days

Version 1

    Details

    In addition to the standard frequency of Surveys sent for Closed Incidents, you may wish to configure the system so that once a user receives a Survey, the system will wait at least 14 days (for example... this time is configurable) before that particular user is sent another Survey. This can be desirable when certain users submit a high volume or proportion of Incidents.


    Resolution

     

    1. Add a Date field to both Incident and Employee called SurveyNextSentOn

    2. Add a Boolean field on Incident called SurveyCanSend

    3. Create a new Update quick action on Employee, that does the following (this example is a 14 day timeout – adjust the seconds as required):
    Update SurveyNextSentOn to:
    $(HOPCalcTargetDate("24 x 7", CurrentDateTime(), 1209600))

    4. Add a Before Save rule to Incident: 
    for incident.surveycansend
    $(if SurveyNextSentOn > CurrentDateTime() then False else True)

    5. Add an Editing rule to Incident:
    Set SurveyNextSentOn on update of ProfileLink
    $([OtherObject]SurveyNextSentOn)

    6. In the Survey workflow on Incident -
    a. Update the trigger condition, adding SurveyCanSend = True

    b. Add a QA block that is a ‘Run for child’ to Employee to run the QA created in step 3