• Anja Ishmukhametova
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
i do this way: 

i dont use VisualSource, and
for example windowLiveChat = my custom name of popup-livechat-window. 
var getReference = function() {
// to get a reference to popup
var w = window.open("", windowLiveChat);
return w;
}
var buttonCallback = function(e) {

            if (e == liveagent.BUTTON_EVENT.BUTTON_AVAILABLE && getReference()) {
           //window opened and customers service able to chatting
           }
            if (e == liveagent.BUTTON_EVENT.BUTTON_UNAVAILABLE && getReference() === undefined) {
     //window closed and customers service offline
         }
            if (e == liveagent.BUTTON_EVENT.BUTTON_ACCEPTED) {console.log('BUTTON_ACCEPTED')}
            if (e == liveagent.BUTTON_EVENT.BUTTON_REJECTED) {console.log('BUTTON_REJECTED')}

        }

liveagent.addButtonEventHandler('<%=LiveAgentButtonId %>', buttonCallback);
liveagent.init('<%=LiveAgentInitUrl %>', '<%=LiveAgentDeploymentId %>', '<%=LiveAgentDeveloperId %>');

//start chat
liveagent.startChatWithWindow(chartBtnId, windowLiveChat);

My question : 
1. is it possible use  REST liveagen API and call something  : liveagen.someFunction() - in parent window  to get DATA about child window. DATA = //for example [chat session is opened, chat is closed]
so i didnt find in PDF  :  http://www.salesforce.com/us/developer/docs/live_agent_dev/live_agent_dev_guide.pdf  

2.  also i can init my own chat-window , using VisualSource, and then using
liveagent.addEventListener(liveagent.chasitor.Events.CHAT_REQUEST_SUCCESSFUL,
myCallBack);
liveagent.addEventListener(liveagent.chasitor.Events.CHAT_ESTABLISHED, newagent);
liveagent.addEventListener(liveagent.chasitor.Events.AGENT_CHAT_TRANSFERRED, newagent);

but if i dont want use VisualForce ? 



thx
i do this way: 

i dont use VisualSource, and
for example windowLiveChat = my custom name of popup-livechat-window. 
var getReference = function() {
// to get a reference to popup
var w = window.open("", windowLiveChat);
return w;
}
var buttonCallback = function(e) {

            if (e == liveagent.BUTTON_EVENT.BUTTON_AVAILABLE && getReference()) {
           //window opened and customers service able to chatting
           }
            if (e == liveagent.BUTTON_EVENT.BUTTON_UNAVAILABLE && getReference() === undefined) {
     //window closed and customers service offline
         }
            if (e == liveagent.BUTTON_EVENT.BUTTON_ACCEPTED) {console.log('BUTTON_ACCEPTED')}
            if (e == liveagent.BUTTON_EVENT.BUTTON_REJECTED) {console.log('BUTTON_REJECTED')}

        }

liveagent.addButtonEventHandler('<%=LiveAgentButtonId %>', buttonCallback);
liveagent.init('<%=LiveAgentInitUrl %>', '<%=LiveAgentDeploymentId %>', '<%=LiveAgentDeveloperId %>');

//start chat
liveagent.startChatWithWindow(chartBtnId, windowLiveChat);

My question : 
1. is it possible use  REST liveagen API and call something  : liveagen.someFunction() - in parent window  to get DATA about child window. DATA = //for example [chat session is opened, chat is closed]
so i didnt find in PDF  :  http://www.salesforce.com/us/developer/docs/live_agent_dev/live_agent_dev_guide.pdf  

2.  also i can init my own chat-window , using VisualSource, and then using
liveagent.addEventListener(liveagent.chasitor.Events.CHAT_REQUEST_SUCCESSFUL,
myCallBack);
liveagent.addEventListener(liveagent.chasitor.Events.CHAT_ESTABLISHED, newagent);
liveagent.addEventListener(liveagent.chasitor.Events.AGENT_CHAT_TRANSFERRED, newagent);

but if i dont want use VisualForce ? 



thx

Hi - I was wondering how customizable the live agent pop-up window is.  I'm not a javascript expert so I am unsure how to do these things or whether they are even possible.  Any help is appreciated.

 

  • Can you set the position of the pop-up when they click the "chat" button?
  • Can you set the size of the pop-up?
  • When you click "end chat", is it possible to close the entire window as well (instead of having to click the 'x' on the window)