PureConnect

 View Only
Discussion Thread View
  • 1.  ICWS Statistics Integration Issue/Problem

    Posted 05-18-2023 15:25

    Hi folks,   we have developed a C# based application that is designed to obtain Statistics from the ICWS API in a customer installation.

    Our problem is as follows: we are able to login , then we are able to access the Stats Catalog, we are able to add Workgroups and Intervals , and then use the /messaging/subscriptions/statistics/statistic-values   interface to create subscriptions to stats in the 4 workgroups....  However what is happening is that ICWS service is sending us (through the /messaging/messages interface) initially a small JSON response with a few stats and values, but then its growing and getting bigger and bigger. Until we start to get thousands of values back for the same 4 workgroups in one GIANT JSON .  We have added  a DELETE (subscriptions)  request to the code , and sending the same subscription list to the server to delete the subscriptions on the server - ICWS has no issue with this request it seems as we get no errors returned - we are sending this every time we create a new subscription (every 10 secs create subs, get the stats , delete subs)  , but we have no idea if it is working as it (DELETE) only returns 204 HTTP Header and no content.    It seems that its perhaps not working as the message repository is not being cleared - (Despite the ICWS DOCS stating :  DELETE    /icws/{sessionId}/messaging/subscriptions/statistics/statistic-values    Removes message subscription to statistic values.)  The damn payload coming from ICWS is well formed JSON but just becomes massive until it crashes our data base server with Zillions of write requests.
    We thought that perhaps we should be changing the code to only subscribe ONCE , which we then did , but what happened then was that we got ONE set of stats , and then the messaging/messages fell silent after that , nothing but crickets for minutes afterwards , even though we know that there is activity in the call center.
    Is there something that wasnt configured properly on ICWS ? is there some service that hasnt been started that is supposed to clear out the messages in the messaging pool ???
    We are at a loss to know what is going on - any help is appreciated


    #Integrations

    ------------------------------
    Simon Arnison
    Display5
    ------------------------------


  • 2.  RE: ICWS Statistics Integration Issue/Problem

    Posted 05-18-2023 15:55

    What version of CIC are you on?

    I'm doing something similar to make a wallboard (RIP Marquee) with Python and ICWS to run as a service that on startup registers our subscriptions then constantly loops retrieving messages.  I'm only polling stats for a single workgroup, but I haven't encountered this issue.  Is it possible that you're firing your subscription logic every time you're polling for messages?  I'm not certain how the API handles duplicate subscription requests.



    ------------------------------
    Aaron Lael
    State of Utah - comments on this forum reflect my own personal opinions\observations and are separate from any entity I am otherwise involved in.
    ------------------------------



  • 3.  RE: ICWS Statistics Integration Issue/Problem

    Posted 05-18-2023 16:04

    Aaron 
    Many thanks for replying , I will have to ask the client what CIC it is in the morning , not sure but they keep their system up to date.
    Yes we thought the same thing about the subscriptions , that ICWS was accumulating them, so we changed the code to only subscribe once, but after that we got one set of updates from messages and then nothing after that, we kept calling messages/messaging but there was no response just empty from then on. So then we switched to creating the subscriptions, getting the stats , then once retrieved sending a DELETE message to remove the subs , but regardless from that point onwards the responses from messages/messaging just got bigger and bigger.
    Did you need to configure any settings on the ICWS side ? like a service to remove messages ? after they are sent ? that seems to be our issue at the moment, it keeps accumulating on the server.



    ------------------------------
    Simon Arnison
    Display5
    ------------------------------



  • 4.  RE: ICWS Statistics Integration Issue/Problem

    Posted 05-18-2023 16:11

    I'm just using a get request on the messages endpoint with my sessionID to retrieve the messages.  According to the documentation for retrieving messages, polling should clear the message queue each time:

    Interaction Center Web Services (ICWS)


    I wonder if the version this customer is on has a bug where messages are not clearing when polled.

    As for removing subscriptions, I'm just using a delete request on the endpoint we subscribed to the stats on referencing the session ID.  I've tested polling again after the delete and nothing is present.



    ------------------------------
    Aaron Lael
    State of Utah - comments on this forum reflect my own personal opinions\observations and are separate from any entity I am otherwise involved in.
    ------------------------------



  • 5.  RE: ICWS Statistics Integration Issue/Problem

    Posted 06-02-2023 09:24

    Aaron - so after making little to no changes in our code, suddenly the CIC ICWS service is now clearing out old messages and we are now getting just the delta or updates. We are unclear as to what on earth changed  , but suddenly starting working properly !

    Customer has 4 Interval types (current Shift, Current Period, Previous Period, Period Shift) -- for the stats like Averages ,what would you suggest as the Interval ? I am assuming it will be Current but not sure which one....



    ------------------------------
    Simon Arnison
    Display5
    ------------------------------



  • 6.  RE: ICWS Statistics Integration Issue/Problem

    Posted 06-02-2023 09:33

    That's great to hear (and troubling), but sometimes gremlins do exist and just take time to uproot themselves in PureConnect.  Often reboots/switchovers "fix" things, too.

    As for the shift/period:  this depends on what you want to see and what is configured on the workgroups you're querying in the ACD > Statistics section of the workgroup.

    A period could be any amount of minutes as defined in Interaction Administrator (default of 30).  So current is the X minute segment you're in now and previous is the last one.  These are defined by the system starting at midnight.

    Shifts are also defined in the same spot but can be even weirder depending on how many shift starts are configured, but are generally the same principle but intended to be a longer duration of time, like if you have 4 x 8 shifts in a 24x7 operation, you may have 4 statistic shift start times you so you can see how you're doing in the current shift vs the last one.



    ------------------------------
    Aaron Lael
    State of Utah - comments on this forum reflect my own personal opinions\observations and are separate from any entity I am otherwise involved in.
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources