1

Is it possible to start the chat but without opening new window? I would like to have the chat inside a div on existing page. I don't want pre chat forms or anything like that. Just start the chat inside existing page. I'm using Deployment API to setup and initiate chat.

2
  • i'm very interested in achieving the same. Would you mind sharing the URL address where your chat is available, so i could show an example of the implementation?
    – user26560
    Nov 23, 2015 at 10:07
  • @Anni I can't. The Salesforce chat component is a piece of crap and the company migrated to a dedicated chat provided that does things properly. Nov 23, 2015 at 13:52

4 Answers 4

2

Yes it is possible to do so by using "startChatWithWindow()" from the Live Agent API. By passing in the name of an iFrame it will open up the chat within the iFrame instead of a new window.

The documentation can be found below.

http://www.salesforce.com/us/developer/docs/live_agent_dev/index_Left.htm#StartTopic=Content/live_agent_launching_chat_request_API_startChatWithWindow.htm

5
  • I'd call this an undocumented feature. The docs clearly say about window name. Mar 5, 2015 at 10:37
  • @Patriot, what do you as the name of the iframe? I was thinking it's id, but that doesn't seem to be working for me.
    – Tall Paul
    May 29, 2015 at 13:52
  • 1
    @TallPaul for some browsers you need to set iframe name AND id attributes. May 29, 2015 at 14:18
  • @SiliconMind thanks for that, I got it to work now!
    – Tall Paul
    May 29, 2015 at 14:21
  • does this have to be an iframe? I tried it with a div, but it just popped up. I did get it to work with the iframe, but prefer to div Jan 11, 2019 at 15:39
1

this should probably work. include this in <a.../a> tag

onclick="liveagent.startChatWithWindow('xxxxxxxxxxxxx'  ,  'name_of_your_iframe')"
0

If using iFrame is not ideal (not mobile friendly), in the same page file, give it a window name first.

<script type="text/javascript">
window.name = 'chatchat'
</script>

Open the chat or pre-chat form within the same window.

liveagent.startChatWithWindow('573A0000000XXXX','chatchat')
0

Now have a new feature name Embedded chat service you can use live chat without pop-up in a new window. And there is trail modules too.

https://trailhead.salesforce.com/content/learn/modules/web-chat

https://trailhead.salesforce.com/en/content/learn/projects/build-a-community-with-knowledge-and-chat/enable-live-agent-and-communities

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .