Hi guys
I have a problem with CCP.
I want to show the reason for notready by agent and use “Formula”.
But sixth line always error,please help.
result.Text = GetUserData();
function GetUserData()
{
var r = “”;
r += state.Status;
for(var e = new Enumerator(state.CallData.Filter(“Key=AuxReason”)); !e.atEnd(); e.moveNext())
{ if (e.item().Key==‘AuxReason’)
data = e.item().Value;
}
return r;
}
Below is how I have the code setup for the formula stat, it’s an if/else statement. This will differ from how/where the stats are created, but it works for my organization and shows the Not Ready disposition that is in use at the current time.
if (ccpulse.group(“Current NR Status”).statistic(“Not Ready”) > 0) {“Not Ready”}
else if (ccpulse.group(“Current NR Status”).Break >0) {“Break”}
else if (ccpulse.group(“Current NR Status”).Chats >0) {“Chats”}
else if (ccpulse.group(“Current NR Status”).Lunch >0) {“Lunch”}
else if (ccpulse.group(“Current NR Status”).statistic(“Management Session”) >0) {“Management Session”}
else if (ccpulse.group(“Current NR Status”).Meeting >0) {“Meeting”}
else if (ccpulse.group(“Current NR Status”).Paperwork >0) {“Paperwork”}
else if (ccpulse.group(“Current NR Status”).Projects >0) {“Projects”}
else if (ccpulse.group(“Current NR Status”).statistic(“Team Meeting”) >0) {“Team Meeting”}
else if (ccpulse.group(“Current NR Status”).Training >0) {“Training”}
else if (ccpulse.group(“Current NR Status”).statistic(“Wrap-Up”) >0) {“Wrap-Up”}
else if (ccpulse.group(“Current NR Status”).statistic(“Wrap-Up Escalation”) >0) {“Wrap-Up Escalation”}
else if (ccpulse.group(“Current NR Status”).statistic(“Manual”) >0) {“Manual”}