Integration with UCCX via Post Chat feeds

Version 1
    This document was generated from CDN thread

    Created by: Mirko Puliafito on 30-07-2012 11:30:16 AM
    Hi,
     
    I have a UCCX v. 9.0 integrated with Social Miner. I created a Chat feed, campaign and a chat form for that. If I use that form with the standard "Cisco Chat" reply template everything is working properly. 
    If I try, following dev doc, to create a feed using rest API as following:
     

    POST to http://cms9.default/chatproxy/api/chat
     
    <SocialContact>
    <feedRefURL>http://cms9.default/ccp-webapp/ccp/feed/100002</feedRefURL>
    <author>Test_author</author>
    <title>Social contact title</title>
    <extensionField_ccxqueuetag>Chat_Csq1</<extensionField_ccxqueuetag>
    </SocialContact>

     
    I can see the feed on campaign but the notification is not passed to UCCX. Is there something I miss?
     
    Can anybody help me out?
     
    Thanks and regards,
     
    Mirko

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Mirko Puliafito on 30-07-2012 12:03:01 PM
    I succeded in creating a uccx task using:

    <SocialContact>
    <feedRefURL>http://cms9.default/ccp-webapp/ccp/feed/100002</feedRefURL>
    <author>Test_author</author>
    <title>Social contact title</title>
    <extensionFields>
    <extensionField>
    <name>ccxqueuetag</name>
    <value>Chat_Csq1</value>
    </extensionField>
    </extensionFields>
    </SocialContact>


    where Chat_Csq1 is my queue.

    Now, I got all the info about the task via:

    GET to http://cms9.default/ccp-webapp/ccp/socialcontact/C91A0D7910000138000000C03F57FFC8

    and I get that chatroom is "socialminer_chat.35@conference.127.0.0.1". Agent is correctly in the conference room.

    on webchat side which user may I use to access xmpp and the conference room? Which Password?


    Thanks

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Amy Nordberg on 30-07-2012 05:20:24 PM
    Hi Mirko -
    We're glad to see you figured out the initial issue with the XML.  We're not quite sure we understand your more recent question though.
     
    It appears that you are simulating sending a chat social contact into SocialMiner, but without an XMPP client for the customer.  Because the customer usually joins the chatroom as soon as it is created, please be aware that the chat may be immediately discarded by the system with the reason that the customer never joined.  You can use any XMPP client to connect to the chatroom using the SocialMiner administrator (or any Active Directory) user name and password, but you would have to be pretty quick to connect to avoid the timeout.
     
    Does that help or are we misunderstanding your question?
     
    Amy Nordberg (on behalf of the SocialMiner team)
     
     
    I succeded in creating a uccx task using:

    <SocialContact>
    <feedRefURL>http://cms9.default/ccp-webapp/ccp/feed/100002</feedRefURL>
    <author>Test_author</author>
    <title>Social contact title</title>
    <extensionFields>
    <extensionField>
    <name>ccxqueuetag</name>
    <value>Chat_Csq1</value>
    </extensionField>
    </extensionFields>
    </SocialContact>


    where Chat_Csq1 is my queue.

    Now, I got all the info about the task via:

    GET to http://cms9.default/ccp-webapp/ccp/socialcontact/C91A0D7910000138000000C03F57FFC8

    and I get that chatroom is "socialminer_chat.35@conference.127.0.0.1". Agent is correctly in the conference room.

    on webchat side which user may I use to access xmpp and the conference room? Which Password?


    Thanks


    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Mirko Puliafito on 31-07-2012 03:32:06 AM
    Hi Amy,
     
    I don't see what you're saying. I want to replace the customer webchat UI with a customized one. So what I'm doing is generating a chat feed request via REST API (done and success) and after that accessing xmpp (with jabberwerx or xmpp client) and start chatting with the agent selected. The question is: which is the customer side xmpp user I can use to log in to xmpp(in my mind it should be a virtual user) to access the room. On dev doc page 25 it's said that on feed info I could find user Jabber ID's. What is this about? I tried to access xmpp server with the "administrator" account and join the room after creating the feed and everything works properly. So I think I only miss a little piece.
    I also want to report a couple of strange behaviours. I tried to delete a running chat as reported on page 27 dev doc. So I tried with:
     
    DELETE http://csm9.default/chatproxy/api/chat/DBE8F92310000138000002363F57FFC8 
     
    where DBE8F92310000138000002363F57FFC8  is a valid chat feed id. The request I get is:





    <pre><ol class="linenums"><li>Status Code: 405 Method Not Allowed</li><li>Allow: POST,GET,OPTIONS,HEAD</li><li>Content-Length: 2266</li><li>Content-Type: text/html;charset=utf-8</li><li>Date: Tue, 31 Jul 2012 07:22:07 GMT</li></ol></pre>

           




    Second one: when trying to get info on a chat feed, sending GET as on page 27:
     
    GET http://csm9.default/chatproxy/api/chat?eventId=0&all=false
     
    If I spell eventId with capital letter "I" I get:
     

    <pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
        <apiError>
            <errorData>eventid</errorData>
            <errorMessage>must be greater than zero. Eventid was -1: session: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
            <errorType>invalidInput</errorType>
        </apiError>
    </apiErrors></pre>
    <pre style="margin-left: 0px;">
    </pre>
    <pre style="margin-left: 0px;">If I spell it with lower "i",</pre>
    <pre style="margin-left: 0px;">GET http://csm9.default/chatproxy/api/chat?eventid=0&all=false</pre>
    <pre style="margin-left: 0px;">I get:  </pre>
    <pre style="margin-left: 0px;"><pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
        <apiError>
            <errorMessage>no user found for the current session id: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
            <errorType>notFound</errorType>
        </apiError>
    </apiErrors>
    </pre>


    Can you explain why?


    Thanks and regards,


    Mirko

    </pre>
    <pre style="margin-left: 0px;">
    </pre>

     
    Hi Mirko -
    We're glad to see you figured out the initial issue with the XML.  We're not quite sure we understand your more recent question though.
     
    It appears that you are simulating sending a chat social contact into SocialMiner, but without an XMPP client for the customer.  Because the customer usually joins the chatroom as soon as it is created, please be aware that the chat may be immediately discarded by the system with the reason that the customer never joined.  You can use any XMPP client to connect to the chatroom using the SocialMiner administrator (or any Active Directory) user name and password, but you would have to be pretty quick to connect to avoid the timeout.
     
    Does that help or are we misunderstanding your question?
     
    Amy Nordberg (on behalf of the SocialMiner team)
     


    I succeded in creating a uccx task using:

    <SocialContact>
    <feedRefURL>http://cms9.default/ccp-webapp/ccp/feed/100002</feedRefURL>
    <author>Test_author</author>
    <title>Social contact title</title>
    <extensionFields>
    <extensionField>
    <name>ccxqueuetag</name>
    <value>Chat_Csq1</value>
    </extensionField>
    </extensionFields>
    </SocialContact>


    where Chat_Csq1 is my queue.

    Now, I got all the info about the task via:

    GET to http://cms9.default/ccp-webapp/ccp/socialcontact/C91A0D7910000138000000C03F57FFC8

    and I get that chatroom is "socialminer_chat.35@conference.127.0.0.1". Agent is correctly in the conference room.

    on webchat side which user may I use to access xmpp and the conference room? Which Password?


    Thanks



    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: John Russell on 31-07-2012 10:42:05 AM
    The problem here is that the customer side of the chat is not a direct connection to the XMPP server.  Because customers are joining the chat from a browser outside the firewall all customer chat traffic is proxied through the SocialMiner API.  
     
    The general flow starts with what you did, POSTing a social contact to the chat API.  This creates the chat room where the agent can join directly.  Unlike the other REST APIs where you are returned a specific refURL identifying the resource created, the customer chat is accessed through the base chatproxy/api/chat API. Because there is no identifier for which chat we are getting events for, API calls only work with a valid session cookie. The session cookie returned from the POST or GET should be provided on subsequent chat proxy API calls.
     
    This is why the DELETE below failed.  You should send the DELETE to chatproxy/api/chat directly with your session cookie and that will remove the chat room associated with that session.  
     
    The customer chat events are accessed by calling GET as you did, but again, with the session cookie.  That's what identifies the customer to the API.  
     
    Also, you are absolutely right, there is an error in the docs.  The "eventid" parameter does _not_ have a capital I. It must be "eventid" with the lower case I.  
     
    I think that answers all of the questions but I'll comment in line as well.
     
    I want to replace the customer webchat UI with a customized one. So what I'm doing is generating a chat feed request via REST API (done and success) and after that accessing xmpp (with jabberwerx or xmpp client) and start chatting with the agent selected. The question is: which is the customer side xmpp user I can use to log in to xmpp(in my mind it should be a virtual user) to access the room.
     
    On dev doc page 25 it's said that on feed info I could find user Jabber ID's. What is this about? I tried to access xmpp server with the "administrator" account and join the room after creating the feed and everything works properly. So I think I only miss a little piece.


     
    You can absolutely create a new chat UI, but you can't go directly to the XMPP server for the customer side of the chat.   The customer side of the chat is only accessible through the chatproxy/api/chat API with the sesion cookie you got when you POSTed to create the chat originally.  You don't need to worry about jabber ids or anything on the customer side. 




    I also want to report a couple of strange behaviours. I tried to delete a running chat as reported on page 27 dev doc. So I tried with:
     
    DELETE http://csm9.default/chatproxy/api/chat/DBE8F92310000138000002363F57FFC8 
     
    where DBE8F92310000138000002363F57FFC8  is a valid chat feed id. The request I get is:


    <pre><ol class="linenums"><li>Status Code: 405 Method Not Allowed</li><li>Allow: POST,GET,OPTIONS,HEAD</li><li>Content-Length: 2266</li><li>Content-Type: text/html;charset=utf-8</li><li>Date: Tue, 31 Jul 2012 07:22:07 GMT</li></ol></pre>


    This is what I mentioned above where you just DELETE directly to chatproxy/api/chat with the session cookie.  This is not as pure REST as the rest of our APIs but as this is a public customer facing API, if we simply went by a full refURL than anyone else that knew that url could join the chat.  So the customer side of the chat dependson sessions created and maintained by the browser (or other client, but it has to deal with session cookies). 



    Second one: when trying to get info on a chat feed, sending GET as on page 27:
     
    GET http://csm9.default/chatproxy/api/chat?eventId=0&all=false
     
    If I spell eventId with capital letter "I" I get:
     

    <pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
        <apiError>
            <errorData>eventid</errorData>
            <errorMessage>must be greater than zero. Eventid was -1: session: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
            <errorType>invalidInput</errorType>
        </apiError>
    </apiErrors></pre>
    <pre style="margin-left: 0px;">
    </pre>
    <pre style="margin-left: 0px;">If I spell it with lower "i",</pre>
    <pre style="margin-left: 0px;">GET http://csm9.default/chatproxy/api/chat?eventid=0&all=false</pre>
    <pre style="margin-left: 0px;">I get:  </pre>
    <pre style="margin-left: 0px;"><pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
        <apiError>
            <errorMessage>no user found for the current session id: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
            <errorType>notFound</errorType>
        </apiError>
    </apiErrors>
    </pre>


    Can you explain why?

     
    Typo in the docs. It should be "eventid".  I'll get this fixed ASAP.  
     
    Thanks.
     
     

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: John Russell on 31-07-2012 11:05:13 AM
    The problem here is that the customer side of the chat is not a direct connection to the XMPP server.  Because customers are joining the chat from a browser outside the firewall all customer chat traffic is proxied through the SocialMiner API.  
     
    The general flow starts with what you did, POSTing a social contact to the chat API.  This creates the chat room where the agent can join directly.  Unlike the other REST APIs where you are returned a specific refURL identifying the resource created, the customer chat is accessed through the base chatproxy/api/chat API. Because there is no identifier for which chat we are getting events for, API calls only work with a valid session cookie. The session cookie returned from the POST or GET should be provided on subsequent chat proxy API calls.
     
    This is why the DELETE below failed.  You should send the DELETE to chatproxy/api/chat directly with your session cookie and that will remove the chat room associated with that session.  
     
    The customer chat events are accessed by calling GET as you did, but again, with the session cookie.  That's what identifies the customer to the API.  
     
    Also, you are absolutely right, there is an error in the docs.  The "eventid" parameter does _not_ have a capital I. It must be "eventid" with the lower case I.  
     
    I think that answers all of the questions but I'll comment in line as well.
     
    I want to replace the customer webchat UI with a customized one. So what I'm doing is generating a chat feed request via REST API (done and success) and after that accessing xmpp (with jabberwerx or xmpp client) and start chatting with the agent selected. The question is: which is the customer side xmpp user I can use to log in to xmpp(in my mind it should be a virtual user) to access the room.
     
    On dev doc page 25 it's said that on feed info I could find user Jabber ID's. What is this about? I tried to access xmpp server with the "administrator" account and join the room after creating the feed and everything works properly. So I think I only miss a little piece.

     
    You can absolutely create a new chat UI, but you can't go directly to the XMPP server for the customer side of the chat.   The customer side of the chat is only accessible through the chatproxy/api/chat API with the sesion cookie you got when you POSTed to create the chat originally.  You don't need to worry about jabber ids or anything on the customer side. 
     

    I also want to report a couple of strange behaviours. I tried to delete a running chat as reported on page 27 dev doc. So I tried with:
     
    DELETE http://csm9.default/chatproxy/api/chat/DBE8F92310000138000002363F57FFC8 
     
    where DBE8F92310000138000002363F57FFC8  is a valid chat feed id. The request I get is:
     
     
    <pre><ol class="linenums"><li>Status Code: 405 Method Not Allowed</li><li>Allow: POST,GET,OPTIONS,HEAD</li><li>Content-Length: 2266</li><li>Content-Type: text/html;charset=utf-8</li><li>Date: Tue, 31 Jul 2012 07:22:07 GMT</li></ol></pre>
     

    This is what I mentioned above where you just DELETE directly to chatproxy/api/chat with the session cookie.  This is not as pure REST as the rest of our APIs but as this is a public customer facing API, if we simply went by a full refURL than anyone else that knew that url could join the chat.  So the customer side of the chat dependson sessions created and maintained by the browser (or other client, but it has to deal with session cookies). 
     
     

    Second one: when trying to get info on a chat feed, sending GET as on page 27:
     
    GET http://csm9.default/chatproxy/api/chat?eventId=0&all=false
     
    If I spell eventId with capital letter "I" I get:
     
     
    <pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
    <apiError>
    <errorData>eventid</errorData>
    <errorMessage>must be greater than zero. Eventid was -1: session: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
    <errorType>invalidInput</errorType>
    </apiError>
    </apiErrors></pre>
    <pre style="margin-left: 0px;">
    </pre>
    <pre style="margin-left: 0px;">If I spell it with lower "i",</pre>
    <pre style="margin-left: 0px;">GET http://csm9.default/chatproxy/api/chat?eventid=0&all=false</pre>
    <pre style="margin-left: 0px;">I get: </pre>
    <pre style="margin-left: 0px;"><pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
    <apiError>
    <errorMessage>no user found for the current session id: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
    <errorType>notFound</errorType>
    </apiError>
    </apiErrors>
    </pre>
     
     
    Can you explain why?

     
    Typo in the docs. It should be "eventid".  I'll get this fixed ASAP.  
     
    Thanks.
     

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Mirko Puliafito on 31-07-2012 11:40:35 AM
    Hi John
     
    very clear on the first part. About DELETE problem, my request is (taken from firebug):
     
    Creation POST:
     
    Request:
     
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding:gzip, deflate
    Cache-Control:no-cache
    Connection:keep-alive
    Content-Length: 291
    Content-Type:application/xml; charset=UTF-8
    Host:cms9.default
    Pragma:no-cache
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 
     
    Reply:
     
    Content-Length: 0
    Content-Type: text/plain
    Date: Tue, 31 Jul 2012 15:26:32 GMT
    Location: http://cms9.default/ccp-webapp/ccp/socialcontact/DDA54527100001380000024E3F57FFC8
    Set-Cookie:JSESSIONID=042504FBC6027ED5E3767BDD9D2E4A83; Path=/chatproxy
     
     
    then I try with a DELETE:
     
    DELETE http://cms9.default/chatproxy/api/chat/DDA54527100001380000024E3F57FFC8
     
    Request:
     
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding:gzip, deflate
    Connection:keep-alive
    Content-Length:291
    Content-Type:text/plain; charset=UTF-8
    Cookie:JSESSIONID=042504FBC6027ED5E3767BDD9D2E4A83
    Host:cms9.default
    User-Agent:Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0
     
     
    Reply:
     
    405 - Method not allowed
    AllowOST,GET,OPTIONS,HEAD
    Content-Length:2266
    Content-Type:text/html;charset=utf-8
    Date:Tue, 31 Jul 2012 15:29:19 GMT
     
    It seems that method DELETE is not allowed on that URL. Cookie is set as you can see..
     
    Also tried with PUT Message:
     
    PUT http://cms9.default/chatproxy/api/chat
     
    <Message>
    <body>body of message </body>
    </Message>
     
    Request:
     
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding:gzip, deflate
    Connection:keep-alive
    Content-Length:50
    Content-Type:application/xml; charset=UTF-8
    Cookie:JSESSIONID=042504FBC6027ED5E3767BDD9D2E4A83
    Host: cms9.default
    User-Agent:Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0
     
    Reply:
     
    Content-Type:application/xml
    Date:Tue, 31 Jul 2012 15:33:41 GMT
    Transfer-Encoding:chunked
     
    <apiErrors>
    <apiError>
    <errorType>notFound</errorType>
    </apiError>
    </apiErrors>
     
    Let me know where I'm wrong (I'm using RestClient for Firefox as rest client - http://restclient.net/).
     
    Mirko
     
    The problem here is that the customer side of the chat is not a direct connection to the XMPP server.  Because customers are joining the chat from a browser outside the firewall all customer chat traffic is proxied through the SocialMiner API.  
     
    The general flow starts with what you did, POSTing a social contact to the chat API.  This creates the chat room where the agent can join directly.  Unlike the other REST APIs where you are returned a specific refURL identifying the resource created, the customer chat is accessed through the base chatproxy/api/chat API. Because there is no identifier for which chat we are getting events for, API calls only work with a valid session cookie. The session cookie returned from the POST or GET should be provided on subsequent chat proxy API calls.
     
    This is why the DELETE below failed.  You should send the DELETE to chatproxy/api/chat directly with your session cookie and that will remove the chat room associated with that session.  
     
    The customer chat events are accessed by calling GET as you did, but again, with the session cookie.  That's what identifies the customer to the API.  
     
    Also, you are absolutely right, there is an error in the docs.  The "eventid" parameter does _not_ have a capital I. It must be "eventid" with the lower case I.  
     
    I think that answers all of the questions but I'll comment in line as well.
     
     
    I want to replace the customer webchat UI with a customized one. So what I'm doing is generating a chat feed request via REST API (done and success) and after that accessing xmpp (with jabberwerx or xmpp client) and start chatting with the agent selected. The question is: which is the customer side xmpp user I can use to log in to xmpp(in my mind it should be a virtual user) to access the room.
     
    On dev doc page 25 it's said that on feed info I could find user Jabber ID's. What is this about? I tried to access xmpp server with the "administrator" account and join the room after creating the feed and everything works properly. So I think I only miss a little piece.
     
     
     
     
    You can absolutely create a new chat UI, but you can't go directly to the XMPP server for the customer side of the chat.   The customer side of the chat is only accessible through the chatproxy/api/chat API with the sesion cookie you got when you POSTed to create the chat originally.  You don't need to worry about jabber ids or anything on the customer side. 
     
     
     
    I also want to report a couple of strange behaviours. I tried to delete a running chat as reported on page 27 dev doc. So I tried with:
     
    DELETE http://csm9.default/chatproxy/api/chat/DBE8F92310000138000002363F57FFC8 
     
    where DBE8F92310000138000002363F57FFC8  is a valid chat feed id. The request I get is:
     
     
    <pre><ol class="linenums"><li>Status Code: 405 Method Not Allowed</li><li>Allow: POST,GET,OPTIONS,HEAD</li><li>Content-Length: 2266</li><li>Content-Type: text/html;charset=utf-8</li><li>Date: Tue, 31 Jul 2012 07:22:07 GMT</li></ol></pre>
     
     
     
     
    This is what I mentioned above where you just DELETE directly to chatproxy/api/chat with the session cookie.  This is not as pure REST as the rest of our APIs but as this is a public customer facing API, if we simply went by a full refURL than anyone else that knew that url could join the chat.  So the customer side of the chat dependson sessions created and maintained by the browser (or other client, but it has to deal with session cookies). 
     
     
     
     
    Second one: when trying to get info on a chat feed, sending GET as on page 27:
     
    GET http://csm9.default/chatproxy/api/chat?eventId=0&all=false
     
    If I spell eventId with capital letter "I" I get:
     
     
    <pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
    <apiError>
    <errorData>eventid</errorData>
    <errorMessage>must be greater than zero. Eventid was -1: session: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
    <errorType>invalidInput</errorType>
    </apiError>
    </apiErrors></pre>
    <pre style="margin-left: 0px;">
    </pre>
    <pre style="margin-left: 0px;">If I spell it with lower "i",</pre>
    <pre style="margin-left: 0px;">GET http://csm9.default/chatproxy/api/chat?eventid=0&all=false</pre>
    <pre style="margin-left: 0px;">I get: </pre>
    <pre style="margin-left: 0px;"><pre style="margin-left: 0px;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <apiErrors>
    <apiError>
    <errorMessage>no user found for the current session id: 2C8FC250E0422844AFF616557DB2A147</errorMessage>
    <errorType>notFound</errorType>
    </apiError>
    </apiErrors>
    </pre>
     
     
    Can you explain why?
     
     
     
     
    Typo in the docs. It should be "eventid".  I'll get this fixed ASAP.  
     
    Thanks.
     

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: John Russell on 03-08-2012 09:29:16 AM
    The problem looks like its this part

    http://cms9.default/chatproxy/api/chat/DDA54527100001380000024E3F57FFC8

    where you are trying to DELETE the chat with the contact id.  With the chatproxy API you make the calls directly to the chatproxy/api/chat URL with no ID at all and with the session cookie as well.  Its the session cookie that identifies which client connection this is and tells us which chat room to delete.

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: John Russell on 03-08-2012 11:34:09 AM
    What version of the API guide are you using? Page 39 in the 9.0(1) docs doesn't appear related to this.

    For the PUT If there is no activity from the client side for 20 seconds the chat room will be closed.  In our UI we poll with GET chatproxy/api/chat every five seconds to get any new chats from the agent and to keep the room alive. If the server misses 4 of these (20 seconds) it will close the room and delete it.

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: John Russell on 03-08-2012 11:51:17 AM
    The doc on page 27 is wrong. I'll get it fixed. 

    I'm not sure what you mean by chat room is keeping up without polling. If the customer doesn't call that API for 20 seconds the reference to the customer's session will be removed and subsequent calls with that session cookie will result in a 404 like you're seeing.  The chat room itself might not get closed right away, especially if the agent is in it, but the API will not know anything about the customer anymore.

    You can see the code which implements our customer facing chat UI on your SocialMiner server.  The files look like this

    [root@ccp-functional js]# ls -R
    .:
    3rdparty  ccp  chatroom.js  main.js  text.js

    ./3rdparty:
    backbone.js  handlebars.js  jquery.js  require.js  underscore.js

    ./ccp:
    chat.js  log.js  message-template.txt  mvc-base.js  presence-template.txt  utils.js

    And you can get to the js files directly through the browser like

    https://10.86.141.197/chatproxy/ui/js/ccp/chat.js

    changing the filename as appropriate.

    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Mirko Puliafito on 03-08-2012 11:18:50 AM
    Hi,
     
    referring to page 39 DELETE needs id on the URL. I'll try with the cookie ID and let you know.
     
    What about PUT problem?
     
    Mirko
     
    The problem looks like its this part

    http://cms9.default/chatproxy/api/chat/DDA54527100001380000024E3F57FFC8

    where you are trying to DELETE the chat with the contact id.  With the chatproxy API you make the calls directly to the chatproxy/api/chat URL with no ID at all and with the session cookie as well.  Its the session cookie that identifies which client connection this is and tells us which chat room to delete.


    Subject: RE: Integration with UCCX via Post Chat feeds
    Replied by: Mirko Puliafito on 03-08-2012 11:43:07 AM
    Hi,
     
    I'm referring to 9.0(1) doc,
     
    http://developer.cisco.com/documents/2163684/2165688/Cisco+SocialMiner+Developer+Guide%2c%20Release+9.0%281%29.pdf?redirect=http%3a%2f%2fdeveloper.cisco.com%2fweb%2fsocialminer%2fdocs%3fp_p_id%3ddoc_library_summary_portlet_WAR_doclibrarysummaryportlet_INSTANCE_DXka%26p_p_lifecycle%3d0%26p_p_state%3dnormal%26p_p_mode%3dview%26p_p_col_id%3dcolumn-1%26p_p_col_pos%3d1%26p_p_col_count%3d3
     
    I was wrong with the page, it's on page 27, sorry!
     
    About PUT, I don't have such behaviour. My chat and rooom is keeping up without polling and I'm not able to send messages.
     
    Can you please send me an example of usage? (in any language, it's ok!)
     
    Thanks
    Mirko
     
    What version of the API guide are you using? Page 39 in the 9.0(1) docs doesn't appear related to this.

    For the PUT If there is no activity from the client side for 20 seconds the chat room will be closed.  In our UI we poll with GET chatproxy/api/chat every five seconds to get any new chats from the agent and to keep the room alive. If the server misses 4 of these (20 seconds) it will close the room and delete it.