Survey trigger Condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 01:42 PM - edited 06-19-2025 01:43 PM
Hi Everyone,
How to implement service Now survey trigger on Incident table that activates based on either:
Every 60 days since the last survey, or
- After the 5th ticket since the last survey
Can some one help me out the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 02:24 PM
We have a survey that appears for every 5 tickets as well!
- Ensure the survey is enabled
- Go to Survey Management > Survey Properties
- Ensure Surveys are Active and your desired survey is published
- Create a Metric or a Custom Table to track survey history*
*You'll need to store when a user last received a survey and how many incidents they've had since then* - Create a custom table (i.e.: u_user_survey_tracker)
- Fields:
- User (reference to sys_user)
- Last survey date (date)
- Incident count since last survey (integer)
- Fields:
- Create a business rule on the incident table
- Run it after the update only if:
- The state changes to Closed
- User is not null
- Run it after the update only if:
- Use GlideSurveyUtils.sendsurvey()
- This script method lets you trigger a survey programmatically:
- GlideSurveyUtils.sendSurvey('<survey_sys_id>', user, current.sys_id);
user: sys_user to receive the survey
current.sys_id: related record (optional)
- Test by impersonating the intended user group, and close 5 incidents as the same user. Confirm the survey only goes out after the 5th or after 60 days
Some nice add-ons after you get it working:
- Use Scheduled Jobs to clean up or recheck
- Add a Last Survey Sent field on the Incident for an audit trail
- Display survey status on the user's profile or create a report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 07:55 AM
Hi Katie,
Thanks for the solution.
I am following the same point as you mention in the above message.
But, Here i was confused with point 5. where to use GlideSurveyUtils.sendsurvey() method.
I am very bad with coding. Could you please help me with coding?