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.

Send Survey at Specific Time

Nic Omaha
Tera Guru

So I recently had the need to send a survey 14 days after a request item has closed. I have scoured the internet and there was no easy way to do this. I figured I would share my solution and if any one has a better solution I am all ears! 

 

I created a hidden field on the table called "u_trigger_survey". If your not comfortable adding fields you could probably find a OOB field you will never use like "Correlation ID". I then wrote a scheduled job to query the table daily and find any records that met my criteria ( request item is x and closed on 14 days ago) and changed u_trigger_survey to true. 

 

Then when creating the trigger for the survey I used this field to trigger the sending of the surveys. 

 

Hope this helps! 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Nic Omaha 

I think if the table is audited you can determine when the RITM got closed. But querying audit table will lead to performance issue as it's a huge table.

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

Im not querying the audit table but rather the table I want to send a survey on. The scheduled job uses the closed on field and if its 14 days in this case changes "u_send_survey" to true. There is no way that I have found to send a survey x days after trigger.