Monitor every chat with the Conversation API

Answered

4 Comments

  • Megumi Nakamura
    Comment actions Permalink

    Does "listenVisitorChannel" work in your case? 

    https://graphql-docs.com/docs/Mutation/?graphqlUrl=https://chat-api.zopim.com/graphql/request

    # Listen to the target channel so corresponding subscriptions
    # include activity updates from the channel. Agent can
    # listen to a visitor channel without joining it
    #
    # Arguments
    # channel_id: The target visitor channel
    # ID.
    listenVisitorChannel(channel_id: ID!): ListenVisitorChannelPayload!
    2
  • Javier Nomeisky
    Comment actions Permalink

    Hi Megumi, thanks for the answer!

    The subscription I mentioned above was the following:

    subscription {
    message {
    node {
    id
    content
    channel {
    ... on VisitorChannel {
    id
    state
    }
    }
    from {
    __typename
    display_name
    }
    }
    }
    }

     

    Should I use another one to get information about all the chats in the account?

    0
  • Megumi Nakamura
    Comment actions Permalink

    Hi Javier,

    When I tried before, I used two subscriptions, message and listenVisitorChannel.

    The all messages comes to message subscription at first (the one you mentioned) and we can get channel_id there. Then, I added listenVisitorChannel to the channel_id to continue to get messages after the chat was assigned to agent.

     

    2
  • Javier Nomeisky
    Comment actions Permalink

    Megumi, thanks a lot. Your answer was very helpful!

    0

Please sign in to leave a comment.

Powered by Zendesk