<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>post Delay in CSAT/Survey Emails in Community Resources</title>
    <link>https://www.servicenow.com/community/community-resources/delay-in-csat-survey-emails/ta-p/2880526</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SN_Learn_0-1711623967634.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/343168iAAEA343328EDAD31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SN_Learn_0-1711623967634.png" alt="SN_Learn_0-1711623967634.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Use Case:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;End&amp;nbsp;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;Implementation Steps&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Navigate to [sysevent_register] table and create a new event called&amp;nbsp;&lt;SPAN&gt;delay.csat.survey.eng on the table&amp;nbsp;[asmt_assessment_instance]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. We will create a new business rule on the table '&lt;SPAN&gt;&lt;EM&gt;Assessment Instance&lt;/EM&gt;'&lt;/SPAN&gt; [&lt;SPAN&gt;&lt;EM&gt;asmt_assessment_instance&lt;/EM&gt;].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;When to run&lt;/STRONG&gt;: after insert, you can provide filter conditions as per your setup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example: 'Metric type.Evaluation' method 'is' 'Survey'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Assigned to' 'is not empty'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Trigger table' 'is' 'incident'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the &lt;EM&gt;&lt;STRONG&gt;advance&lt;/STRONG&gt;&lt;/EM&gt; section, write the below code&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(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);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details about eventQueueScheduled, follow &lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideSystemScopedAPI#r_SGSYS-eventQSched_S_O_S_S_O" target="_blank" rel="noopener"&gt;Article&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. Now we will trigger our CSAT notification with an event called 'delay.csat.survey.eng'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Notification &lt;/STRONG&gt;&lt;/EM&gt;will be on the table [asmt_assessment_instance]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;When to run&lt;/EM&gt; &amp;gt; Send when --&amp;gt; &lt;STRONG&gt;Event is fired&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Event name&lt;/EM&gt; '&lt;EM&gt;delay.csat.survey.eng&lt;/EM&gt;'&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Condition&lt;/EM&gt; --&amp;gt; 'State' 'is not' 'complete'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Define 'who will receive' and 'what it will contain' as per your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's it. The notification will now wait 900 seconds and check the user's response before sending the CSAT survey email.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If this helped you in any way, Please hit like or&amp;nbsp;mark it as&amp;nbsp;helpful. Thanks.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 11:44:22 GMT</pubDate>
    <dc:creator>SN_Learn</dc:creator>
    <dc:date>2024-03-28T11:44:22Z</dc:date>
    <item>
      <title>Delay in CSAT/Survey Emails</title>
      <link>https://www.servicenow.com/community/community-resources/delay-in-csat-survey-emails/ta-p/2880526</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SN_Learn_0-1711623967634.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/343168iAAEA343328EDAD31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SN_Learn_0-1711623967634.png" alt="SN_Learn_0-1711623967634.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Use Case:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;End&amp;nbsp;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;Implementation Steps&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Navigate to [sysevent_register] table and create a new event called&amp;nbsp;&lt;SPAN&gt;delay.csat.survey.eng on the table&amp;nbsp;[asmt_assessment_instance]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. We will create a new business rule on the table '&lt;SPAN&gt;&lt;EM&gt;Assessment Instance&lt;/EM&gt;'&lt;/SPAN&gt; [&lt;SPAN&gt;&lt;EM&gt;asmt_assessment_instance&lt;/EM&gt;].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;When to run&lt;/STRONG&gt;: after insert, you can provide filter conditions as per your setup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example: 'Metric type.Evaluation' method 'is' 'Survey'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Assigned to' 'is not empty'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Trigger table' 'is' 'incident'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the &lt;EM&gt;&lt;STRONG&gt;advance&lt;/STRONG&gt;&lt;/EM&gt; section, write the below code&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(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);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details about eventQueueScheduled, follow &lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideSystemScopedAPI#r_SGSYS-eventQSched_S_O_S_S_O" target="_blank" rel="noopener"&gt;Article&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. Now we will trigger our CSAT notification with an event called 'delay.csat.survey.eng'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Notification &lt;/STRONG&gt;&lt;/EM&gt;will be on the table [asmt_assessment_instance]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;When to run&lt;/EM&gt; &amp;gt; Send when --&amp;gt; &lt;STRONG&gt;Event is fired&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Event name&lt;/EM&gt; '&lt;EM&gt;delay.csat.survey.eng&lt;/EM&gt;'&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Condition&lt;/EM&gt; --&amp;gt; 'State' 'is not' 'complete'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Define 'who will receive' and 'what it will contain' as per your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's it. The notification will now wait 900 seconds and check the user's response before sending the CSAT survey email.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If this helped you in any way, Please hit like or&amp;nbsp;mark it as&amp;nbsp;helpful. Thanks.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 11:44:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-resources/delay-in-csat-survey-emails/ta-p/2880526</guid>
      <dc:creator>SN_Learn</dc:creator>
      <dc:date>2024-03-28T11:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Delay in CSAT/Survey Emails</title>
      <link>https://www.servicenow.com/community/community-resources/delay-in-csat-survey-emails/tac-p/2884483#M498</link>
      <description>&lt;P&gt;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!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 09:48:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-resources/delay-in-csat-survey-emails/tac-p/2884483#M498</guid>
      <dc:creator>Kebabdressing</dc:creator>
      <dc:date>2024-04-02T09:48:53Z</dc:date>
    </item>
  </channel>
</rss>

