Userscript which is useful for prevent replying to customer with specific NG keywords on Zendesk.
Install Tampermonkey to your browser
TamperMonkey is required for this userscript.
Set up JSON file for configuration
zendesk-incident-protector.user.js
fetches configuration from JSON to define NG keywords.
So you must set up JSON file to configure your protection settings. Here is an example.
{
"hosts": [
"aaa.zendesk.com",
"bbb.zendesk.com"
],
"targetWords": {
"common": ["hoge", "huga"],
"aaa.zendesk.com": ["piyo", "huga-\\d+"],
"bbb.zendesk.com": ["moge"]
}
}
zendesk-incident-protector.user.js
requires configuration with two attributes.
hosts
: target hosts to protect.targetWords
: target words to trigger alert. Words will be selected fromcommon
attribute and matched Zendesk host. You can also set regexp pattern. (In example,huga-123
will trigger alert.)
Be sure to minify JSON before uploading.
Just click here.
Then confirmation window of tampermonkey will be displayed on your browser.
At first, you must define configuration URL with confirm prompt.
Then, zendesk-incident-protector.user.js
set NG keyword validator based on configuration.
When you attempt to send reply to customer, validator will check contents and show alert if contents include NG keyword.
How to redefine configuration URL?
Configuration URL is stored on localStorage of your browser. So you can reset URL by clear cache on browser, or type below on developer console.
localStorage.removeItem("zendeskIncidentProtectorConfigURL");
XFLAG Studio CRE Team