Survey : Capture feedback via email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 10:51 PM - edited 05-18-2023 11:21 PM
Hi ,
We have embedded a smiley in email for feedback which is being triggered as a notification, similar to this.
On clicking on any smiley email would be sent to the ServiceNow instance with rating and feedback (Option text) in the body.
var gt = new GlideRecord('asmt_metric_result');
gt.initialize();
gt.instance = current.sys_id;
gt.source_id = source;
// gt.normalized_value = nv;
// gt.actual_value = resp;
// gt.string_value = resText;
gt.setValue('string_value',resText);
gt.setValue('actual_value', resp);
gt.setValue('normalized_value', nv);
gt.datatype = dataType;
gt.metric.datatype = dataType;
gt.metric.method= 'assessment';
gt.assessment_group = current.assessment_group;
gt.user = current.user;
gt.taken_on = gdt.getDisplayValue();
gt.metric.category = current.metric_type;
gt.metric = metric;
//gt.setWorkflow(false);
gs.info("SRI SURVEY Source = " + source + ", actual_value = " + resp + ", string_value = " + resText + ", normalized_value = " + nv + ", metric = " + metric + " ,dataType = " + dataType + " USer = " + current.user + " UserID. = " + gru.user_name + " TIME = " + gdt + " metDef === " + metDef);
var id = gt.insert();
Inbound action is written to read the body and insert into metric_result table, but it always the results (actual values) are stored as "-1". In the logs the actual values are correctly logged.
Any help on this would be much appreciated.
Thanks
Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2023 02:41 AM
Hi @srivatsa_tatti ,
I believe there is an issue in your inbound email action or in the notification mail script which you are using to send the survey notification.
Please find the below community article, the excel which is there in the article as an attachment will give you all the scripts and the detailed process.
Please mark my answer as helpful and accept it as a solution, if it helps you!!