Message Subscription of Chat Conversations API

Answered

5 Comments

  • Sutrisno Suryajaya
    Comment actions Permalink

    Hi Megumi,

     

    When you start a Conversations API session, the client will act as the agent which is signed in during the OAuth authentication flow. So, it will depend on that agent and account configuration. You can make the session subscribe to all incoming messages, if you make a bot department, make the bot agent be inside the bot department and route all incoming chats to bot department (guide). 

    0
  • Megumi Nakamura
    Comment actions Permalink

    Hi Sutrisno, Thank you for quick reply.

    I will check the routing function of the chat, and try to route all incoming chat to bot agent.

    Thank you

    0
  • Megumi Nakamura
    Comment actions Permalink

    I could listen every messages by "listenVisitorChannel"

    const listenVisitorChannelQuery = {
    payload: {
    query: `mutation {
    listenVisitorChannel(
    channel_id: "${channelId}"
    ) {
    success
    }
    }`
    },
    type: "request",
    id: REQUEST_ID.LISTEN_VISITOR_CHANNEL
    };
    webSocket.send(JSON.stringify(listenVisitorChannelQuery));
    0
  • Sutrisno Suryajaya
    Comment actions Permalink

    Hi Megumi,

    Yes, you can use listenVisitorChannel mutation to receive messages from the given channel even when the agent has not joined the channel. Do note that you will need to know the lD of the channel you want to listen to before making listenVisitorChannel request; which mean you need to make sure your account has correct routing and department configuration to make sure all incoming chats are always routed to the Conversation API agent.

    0
  • Megumi Nakamura
    Comment actions Permalink

    Hi Sutrisno, Thank you for information!

    0

Please sign in to leave a comment.

Powered by Zendesk