Methods
Through JS API you can manage Quickley Live Chat windows behavior. Methods can be called by using global object Quickley that available anywhere after the widget code.
Global object Quickley accepts two arguments. The first is the method name. The second is the parameters of callable method.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('sendAutoMessage', 'Hello! Can i help you?');
Copied!

show

Displays Quickley Chat button if it was previously hidden by configuration param hidden.
1
<script>
2
window.QCHAT_CFG = {
3
hidden: true
4
}
5
</script>
6
7
<!-- Quickley.Chat -->
8
...
9
<!-- /Quickley.Chat -->
10
11
setTimeout(() => {
12
Quickley('show');
13
}, 1000);
Copied!

hide

Hides Quickley Chat button if it visible.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('hide');
Copied!

open

Opens Quickley Chat Window. Calling of this method is similar to clicking Quickley Chat button.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('open');
Copied!

close

Closes the Quickley Сhat window. Calling this method is similar to clicking the Quickley Chat button while the Сhat window is open.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('close');
Copied!

sendAutoMessage

Sends message to a visitor. This method works only if a visitor doesn't have any active conversation.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('sendAutoMessage', 'Hello! Can i help you?');
Copied!

updateClientData

Specifies any information about visitors like email, phone or any kind of data. This info displays in the right panel in Quickley. This method is similar to the client_data parameter in the Quickley Chat configuration, but can be used at any time after Chat is initialized.
1
<!-- Quickley.Chat -->
2
...
3
<!-- /Quickley.Chat -->
4
5
Quickley('updateClientData', {
6
name: "John Dorian"
7
8
"Any kind of information's title": "Any kind of information's value"
9
});
Copied!