Although Answer Bot is operational as soon as it is enabled in the Web Widget (Classic), you can configure some functionality by modifying the JS API, including:
Related articles:
Suppressing Answer Bot
If there are situations where you don't want to present Answer Bot, you can now use the JS API to suppress it, similar to what you would do with other channel options:
window.zESettings = {
webWidget: {
answerBot: {
suppress: true
}
}
};
For more information, see the suppress JS API call.
Temporarily suppressing contact channels
You can use a JS API to force attempted self-service before the contact options are displayed:
window.zESettings = {
webWidget: {
answerBot: {
contactOnlyAfterQuery: true
}
}
};
When this is set to true
, users will be required to attempt to self-serve (by simply asking their question / stating their problem), after which the contact channel choice options will be presented as usual.
Updating the appearance of Answer Bot
You can control the displayed widget title, bot name, and avatar through the basic JS API shown below. By default, the "Bot" tag will always be present to help indicate to users that the experience is not with a human.
Add the following code snippet BEFORE the Answer Bot widget script is loaded. Then, you can control and define the title, bot name, and avatar image source, for example:
<script type="text/javascript">window.zESettings = {
webWidget: {
answerBot: {
avatar: {
url: 'https://link-to-some-image',
name: { "*" : 'Zendesk'
}
},
title: { "en-US": "Support"
}
}
}
};
</script>
Filtering Article Recommendation suggestions by label
You can use the JS API to set the labels which are passed through to Answer Bot. Then, Answer Bot search for suggestions using only articles that contain those labels.
<script>zESettings = { webWidget: { answerBot: { search: { labels:
['hello', 'world'] } } }}</script>
This option can useful in the following scenarios:- Creating a url mapping that sets labels based on where the user is on the website (perhaps they are in a particular product category, you can set labels to ensure only articles for that product are filtered on).
- Filtering articles for a particular platform based on the detected device.
- And many more...
8 Comments
@... The video linked under Updating the appearance of Answer Bot is not there. The web widget resources link near the top also leads to a dead link.
Thanks for catching those, Justin! I've fixed the resource link and removed the video until I can track down a working version of it.
not having any luck with that snippet of code. (filtering articles using labels). I'd like a specific article to be recommended when the keywords "return, refunds" etc are used.
This is Tony from Zendesk.
The code you are using right now should attach contextual data when submitting a user query, as you can see here.
I believe you are looking for something that will enhance the contextual help provided by the web widget, then I think you should use this option and integrate it in your site.
Best,
I am trying to locate in HTML where the " widget script is loaded" so that i can remove the "Bot" language. I want to just want to remove the highlighted language nothing else. I have looked through ever page and can not find the web widget info listed anywhere.
As it turns out, there's no option to remove it if you have turned on Article recommendation for your widget. However, you can rename it by using this API.
I used the code from updating the appearance of answer bot in Rosetta Theme 1.4.2 so I could change the picture of the avatar. I had put the code in script.js in the helpdesk so that it would change the values. This worked perfectly.
In Sandbox we just updated Rosetta Theme version 2.1.2. I added the same code
//Answer Bot Changes
window.zESettings = {
webWidget: {
answerBot: {
avatar: {
url: 'https://rustoleum.com/zendesk/RO-Chat-Bot.png',
name: {"*": 'RO'}
}
}
}
};
The avatar does not change to the picture? Did something change with the new version that I need to adjust the settings?
This will only work for Live Chat (Classic Widget).
Please sign in to leave a comment.