By default, the Talkative functionality is accessed within the default Talkative UI.
The Talkative Engage API allows you create your own triggers and logic and embed them within any existing web element on your website.
Note: You must first specify the :api-features
attribute in order for the API to work. Please read https://support.talkative.uk/technical/adding-scripts for further information.
TalkativeEngageApi Class
The Class provides basic information about the interaction, QOS and feature initiation methods.
Class Properties
Object Property | Description |
---|---|
companyUuid | Unique id for your company or agent queue set for this page. |
interactionUuid | Unique id for the current interaction. Only available when an interaction is live. |
quickRef | Quick reference for the current interaction. Only available when an interaction is live. |
qos | Shows the availability of each interaction type based on offering optimal service to the customer. Data example shown below. |
TalkativeEngageApi.qos
output:
qos: {
chat: true,
cobrowse: true,
video: true,
voice: true
}
Class Methods
readyCallback
TalkativeEngageApi.readyCallback()
Customer specified callback which is called once all checks have been performed and the software is ready to begin. Returns Object which contains qos information.
isActive
TalkativeEngageApi.isActive()
Returns true
or false
based on whether there is an active interaction.
startChat
TalkativeEngageApi.startChat()
This method allows you to start a chat session.
startCobrowse
TalkativeEngageApi.startCobrowse()
This method allows you to start a cobrowsing session.
startEmail
TalkativeEngageApi.startEmail()
This method will open the email form.
startVoice
TalkativeEngageApi.startVoice()
This method allows you to start a web call session.
minimise UI
window.TalkativeEngageApi.collapseUi()
This method allows you to minimise the UI during an interaction.
Examples
Below is a real life example of how the the Talkative functionality can be embedded into existing website elements:
<button onclick="TalkativeEngageApi.startVoice()">Call us now!</button>
<button onclick="TalkativeEngageApi.startChat()">Start a chat with an expert!</button>
readyCallback can be setup by declaring the function above the Talkative Engage Tag. For example:
window.TalkativeEngageApi = {
readyCallback: function (results) {
console.log('We are ready to begin!', results.qos);
}
}