Chat session cannot be routed to chatbot agent using Conversation API updateAgentStatus
Data ultimo post: 22 gen 2021
I currently implement a chatbot in our help center based on Google’s Dialogflow technology. This works already well, when I put myself as a chat agent into the department I want to use for the chatbot. However, if I remove myself from this department and put any other agent into it, the chat widget stays in offline mode, so that a user cannot start a chat.
Here is the relevant code for this issue.
Help Center:
window.zESettings = {
webWidget: {
chat: {
departments: {
enabled: ['NI Service Bot']
}
},
contactForm: {
suppress: true
},
helpCenter: {
suppress: true
}
}
};
Conversation API (Node JS):
if(type === 'updateAgentStatus'){
graphQlQuery = {
payload: {
query: `mutation {
updateAgentStatus(status: ONLINE) {
node {
display_name
id
name
}
}
}`
},
type: "request",
id: REQUEST_ID.UPDATE_AGENT_STATUS
};
logMessage = "[updateAgentStatus] Request sent";
}
webSocket.send(JSON.stringify(graphQlQuery));
console.log(logMessage);
However, when I log the data coming back, I always see that it uses my account for this graphQL query and not the one from the agent I put into the chatbot department. How can I change this?
I have seen a comment from Bryan here that might indicate that it matters under which Zendesk account the OAuth access token was created:
https://develop.zendesk.com/hc/en-us/community/posts/360051528933
Does this mean I need to log in with the chatbot credentials and generate a new OAuth token then? I was under the impression that an OAuth token is not user-specific and if so, I would expect to see some information in the Chat console about the user who has created the OAuth token.
Thanks for any help pointing me in the right direction!
0
4 commenti
Accedi per aggiungere un commento.