Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Set survey to trigger every quarter

kim-lindgren
Kilo Sage

I have a survey I want to trigger every quarter for members of a particular group.

 

On the related list of my Survey Definition [asmt_metric_type], I can add trigger conditions, however these seem to require specific events to trigger.

 

On the Survey Definition record itself, there is the Schedule Period field, but this does not allow anything between monthly and yearly.

 

What is the solution here?

 

 

Regards,

Kim

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@kim-lindgren 

you can use scheduled job for this which runs every quarter and trigger survey on particular table record and for particular users

recently I shared solution for something similar on how to trigger survey from script

Schedule an assessment to be sent every quarter 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

M Iftikhar
Tera Sage

Hi @kim-lindgren,

 

To trigger a survey on a quarterly basis, you can use a Scheduled Script Execution instead of relying on Survey trigger conditions or the limited Schedule Period options.

Steps

  1. Navigate to System Definition > Scheduled Jobs.

  2. Click New.

  3. On the “What would you like to automate?” page, select Automatically run a script of your choosing.

    MIftikhar_0-1763569509696.png
  4. Fill out the form:

    • Name: Schedule ABC Group Survey

    • Run: Business Calendar: Entry Start

    • Business Calendar: Quarter

    • In the Run this script field, enter:
var surveyID = 'YOUR SURVEY SYSID'; 
var response = new SNC.AssessmentCreation().createAssessments(surveyID);

MIftikhar_1-1763569609881.png


This scheduled job will generate and send the survey invitations every quarter, bypassing the limitations of the Survey Definition's built-in scheduling options.

 

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.