Created
September 10, 2024 13:10
-
-
Save socraticprogrammer/da9ebaeacaaaead0ca92699e8c832952 to your computer and use it in GitHub Desktop.
Implementation example of Widget from Genesys Cloud.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const customPlugin = CXBus.registerPlugin("Custom"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Genesys Widget</title> | |
</head> | |
<body> | |
<h1>Genesys Widget</h1> | |
<button onclick="customPlugin.command('ClickToCall.open')" type="button"> | |
Click to call | |
</button> | |
</body> | |
<script | |
src="https://apps.mypurecloud.com/widgets/9.0/cxbus.min.js" | |
onload="javascript:CXBus.configure({debug:false,pluginsPath:'https://apps.mypurecloud.com/widgets/9.0/plugins/'}); CXBus.loadFile('widget/widget.config.js').done(function(){CXBus.loadPlugin('widgets-core')});" | |
></script> | |
<script src="widget/click-to-call.js"></script> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window._genesys = { | |
widgets: { | |
main: { | |
preload: ["ClickToCall"], | |
}, | |
clicktocall: { | |
enableCountdown: true, | |
provideAccessCode: true, | |
autoDialAccessCode: true, | |
ariaNumberExpirationIntervals: [100, 75, 50, 25, 10], | |
ewt: { | |
display: true, | |
queue: "Teste Produtos", | |
threshold: 30, | |
refreshInterval: 10, | |
}, | |
confirmFormCloseEnabled: true, | |
dataURL: "http://www.myphoneservice.org", | |
formJSON: {}, | |
userData: {}, | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment