Ticket not updating after closed by agent

I’m using SendBird Desk’s JavaScript SDK and ran into a issue. SendBirdDesk.Ticket.getByChannelUrl doesn’t always return the latest status of the Ticket. It’s still returning the same data when the ticket has been closed by the agent.

Is there a way I could get a callback when a certain ticket is opened or closed? The documentation says:

Each event type is located in message.data which looks like below.

{ "type": "TICKET_ASSIGN" // "TICKET_TRANSFER", "TICKET_CLOSE" }

You can check out these messages in ChannelHandler.onMessageReceived() .

But I’ve never seen these type values in message.data. The closest things I got were NOTIFICATION_MANUAL_CLOSED and SYSTEM_MESSAGE_TICKET_CLOSED_BY_AGENT. Am I doing something wrong or the documentation is in inaccurate? Also is there a full list of message.data.type values?

Thanks!

It’s still returning the same data when the ticket has been closed by the agent.

Generally, an agent can not close a ticket of the Sendbird channel without a customer’s confirmation. If you want to get the ticket close event, you can get by Sendbird Desk webhook.
https://www.notion.so/sendbirddesk/Sendbird-Desk-Webhook-7c3aba331a3d449d9a0e6295fd2022a9#50b7a5cf3b2d45d4bf2b1bb95ce19200

But I’ve never seen these type values in message.data . The closest things I got were NOTIFICATION_MANUAL_CLOSED and SYSTEM_MESSAGE_TICKET_CLOSED_BY_AGENT

Yes. You can get the event type from the json data in message.data. I will share all of the system message types on the above notion link later.
{
“custom_type”: “”,
“mentioned_users”: ,
“updated_at”: 0,
“is_removed”: false,
“type”: “ADMM”,
“message”: “Hi, how can I help you?”,
“data”: “{“type”: “NOTIFICATION_WELCOME”}”,
“mention_type”: “users”,
“created_at”: 1582181294246,
“channel_url”: “sendbird_group_channel_7444658_46427cc7ff1f8ce0f82529b6de8072199c8562ff”,
“message_id”: 15084827
},

I’m talking about the client-side JavaScript SDK (https://github.com/sendbird/SendBird-Desk-SDK-JavaScript) so we won’t be able to receive webhook events.

The client-side type doesn’t seem to match the documentation.


You can get the above message information from this event handler.

Here is the definition of message data type.

I couldn’t find anything new in the links you’ve given. My problem is that message.data.type doesn’t match the [documentation of SendBird Desk SDK].

I wanted to know a list of possible values for message.data.type, not message.type.