need help to optimze glideagrregate script for survey trigger

suryakalam
Tera Contributor

i want to trigger a customer satisfaction servey to every 5th incident caller,when every 5th softwre category incident get resolved,

1 ACCEPTED SOLUTION

Matthew_13
Mega Sage

Hi My Friend,

Yep — thats doable, and your right to be thinking about performance.

If the requirement is send a CSAT survey for ~every 5th resolved Software incident dont use a GlideAggregate(count) on the Incident table at resolve-time. That’s heavy and it can also misfire when multiple incidents resolve at once.

What most people do and I have done instead is a 1-in-5 selection that doesnt require counting at all fast + consistent. You only evaluate it when the ticket transitions to Resolved and if its a “hit,” you trigger the survey.

If you literally need the exact 5th / 10th / 15th in sequence, you’ll want a small counter record not an aggregate on incidents otherwise you’ll run into performance + race conditions.

 

@suryakalam - If help you answer; Please mark Solution Accepted and Thumbs Up

MJG

View solution in original post

7 REPLIES 7

Tanushree Maiti
Tera Patron

Hi @suryakalam 

 

Please refer this links, see if it helps you:

Solved: Survey Frequency - Sent out when every 5th item is... - ServiceNow Community

Configure a trigger condition for a survey • Zurich ServiceNow AI Platform Capabilities • Docs | Ser...

Send survey after every 5 closed incident? - ServiceNow Community

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Ankur Bawiskar
Tera Patron

@suryakalam 

unless you share what you tried and where are you stuck, how we would know what's not working.

share those details

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

miftikhar20
Kilo Patron

Hi @suryakalam ,

 

Please see the following community discussion, its similar to your requirement:

Solved: Survey Frequency - Sent out when every 5th item is… - ServiceNow Community

 

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.