Table of Contents

Concierge Links

Patrick Hawley Updated by Patrick Hawley

Concierge Links allows developers to control the behavior of the Concierge Chat interface, and link those behaviors to words or phrases on your website. The API supports adjusting the size of the interface, load text in to the interface, and submitting inquiries. These methods can be utilized to create a speedy and seamless user experience. 

Open the Concierge

When the Concierge interface is collapsed, the open() method will open the Concierge interface. 

<a href="javascript:void(0)" onclick="window.capacityConcierge.open()">HYPERLINK TEXT</a>

Close the Concierge

When the Concierge interface is in its default view, the close() method will collapse the Concierge interface to a minimized state. 

<a href="javascript:void(0)" onclick="window.capacityConcierge.close()">HYPERLINK TEXT</a> 

Maximize the Concierge

The maximize() method will open the Concierge interface to its largest size.

<a href="javascript:void(0)" onclick="window.capacityConcierge.maximize()">HYPERLINK TEXT</a>

Load a message into the Concierge

The load() method populates the Concierge interface with the text string passed to it.

<a href="javascript:void(0)" onclick="window.capacityConcierge.load('Hello')">Load Concierge with the word Hello</a>

Clear the message in the Concierge

The clear() method removes any inquiry from the Concierge interface

If text was already loaded in the Concierge interface, this method will clear that text loaded so that the a inquiry can be loaded.  

<a href="javascript:void(0)" onclick="window.capacityConcierge.clear()">HYPERLINK TEXT</a>

Submit the message that is in the Concierge

The submit() method submits whatever inquiry is in the Concierge interface.

<a href="javascript:void(0)" onclick="window.capacityConcierge.submit()">HYPERLINK TEXT</a>

Ask the Concierge a specific question

The ask() method populates and submits the Concierge interface with the text string passed to it. It can be seen as a combination of load() and submit().

<a href="javascript:void(0)" onclick="window.capacityConcierge.ask('CHAT BOX TEXT')">HYPERLINK TEXT</a>

Check if the Concierge is open

The is_open boolean property indicates whether the Concierge interface is expanded from its minimized state. Note that this is not the same as the maximized, or largest, size.

if (window.capacityConcierge.is_open) {

// Do things here

}

Check if the Concierge already has a message loaded

The has_message boolean property indicates whether the Concierge interface contains any content.

if (window.capacityConcierge.has_message) {

// Do things here

}

Hide Call Button

The hide_callbutton method hides the call button on the lower right corner of the Concierge interface.

​<a href="javascript:void(0)" onclick="window.capacityConcierge.hide_callbutton()">HYPERLINK TEXT</a>​

Show Call Button

The show_callbutton method makes the call button on the lower right corner of the Concierge interface visible.

<a href="javascript:void(0)" onclick="window.capacityConcierge.show_callbutton()">HYPERLINK TEXT</a>

Avoid Element

The set_avoid_element method helps the Concierge avoid a specified element that is on the page. This is typically used when the Concierge interface is covering or blocking certain elements on the page.

When set, the Concierge interface will attempt to dodge the element upon scrolling or resizing the viewport if it is about to cover or block the element. The element passed in needs to be an HTMLElement that is already mounted into the `document.body`.

Note that this method may result in performance impact for the hosting page depending on how and where the page is rendered, therefore trial runs on all supported browsers and devices are encouraged.

<script type="text/javascript">

var footer = document.getElementById("footer");

window.capacityConcierge.set_avoid_element(footer);

</script>

How did we do?

Commonly Used Concepts

Contact