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.

This topic is 1 and half year old, but I came to the same situation. I don’t understand how should I handle if a ticket is closed. Even the Sendbird Desk for JavaScript sample doesn’t handle if an agent closes a ticket. But we need to delete a closed ticket from the opened ticket list.

As I “debugged” until now, I get 2 events in onMessageReceived (which relevant props are):

  1. message.customType: ''
    message.data.type: 'NOTIFICATION_MANUAL_CLOSED'
  2. message.customType: 'SENDBIRD_DESK_ADMIN_MESSAGE_CUSTOM_TYPE'
    message.data.type: 'SYSTEM_MESSAGE_TICKET_CLOSED_BY_AGENT'

So I guess I have to use the second one to update the list. Can someone confirm this? Can someone provide also a code sample how should we use this?