" /> NOT READY STATE CC PULSE - Genesys CTI User Forum

Author Topic: NOT READY STATE CC PULSE  (Read 4371 times)

Offline Ramen

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
NOT READY STATE CC PULSE
« on: October 10, 2014, 11:54:58 PM »
Advertisement
Team -

I need help in reflecting the current notready state in CC PULSE.

Here's the script I am using.

result.Text = CalculateReason();



function CalculateReason()

{
if (ccpulse.group("NotReadyTimes").statistic("Break")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Break")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Break (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Lunch")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Lunch")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Lunch) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("PeerCoaching")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("PeerCoaching")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(PeerCoaching) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("QualityAssurance")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("QualityAssurance")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(QualityAssurance) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Restroom")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Restroom")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Restroom)(" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SiteMeeting")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SiteMeeting")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SiteMeeting) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SpecialProject")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SpecialProject")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SpecialProject) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SupervisorCoaching")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SupervisorCoaching")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SupervisorCoaching) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SystemOutage")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SystemOutage")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SystemOutage) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("TeamMeeting")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("TeamMeeting")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(TeamMeeting) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Training")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Training ")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Training) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Union")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Union")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Union) (" + f + ")";
  }


return " "
}

however it is not reflecting the real notready state of the agent.

i am thinking becuase I used the total time in the pre defined statistics in  CC Pulse Templates, upon reading some posts here I saw someone posted that the current time should be used instead.


appreicate your help.

Thanks,
Ram

Offline Ramen

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: NOT READY STATE CC PULSE
« Reply #1 on: October 12, 2014, 07:49:17 PM »
Team,

Need your help :(


Thanks,
RAm

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: NOT READY STATE CC PULSE
« Reply #2 on: October 13, 2014, 12:43:25 PM »
What do you want to achieve? From your post is not clear.

Offline Ramen

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: NOT READY STATE CC PULSE
« Reply #3 on: October 21, 2014, 06:35:45 PM »
I am trying to display the notready reason for the current state but I am not able to achieve it.

Thanks,
Ram

Offline kbreboot

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: NOT READY STATE CC PULSE
« Reply #4 on: November 12, 2014, 06:22:51 AM »
Did you resolve your problem?

Offline dtissona

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: NOT READY STATE CC PULSE
« Reply #5 on: February 23, 2020, 07:16:13 AM »
[quote author=Ramen link=topic=8551.msg37636#msg37636 date=1412985298]
Team -

I need help in reflecting the current notready state in CC PULSE.

Here's the script I am using.

result.Text = CalculateReason();



function CalculateReason()

{
if (ccpulse.group("NotReadyTimes").statistic("Break")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Break")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Break (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Lunch")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Lunch")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Lunch) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("PeerCoaching")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("PeerCoaching")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(PeerCoaching) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("QualityAssurance")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("QualityAssurance")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(QualityAssurance) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Restroom")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Restroom")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Restroom)(" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SiteMeeting")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SiteMeeting")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SiteMeeting) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SpecialProject")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SpecialProject")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SpecialProject) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SupervisorCoaching")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SupervisorCoaching")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SupervisorCoaching) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("SystemOutage")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("SystemOutage")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(SystemOutage) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("TeamMeeting")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("TeamMeeting")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(TeamMeeting) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Training")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Training ")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Training) (" + f + ")";
  }
if (ccpulse.group("NotReadyTimes").statistic("Union")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("Union")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "NotReadyForNextCall(Union) (" + f + ")";
  }


return " "
}

however it is not reflecting the real notready state of the agent.

i am thinking becuase I used the total time in the pre defined statistics in  CC Pulse Templates, upon reading some posts here I saw someone posted that the current time should be used instead.


appreicate your help.

Thanks,
Ram
[/quote]


Greetings all,

I realize that this is an old thread, but still hoping someone can help. I'm trying to achieve the same thing with Pulse (not ccpulse). I need to display the duration in a each NotReadyForNextCall reason (custom reason codes for break). Currently, if agent is changing the status from one break status to another break status, I need the duration to reset on the display. I see that the above formula achieve this on ccpulse....

Any help will be appreciated.
Thanks.