Desk SDKs JavaScript v1
Desk SDKs JavaScript
Desk SDKs
Version 1

CSAT message

Copy link

Customer satisfaction rating (CSAT) message enables your customers to give a score or leave a comment on the support provided within a ticket. The satisfaction rating scale ranges from 1 to 5, and the average CSAT score an agent or a team received can be found in Reports on the Sendbird Dashboard.


Copy link

To send a CSAT message to a client app, turn on the Customer satisfaction rating feature on your dashboard first. The message is customizable in Settings > Automation on the dashboard.

CSAT message types

Copy link

CSAT messages can have two types of states as below:

Request states

Copy link


Set when an agent sends a CSAT message.


Set when a customer sends a response to a CSAT message.

Submit feedback

Copy link

To submit feedback from a client app, call the ticket.submitFeedback() method on the client app. When a customer replies to the CSAT message, the state of the message changes from WAITING to CONFIRMED. You can also use the instanceSubmitFeedback method to submit feedback, which is a method on ticket instance.

// submitFeedback
Ticket.submitFeedback(message, score, comment, () => { /* callback */ });

// instanceSubmitFeedback
const t = new Ticket();
t.instanceSubmitFeedback(msg, 'yes', (ticket, error) => {
  console.log(ticket, error);



Specifies a text message for a CSAT message.



Specifies the score of satisfaction rating scale. Values range from 1 to 5.



Specifies a comment on the provided support. The value can be null.

Update the CSAT message

Copy link

Sendbird server notifies the updates to your app through theonMessageUpdate() method of the channel event handler. You can implement your code to customize the UI of the updated message depending on the request status.

channelHandler.onMessageUpdated = (channel, message) => {
    SendBirdDesk.Ticket.getByChannelUrl(channel.url, (ticket, error) => {
        if (error) {
            // Handle error.

        let data = JSON.parse(;
        const isFeedbackMessage = data.type === SendBirdDesk.Message.DataType.TICKET_FEEDBACK;
        if (isFeedbackMessage) {
            const feedback = data.body;
            switch (feedback.state) {
                case SendBirdDesk.Message.FeedbackState.WAITING:
                    // Implement your code for the UI when there is no response from a customer.
                case SendBirdDesk.Message.FeedbackState.CONFIRMED:
                    // Implement your code for the UI when there is a response from a customer.

Copy link

You can find the stringified JSON object of the following in the property within the onMessageUpdate() method of the channel event handler.

    "body": {
        "state": "CONFIRMED",
        "customerSatisfactionScore": 3,                             // Score ranges from 1 to 5
        "customerSatisfactionComment": "It was really helpful :)."  // Comment is optional.