Although autoreplies with articles are operational as soon as it is set up in the Web Widget (Classic), you can configure some functionality by modifying the JS API, including:
Related articles:
Suppressing autoreplies
If there are situations where you don't want to suggest answers 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 the 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 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 suggestions by label
You can use the JS API to set labels which are passed through to suggested articles. Then, autoreply can 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
Permanently deleted user
@... 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.
1
Aimee Spanier
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.
0
Jimmy
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.
0
Tony
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,
0
Stephanie Knuteson
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.
0
Dane
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.
0
Daniel Michaels
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?
0
Dane
This will only work for Live Chat (Classic Widget).
0