Skip to content

Instantly share code, notes, and snippets.

@michrome
Last active September 26, 2018 13:03
Show Gist options
  • Save michrome/151cf59c2b12b700346a3535bc07d5d5 to your computer and use it in GitHub Desktop.
Save michrome/151cf59c2b12b700346a3535bc07d5d5 to your computer and use it in GitHub Desktop.
Detect when a Business Standstill case is about to be raised and ask customer to call
// <script type="text/javascript" src="https://gist.githubusercontent.com/michrome/151cf59c2b12b700346a3535bc07d5d5/raw/checkPriority.js"></script>
window.setInterval(checkPriority, 500);
function checkPriority() {
var x = Coveo.$("[data-case-field='Priority']").coveo("getValue");
if (x === "1 - Business Standstill") {
alert("Please call us!");
Coveo.$("[data-case-field='Priority']").coveo("setValue", "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment