Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  How to implement Basic Chat Protocol with PSDK?

    Posted 01-25-2021 08:08
    I am trying to use the Basic chat protocol with PSDK (not the Flex protocol) and it is not working. 

    BasicChatProtocol basicChat = new BasicChatProtocol(new Endpoint("<host>", <port>));
    basicChat.open();
    RequestRegister requestReg = RequestRegister.create("chatagent", UserType.Agent, "chat", null, null);

    This code connects to the chat server fine, basic chat is recognized but the above parameters are NOT passed to the chat server so the login obviously fails. this is from the chat server logs, clearly nickname and agent types were not received by the chat server
    2021-01-25T13:05:55.548 Trc 59220 input (packet of size=612 received) from conn_id=19:5159 (type=BASIC): basic reqRegister
    refId '1'
    Nickname ''
    userType 'UNKNOWN'
    personId ''

    I also tried this format but its the same, the login details are not passed to the chat server
    requestReg = RequestRegister.create();
    requestReg.setUserNickname("chatagent");
    requestReg.setUserType(UserType.Agent);
    requestReg.setPersonId("chat");

    Has anybody implemented basic chat protocol before? I have not found a working example anywhere.
    Thanks
    #DigitalChannels

    ------------------------------
    Zsolt Belicza
    British Telecommunications PLC
    ------------------------------


  • 2.  RE: How to implement Basic Chat Protocol with PSDK?

    GENESYS
    Posted 01-25-2021 10:38
    Hello,

    I unfortunately don't have a Basic Chat example (and don't currently have an Engage environment at hand).
    But checking the Platform SDK API reference, in the BasicChatProtocol class, i see it is mentioned that "By default, BasicChatProtocol has enabled AutoRegister mode. Set AutoRegister to false if you need send client registration message directly."

    You could try to set AutoRegister to false (in your basicChat object).
    Or set the UserNickname, UserType and PersonId on the basicChat object before calling basicChat.open().

    Hope this helps.

    Regards,

    ------------------------------
    Jerome Saint-Marc
    Genesys - Employees
    ------------------------------



  • 3.  RE: How to implement Basic Chat Protocol with PSDK?

    Posted 01-25-2021 10:48
    Thanks for the reply, I just figured it out myself too  and it is working now :)
    basically I needed to add this (i thought this option was only for flexchat)
    basicChat.setAutoRegister(false);

    The issue was that this auto register attempt looked like my registration, i noticed it is not my register when i tried to debug the code line by line - got surprised when register was sent even before I requested it.
    thanks, again

    ------------------------------
    Zsolt Belicza
    British Telecommunications PLC
    ------------------------------



  • 4.  RE: How to implement Basic Chat Protocol with PSDK?

    GENESYS
    Posted 01-25-2021 10:58
    Edited by Jerome Saint-Marc 01-25-2021 10:57
    Glad you found it! :-)

    ------------------------------
    Jerome Saint-Marc
    Genesys - Employees
    ------------------------------



Need Help finding something?

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