- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 03-28-2024 04:44 AM
Hi All,
In this article, let's explore one of the ways of setting up delay in the CSAT/Survey emails post the closure of a ticket.
Use Case:
End User confirms that the issue is resolved and closes the ticket, then a notification gets triggered for the CSAT and end user need to provide the feedback. They submit the feedback from the portal still they receive the email for the survey which they should not because they have already submitted it from the service portal. In this scenario, we can add a delay of 15-20 minutes so that we can check whether survey is already submitted or not, if not we will trigger the notification after 10-15 minutes.
Implementation Steps
1. Navigate to [sysevent_register] table and create a new event called delay.csat.survey.eng on the table [asmt_assessment_instance]
2. We will create a new business rule on the table 'Assessment Instance' [asmt_assessment_instance].
When to run: after insert, you can provide filter conditions as per your setup.
Example: 'Metric type.Evaluation' method 'is' 'Survey'
'Assigned to' 'is not empty'
'Trigger table' 'is' 'incident'
In the advance section, write the below code
(function executeRule(current, previous /*null when async*/ ) {
if (current.state == 'ready') {
var glideDelay = new GlideDateTime();
glideDelay.addSeconds(900);
gs.eventQueueScheduled("delay.csat.survey.eng", current, current.number, '', glideDelay);
}
})(current, previous);
For more details about eventQueueScheduled, follow Article
3. Now we will trigger our CSAT notification with an event called 'delay.csat.survey.eng'
Notification will be on the table [asmt_assessment_instance]
When to run > Send when --> Event is fired
Event name 'delay.csat.survey.eng'
Condition --> 'State' 'is not' 'complete'
Define 'who will receive' and 'what it will contain' as per your requirement.
That's it. The notification will now wait 900 seconds and check the user's response before sending the CSAT survey email.
If this helped you in any way, Please hit like or mark it as helpful. Thanks.
- 760 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful, thanks for sharing. Having a use case and step by step implementation-guide to understand the composition of the different functionalities is great!