Capture contact info before initiating support chat

Brenden Kehren asked on April 28, 2017 21:05

I'm working to create a gated chat session using the out of the box Kentico Support Chat module. The functionality of chat itself is great for what the client needs although we need to place a step in front of it to capture the contact info before initiating chat. To take this one step further, we still want the "chat now" or "chat unavailable" to be displayed to the end user just that button takes them to a gated form.

Anyone done this using a weird configuration of Kentico's Support Chat

Recent Answers


Trevor Fayas answered on May 1, 2017 13:36

Just going to be some guesses, have you looked into modifying the InitiateChat.js at around this section here?

this.AcceptInitiatedChat = function (roomID) {
    if (lastRoomID > 0) {
        openWindow(lastRoomID);
    }
    else {
        CallWebService("AcceptChatRequest", function () {
            lastRoomID = roomID;
            openWindow(roomID);
        }, Error, [roomID]);
    }
};

My guess is you can add another fucntion before this logic to open your contact window, then when it returns it will continue to the openWindow() OR simply have that as part of your "contact submit" logic where it calls the openWindow with the RoomID.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 3, 2017 16:31

So I'm not seeing where you're finding the InitiateChat.js file at Trevor. I'm utilizing 9.0.50 and it's support chat not the regular chat.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on May 3, 2017 18:02

Ah... well my guess is then you'll want to look at CMSModules/Chat/Controls/SupportChatManager.js, maybe around the line 309, this looks to be the "initialize" support chat, perhaps again you can take the same methedology as they do in 10 where you open a custom page in a window, and when submitted then continues with the rest of the logic? Perhaps maybe also the "function addRoom" on 169?

I would just do some javascript debugging and step through and see where is best to put a hook, best i can do for now with limited time :(

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.