cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1387
Views
0
Helpful
3
Replies

UCCX 12.0 v2 - How to add custom header with button to notify supervisor

liam123
Level 1
Level 1

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.

 

custom button.png

 

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:error.png

 

Any help is highly appreciated.

 

Regards,

William

1 Accepted Solution

Accepted Solutions

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

View solution in original post

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

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

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.

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: