CSAT Survey not triggering properly

ersureshbe
Giga Sage
Giga Sage

Dear Experts,

I've implemented the CSAT for incident. The CSAT is triggering with the help of 'asmt_assessment_instance'. I've configured as when incident is Closed it should trigger the CSAT notification. The configuration is done in 'asmt_metric_type' table.But when incident is Closed state it's not sending to 'asmt_assessment_instance' table. 

Can you please clarify when 'asmt_assessment_instance' table gets a record creation and where I should check the configuration. Please advice.

 

Note: I tested the config in asmt_metric_type table. Based on the configuration it creates a new business rules.

Config Checks: The mentioned below checked and configured properly.

1. Enable the trigger condition in asmt_condition with the help of asmt_metric_type.
2. Survey should be 'Published' state.
3. Provide public access for the survey in asmt_metric_type
4. Enable 'Send Notification' as true in asmt_metric_type

Regards,

Suresh.

Regards,
Suresh.
11 REPLIES 11

Hi Suresh,

 

Since the Survey is trigged from Notification. Can you also check the Incident survey notification?

When to send condition is perfect.

Under What will it contain, check the script used are correct.

 

Regards,

Sunny Khandelwal

Hi Sunny,

Please find below email script used in notification template and script called in href link 

The record not created in asmt_assessment_instance table when the incident is closed state. Due to the reason - mail_script:asmtInstanceID shows an empty. Because of the reason, survey not listed to the end user.

self_service?id=take_survey&instance_id=${mail_script:asmtInstanceID}

 

find_real_file.png

 

Regards,

Suresh.

 

Regards,
Suresh.

Hi Suresh,

 

Can you try the below code:

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {

var assesGR = new GlideRecord("asmt_assessment_instance");
assesGR.addQuery("user", current.caller_id);
assesGR.addQuery("trigger_table", current.getTableName());
assesGR.addQuery("trigger_id", current.sys_id.toString());
assesGR.setLimit(1);
assesGR.query();
if (assesGR.next()) {
link = new AssessmentUtils().getAssessmentInstanceURL(assesGR.sys_id.toString());
var url = '<a href="' +link + '">' + 'Please click here to take Survey' + '</a>';
template.print(url);
}

//var link = gs.getProperty('glide.servlet.uri') + 'sp?id=take_survey&type_id=' + '75df84fd1bbae410aed455352a4bcbed';



})(current, template, email, email_action, event);

 

find_real_file.png

 

Regards,

Sunny Khandelwal

Hi Sunny,

Thanks for the update. The mentioned script shows once record created in asmt_assessment_instance table. but here the issue is the record not created in 'asmt_assessment_instance'. if this issue not resolved the mentioned script wont help to get the link in survey notification.

Please correct my understanding.

Regards,

Suresh.

Regards,
Suresh.

Hi Suresh,

 

Once the incident is closed, then a new record is created in "asmt_assessment_instance" table automatially.

 

Open any incident. Change the state to "CLosed".

Got the the table & check new entry for the same.

 

Regards,

Sunny