The CreatorCon Call for Content is officially open! Get started here.

CSAT Score Calculation

alhicks
Tera Guru

Can someone please explain how the PA Indicators are calculating the OOB CSAT score?  The indicator script for Indicator ITSM normalized satisfaction score was a little confusing.

 

Formula Indicator:
ITSM Average Overall Customer Satisfaction
[[ITSM normalized satisfaction score]] / [[ITSM survey instances]]
 
Indicator Source 
ITSMDashboards.MetricResult.New   (metric result asmt_metric_result)
created on today
Aggregate: count distinct 
Field Instance
 
Indicator:
ITSM survey instances
Aggregate: Count Distinct
Field: Instance
Metric Category Type is customer satisfaction survey OR Service Central OR Service Desk and actual value not -1
 
Indicator:
ITSM normalized satisfaction score
Metric Category Type is customer satisfaction survey OR Service Central OR Service Desk and actual value not -1
Aggregate: Sum
Script on Fields: metric, normalized value 
var normalizedScore = function(metric, normalizedValue) {
var categoryGA  = new GlideAggregate('asmt_metric_category');
categoryGA.addAggregate('SUM', 'weight');
categoryGA.addQuery('metric_type', metric.category.metric_type);
categoryGA.setGroup(false);
categoryGA.query();
var totalWeight = (categoryGA.next()) ? Number(categoryGA.getAggregate('SUM', 'weight')) : 1;
var weight      = Number(metric.category.weight);
return (normalizedValue > 0) ? (normalizedValue * (weight / totalWeight)) : 0;
};
normalizedScore(current.metric, Number(current.normalized_value));
1 REPLY 1

Hiranmayee Moha
Tera Expert

@alhicks ...I do have same query.

Kindly help me out if u do have got any response for ur queries.

 

TIA