Listen to an event whenever user send a message from chat widget
Hi there,
We are trying to build an marketplace app for zendesk chat.
Our Goal : Whenever user send any message through web chat widget, make an api call to our server and send a response to user based on their query.
First, we tried to to acheive this by setup a manual webhook.
Zendesk Admin > Apps & integrations > Integrations > Conversations Integrations (Webhook subscriptions - Conversation Message).
We have successfully achieved our goal using this method.
Then, we started to build an app (which always running in background, NO UI). But, we couldn't find an event for this.
Is there any possibilities to acheive something like this mentioned below.
client.on("conversation.message", (payload) => {
// payload - Details of the message created by the user & Other details.
apiCallToOurServer(payload);
});
Also, we need to listen to this event every time user send a message (No matter Agent/Client Opened the ZenDesk Website Or Not).
Please kindly help us with a solution.
Looking forward your awaiting response.
Thank you.
-
Hi Karthick! I believe what you're looking for is
ticket.comments.changed
which you can find here. The difficulties would be that this would need to be running in the ticket sidebar location, which also means it can only listen to the ticket that is currently in the foreground. Otherwise, if this needs to listen to all tickets, this option wouldn't work for you.
Iniciar sesión para dejar un comentario.
1 Comentarios