" /> CCPulse VB Code - Genesys CTI User Forum

Author Topic: CCPulse VB Code  (Read 13940 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Mark L

  • Guest
CCPulse VB Code
« on: June 25, 2008, 03:00:51 PM »
Advertisement
Hi,

I need a smple code for displaying the reason why someone is in NR.

I know I have KVP's of Lunch = PairExists("ReasonCode","02") for example and these are correct and setup as Filters.

What I want to do is now display the actual reason when someone selects it, so 1 column that will change the reason based on the code entered by the agent. I have already created timed stats based on various reasons, but cannot seem to get my head round displaying text based on the KVP entered.

Thanks

Mark

Offline pdavid

  • Jr. Member
  • **
  • Posts: 70
  • Karma: 1
Re: CCPulse VB Code
« Reply #1 on: June 26, 2008, 08:08:26 PM »
You mean like this.

Mark L

  • Guest
Re: CCPulse VB Code
« Reply #2 on: June 27, 2008, 08:51:39 AM »
Hi,

Yes, I mean exactly like that.... What am I missing, I'm sure this is straight forward??


Marked as best answer by on Today at 11:17:41 PM

Offline pdavid

  • Jr. Member
  • **
  • Posts: 70
  • Karma: 1
Re: CCPulse VB Code
« Reply #3 on: June 27, 2008, 03:00:14 PM »
  • Undo Best Answer
  • That's obviously a formula stat, but below please find the formula, pretty messy hope you can read through it let me know...

    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").statistic("CE Book Reports") >0) {"CE Book Reports"}

    else if (ccpulse.group("Current NR Status").statistic("CE New Enrollments") >0) {"CE New Enrollments"}

    else if (ccpulse.group("Current NR Status").statistic("CE Verification Letters") >0) {"CE Verification Letters"}

    else if (ccpulse.group("Current NR Status").statistic("CE Welcome Calls") >0) {"CE Welcome Calls"}

    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("QA Meeting") >0) {"QA Meeting"}

    else if (ccpulse.group("Current NR Status").statistic("QA Monitoring") >0) {"QA Monitoring"}

    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"}

    Mark L

    • Guest
    Re: CCPulse VB Code
    « Reply #4 on: June 27, 2008, 03:08:11 PM »
    Hi,

    Yeah, knew it was formula stuff, Just couldn't get my head round the syntax I needed. Looks like you almost have as many reason codes as us. Ill give it a go but looks exactly what I needed.

    Thanks for that!!


    LoneTek

    • Guest
    Re: CCPulse VB Code - Reason Codes
    « Reply #5 on: March 18, 2009, 07:19:21 AM »
    Hi,

    I too am a new user to genesys and ccpulse and want exactly the same thing as the original poster, but when trying to modify my existing template and adding the above code, i keep on getting a syntax error......what am I missing??

    I am assuming it something to do with .statistic string or lack off.

    Offline SamiH

    • Newbie
    • *
    • Posts: 2
    • Karma: 0
    Re: CCPulse VB Code
    « Reply #6 on: March 19, 2009, 11:01:23 AM »
    Hi,

    the statistics names in your formula must match the statistics you are using in your template.

    See the attached example image and compare it to the code below. Stat names are in Finnish but you should get the idea :)

    if (ccpulse.group("Syyajat").statistic("Jälkityö") > 0) {"Jälkityö"}
    else if (ccpulse.group("Syyajat").statistic("Ruokailu") > 0) {"Ruokailu"}
    else if (ccpulse.group("Syyajat").statistic("Koulutus") > 0) {"Koulutus"}
    else if (ccpulse.group("Syyajat").statistic("Palaverit") > 0) {"Palaverit"}
    else if (ccpulse.group("Syyajat").statistic("Oma tauko") > 0) {"Oma tauko"}
    else {" "}

    lonetek

    • Guest
    Re: CCPulse VB Code
    « Reply #7 on: March 20, 2009, 04:16:04 AM »
    Thanks for the heads up on the formula stuff.....training on genesys happened almost 12months ago and implementation happened only recently and had forgotten a lot of stuff!

    I am now almost 95% the way there with getting the template to display as required - the last issue i am having is that even though an agent may be on a call inbound, the NR reason column is still showing break, lunch, acw etc etc

    I get that the last line of the code below should be making the nr reason column go blank, but is not happening - am i missing something else??

    if (ccpulse.group("Syyajat").statistic("Jälkityö") > 0) {"Jälkityö"}
    else if (ccpulse.group("Syyajat").statistic("Ruokailu") > 0) {"Ruokailu"}
    else if (ccpulse.group("Syyajat").statistic("Koulutus") > 0) {"Koulutus"}
    else if (ccpulse.group("Syyajat").statistic("Palaverit") > 0) {"Palaverit"}
    else if (ccpulse.group("Syyajat").statistic("Oma tauko") > 0) {"Oma tauko"}
    else {" "}

    if (ccpulse.group("Withdrawn").statistic("Break")>0) {"Break"}
    else if (ccpulse.group("withdrawn").statistic("Training")>0) {"Training"}
    else if (ccpulse.group("withdrawn").statistic("Meeting")>0) {"Meeting"}
    else if (ccpulse.group("withdrawn").statistic("Lunch")>0) {"Lunch"}
    else if (ccpulse.group("withdrawn").statistic("Outbound")>0) {"Outbound"}
    else if (ccpulse.group("withdrawn").statistic("Admin")>0) {"Admin"}
    else if (ccpulse.group("withdrawn").statistic("ACW")>0) {"ACW"}
    else {" "}


    Thanks in advance!

    Offline SamiH

    • Newbie
    • *
    • Posts: 2
    • Karma: 0
    Re: CCPulse VB Code
    « Reply #8 on: March 23, 2009, 02:24:22 PM »
    Does the situation get corrected when you click Peek Statistic -button?

    If it does, check your Notification Frequency on statistics Break, Training, Meeting etc. I got the same situation as you mentioned, when I gave the frequency a long value. In production I'm using time based notification mode with a notification frequency of 10.

    If it doesn't, I'm puzzled. Just to make sure I'll put here statistic and filter information I use on StatServer.

    statistic CurrNRreason
    Category = CurrentTime
    MainMask = NotReadyForNextCall
    Objects = Agent, Place
    Subject = AgentStatus

    in Filters
    Ruokailu = PairExist("SyyKoodi", "03")
    Koulutus = PairExist("SyyKoodi", "04")
    Palaveri = PairExist("SyyKoodi", "05")
    ..and so on for each reason code

    Offline Kart0

    • Newbie
    • *
    • Posts: 4
    • Karma: 0
    Re: CCPulse VB Code
    « Reply #9 on: April 16, 2009, 01:47:01 PM »
    Hi all,

    We have ours set up to show agent status column (depicting not ready time) and then the next column set exactly the same as these prev posts showing the reason for NR. My question is if someone moves from NR Break to NR Personal the agent status colum just shows a running time total of the two NR states (So the agent gets a talking to thinking they have been in NR personal for 33 mins, when really 15 was NR Break then they went straight into NR Personal for 18 mins).

    Does anyone know how we can apply a formula/threshold to make the agent status field reset after each change of NR state?

    Much obliged!!!!

    Offline Kart0

    • Newbie
    • *
    • Posts: 4
    • Karma: 0
    Re: CCPulse VB Code
    « Reply #10 on: May 08, 2009, 12:17:05 PM »
    bump  :-X Any ideas anyone?

    Offline S

    • Full Member
    • ***
    • Posts: 135
    • Karma: 1
    Re: CCPulse VB Code
    « Reply #11 on: May 11, 2009, 05:36:03 PM »

    this FORMULA WORKS GREAT

    if(ccpulse.group("Agent State").CurrentNotReadyReason == 1)
    result.text = "Training"
    else { if (ccpulse.group("Agent State").CurrentNotReadyReason ==2)
    result.text = "Aux2"
    else { if (ccpulse.group("Agent State").CurrentNotReadyReason == 3 )
    result.text = "Meeting"
    else { if (ccpulse.group("Agent State").statistic("CurrentAgentState 1")  != 8 & ccpulse.group("Agent State").CurrentNotReadyReason == 0)
    result.text = ""
    else  result.text= "Aux0"
    }}}

    Lukas

    • Guest
    Re: CCPulse VB Code
    « Reply #12 on: May 27, 2009, 11:14:55 AM »
    Hello,

    I have one question. How you get CurrentNotReadyReason into your statistic? If I looked into your printscreen, it is time based stat, isn't it?

    I still have a problem to get on-line statistic where I will see how long is agent in NR and what is NR reason. Actualy it is working, but when agent status is changed, NR reason remaint the same. Could you please help?