Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Andrey Tyurin
    3rd party chat queue problem
    Topic posted February 4, 2016 by Andrey TyurinGreen Ribbon: 100+ Points 
    105 Views, 4 Comments
    Title:
    3rd party chat queue problem
    Content:

    Hi all,

    There is a problem with chat queue events. Sometimes, they do not come in realtime, i.e. when new chat is created in web, no events arrive to uq.retreiveMessages. After sometime, they all arrive at the same time. Log example is as follows:

     

    2016-02-04 05:36:43 content [DEBUG] << "<ns2:RetrieveMessagesResponse xmlns="urn:messages.common.chat.ws.rightnow.com/v1_1" xmlns:ns2="urn:messages.uq.chat.ws.rightnow.com/v1_1" xmlns:ns3="urn:faults.chat.ws.rightnow.com/v1_1"><ns2:TransactionResponseData><ns2:Timestamp>2016-02-04T13:36:43.071Z</ns2:Timestamp><ns2:TransactionID>14</ns2:TransactionID><ns2:TransactionResult>true</ns2:TransactionResult><ns2:ResultCode>SUCCESS</ns2:ResultCode></ns2:TransactionResponseData><ns2:SystemMessages><ns2:RNChatRemovedMessage><ns2:ChatID id="1542"/><ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason><ns2:RetainChat>false</ns2:RetainChat><ns2:SequenceNumber>7164</ns2:SequenceNumber></ns2:RNChatRemovedMessage><ns2:RNChatQueuedMessage><ns2:ChatID id="1543"/><ns2:FirstName>iiiiiiiiiiiiiiiii</ns2:FirstName><ns2:LastName>oooooooooooo</ns2:LastName><ns2:EMailAddress>iiiii@ooooo.ppp</ns2:EMailAddress><ns2:InterfaceID><ID id="1"/><Name>***</Name></ns2:InterfaceID><ns2:ContactID id="-1"/><ns2:OrganizationID id="0"/><ns2:Question>iiiiiiooooooo</ns2:Question><ns2:CategoryID id="120"/><ns2:Source>END_USER</ns2:Source><ns2:QueueId>7</ns2:QueueId><ns2:SequenceNumber>7165</ns2:SequenceNumber></ns2:RNChatQueuedMessage><ns2:RNChatRemovedMessage><ns2:ChatID id="1543"/><ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason><ns2:RetainChat>false</ns2:RetainChat><ns2:SequenceNumber>7166</ns2:SequenceNumber></ns2:RNChatRemovedMessage><ns2:RNChatQueuedMessage><ns2:ChatID id="1544"
    2016-02-04 05:36:43 StAXOMBuilder [TRACE]   QName: {urn:messages.uq.chat.ws.rightnow.com/v1_1}RetrieveMessagesResponse
    2016-02-04 05:36:43 StAXSOAPModelBuilder [DEBUG] Build the OMElement RetrieveMessagesResponse by the StaxSOAPModelBuilder
    2016-02-04 05:36:43 content [DEBUG] << ""/><ns2:FirstName>iiiiiiiiiiiiiiiii</ns2:FirstName><ns2:LastName>oooooooooooo</ns2:LastName><ns2:EMailAddress>iiiii@ooooo.ppp</ns2:EMailAddress><ns2:InterfaceID><ID id="1"/><Name>***</Name></ns2:InterfaceID><ns2:ContactID id="-1"/><ns2:OrganizationID id="0"/><ns2:Question>iiiiiiooooooo</ns2:Question><ns2:CategoryID id="120"/><ns2:Source>END_USER</ns2:Source><ns2:QueueId>7</ns2:QueueId><ns2:SequenceNumber>7167</ns2:SequenceNumber></ns2:RNChatQueuedMessage><ns2:RNChatRemovedMessage><ns2:ChatID id="1544"/><ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason><ns2:RetainChat>false</ns2:RetainChat><ns2:SequenceNumber>7168</ns2:SequenceNumber></ns2:RNChatRemovedMessage></ns2:SystemMessages></ns2:RetrieveMessagesResponse></S:Body></S:Envelope>"

     

    Is this a bug in Rightnow or I missed something?

    Messages are get as follows:

    rn_uqService.retrieveMessages(transRequest, startingSequenceNumber, requestHeader )

     

    Comment

     

    • Scott Harwell

      How often are you polling the chat server?  Based on the behavior that you describe, you likely have a bit of a delay in your polling.  Say you poll every 30 seconds, and a chat comes in 1 second after the previous poll, then the chat won't be visible to your code until 29 seconds later.  Say chat 2 comes in 10 seconds after chat 1.  Then they would both appear when your next poll occurs 19 seconds after chat 2 arrives.

      That seems like the most likely cause of the problem that you outline.

    • Andrey Tyurin

      Scott,

      We poll the server permanently, that func returns exception if there is no messages for 30 secs, so, I call it again.

      This problem happens intermittently, not every time. It is floating. Do you know how I can collect server logs to see what happens there?

       

      Andrey

    • Scott Harwell

      I'm actually not sure if the chat server logs are exposed outside of Oracle.  A quick check in the console log section, chat_rt tables, and OOTB reports doesn't yield any obvious insights into the logs.  Perhaps those errors exist in the error logs in the agent console; though I doubt it since the docs mention the chat servers.

      What is the error that is returned, specifically?  Is the SOAP body that you have provided meant to illustrate that?  It doesn’t look like the full envelop is there.  Also, I assume that you cancelled the chats prior to the poll, which is what your cancellation reason is in the message?

      And, what happens intermittently; the error or the behavior where a chat may come in during a certain poll but not show up until a subsequent poll?  How are you testing the two independent chats to see if they come in simultaneously or not?  Could it be that your UQ agents are all busy at the time that the issue is experienced?

    • Andrey Tyurin
      Scott,
      Actually, there is no any error. The problem is related to the delayed messages and it happens from time to time. Example,
      app: retrieveMessages, no messages
      user: create new chat
      app: retrieveMessages, new chat message is extracted
      user: closes chat
      app: retrieveMessages, no messages    <- why? there should be terminate message
      user: create new chat
      app: retrieveMessages, no messages    <- why? there should be new chat message
      user: closes chat
      app: retrieveMessages, no messages    <- why? there should be terminate message
      user: create new chat
      app: retrieveMessages, no messages    <- why? there should be new chat message
      user: closes chat
      app: retrieveMessages, got 5 messages: RNChatRemovedMessage, RNChatQueuedMessage, RNChatRemovedMessage, RNChatQueuedMessage, RNChatRemovedMessage
       
      Note, chat ids and SequenceNumber are right.
       
      I've formated the envelope:
      <ns2:RetrieveMessagesResponse
          xmlns="urn:messages.common.chat.ws.rightnow.com/v1_1"
          xmlns:ns2="urn:messages.uq.chat.ws.rightnow.com/v1_1"
          xmlns:ns3="urn:faults.chat.ws.rightnow.com/v1_1">
          <ns2:TransactionResponseData>
              <ns2:Timestamp>2016-02-04T13:36:43.071Z</ns2:Timestamp>
              <ns2:TransactionID>14</ns2:TransactionID>
              <ns2:TransactionResult>true</ns2:TransactionResult>
              <ns2:ResultCode>SUCCESS</ns2:ResultCode>
          </ns2:TransactionResponseData>
          <ns2:SystemMessages>
              <ns2:RNChatRemovedMessage>
                  <ns2:ChatID id="1542"/>
                  <ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason>
                  <ns2:RetainChat>false</ns2:RetainChat>
                  <ns2:SequenceNumber>7164</ns2:SequenceNumber>
              </ns2:RNChatRemovedMessage>
              <ns2:RNChatQueuedMessage>
                  <ns2:ChatID id="1543"/>
                  <ns2:FirstName>iiiiiiiiiiiiiiiii</ns2:FirstName>
                  <ns2:LastName>oooooooooooo</ns2:LastName>
                  <ns2:EMailAddress>iiiii@ooooo.ppp</ns2:EMailAddress>
                  <ns2:InterfaceID>
                      <ID id="1"/>
                      <Name>***</Name>
                  </ns2:InterfaceID>
                  <ns2:ContactID id="-1"/>
                  <ns2:OrganizationID id="0"/>
                  <ns2:Question>iiiiiiooooooo</ns2:Question>
                  <ns2:CategoryID id="120"/>
                  <ns2:Source>END_USER</ns2:Source>
                  <ns2:QueueId>7</ns2:QueueId>
                  <ns2:SequenceNumber>7165</ns2:SequenceNumber>
              </ns2:RNChatQueuedMessage>
              <ns2:RNChatRemovedMessage>
                  <ns2:ChatID id="1543"/>
                  <ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason>
                  <ns2:RetainChat>false</ns2:RetainChat>
                  <ns2:SequenceNumber>7166</ns2:SequenceNumber>
              </ns2:RNChatRemovedMessage>
              <ns2:RNChatQueuedMessage>
                  <ns2:ChatID id="1544"/>
                  <ns2:FirstName>iiiiiiiiiiiiiiiii</ns2:FirstName>
                  <ns2:LastName>oooooooooooo</ns2:LastName>
                  <ns2:EMailAddress>iiiii@ooooo.ppp</ns2:EMailAddress>
                  <ns2:InterfaceID>
                      <ID id="1"/>
                      <Name>***</Name>
                  </ns2:InterfaceID>
                  <ns2:ContactID id="-1"/>
                  <ns2:OrganizationID id="0"/>
                  <ns2:Question>iiiiiiooooooo</ns2:Question>
                  <ns2:CategoryID id="120"/>
                  <ns2:Source>END_USER</ns2:Source>
                  <ns2:QueueId>7</ns2:QueueId>
                  <ns2:SequenceNumber>7167</ns2:SequenceNumber>
              </ns2:RNChatQueuedMessage>
              <ns2:RNChatRemovedMessage>
                  <ns2:ChatID id="1544"/>
                  <ns2:CancelReason>ABANDONED_BY_END_USER</ns2:CancelReason>
                  <ns2:RetainChat>false</ns2:RetainChat>
                  <ns2:SequenceNumber>7168</ns2:SequenceNumber>
              </ns2:RNChatRemovedMessage>
          </ns2:SystemMessages>
      </ns2:RetrieveMessagesResponse>undefined</S:Body>undefined</S:Envelope>
       
      Andrey