06-23-2019 01:56 PM
Hi,
I would like to ask if anyone here has already tried adding custom header gadget that has access to User's information? I would like to have a button on the header that can notify the Agent's supervisor. In order to do that, the custom header gadget should be able to access User's info but currently I cannot get the information that I need.
Here is my code:
< script type = "text/javascript" > // initialize the gadget var handleUserLoad = function(userevent) {}; var handleUserChange = function(userevent) {}; gadgets.HubSettings.onConnect = function() { window.console.log("notificationbar: ready..."); var cfg = finesse.gadget.Config; finesse.clientservices.ClientServices.init(cfg, false); var clientLogger = finesse.cslogger.ClientLogger; // declare clientLogs clientLogger.init(gadgets.Hub, "notificationbargadget"); window.console.log("notificationbar: ONCONNECT"); window.console.log("notificationbar:cfg: " + cfg.extension); // Initiate the ContainerServices and add a handler for when the tab is visible // to adjust the height of this gadget in case the tab was not visible // when the html was rendered (adjustHeight only works when tab is visible) var containerServices = finesse.containerservices.ContainerServices.init(cfg, false); containerServices.addHandler(finesse.containerservices.ContainerServices.Topics.ACTIVE_TAB, function() { clientLogger.log("notificationbar Gadget is now visible"); // log to Finesse logger // automatically adjust the height of the gadget to show the html gadgets.window.adjustHeight(); }); containerServices.makeActiveTabReq(); window.console.log("notificationbar:cfg: " + cfg.id); var user = new finesse.restservices.User({ id: cfg.id, onLoad: handleUserLoad, onChange: handleUserChange }) var states = finesse.restservices.User.States; window.console.log("notificationbar: user: " + user.extension); }; < /script>
onConnect seems not working.
I'm getting this error:
Any help is highly appreciated.
Regards,
William
Solved! Go to Solution.
06-25-2019 11:19 AM
Hi,
When you get the version of the UCCX system via cli (show version active), what is listed? Is it 12.0.1.10000-24? If it is, then that means it does not have the ES. If not, then it has the ES. You should be able to get the ES from here: https://software.cisco.com/download/home/286323009/type/286314176/release/12.0(1)ES01
Ok, good to know it works fine in the page area.
Thanx,
Denise
06-24-2019 11:19 AM
Hi William,
Does 12.0 v2 equal to 12.0 ES1? You must have ES1 to put gadgets in the header. Also, have you tried this gadget in the regular gadget area? Does it work? I noticed that you are using window.console. It is known to cause issues in the gadget and it should be avoided. You should use the clientLogs for gadget logging.
The first error I see is a 404 for the http-bind. If there is an issue with the BOSH connection, the User notification won't be received by the gadget and therefore you won't be able to get the User information.
Thanx,
Denise
06-24-2019 07:14 PM - edited 06-24-2019 07:17 PM
Hi Denise,
Thanks for mentioning that window.console is causing problem, I will replace it with clientLogs then. May I ask where to get this ES1? I'm using Finesse on dCloud and we do not have our local installation at the moment. Anyway can dCloud have this ES1 installed? I already emailed dCloud support 2 days ago but until now there is no reply yet. I have tried this in the page area and it works fine.
06-25-2019 11:19 AM
Hi,
When you get the version of the UCCX system via cli (show version active), what is listed? Is it 12.0.1.10000-24? If it is, then that means it does not have the ES. If not, then it has the ES. You should be able to get the ES from here: https://software.cisco.com/download/home/286323009/type/286314176/release/12.0(1)ES01
Ok, good to know it works fine in the page area.
Thanx,
Denise
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide