Include the installation script before the </body>
tag on every page you want Adam to show, replacing CLIENT_ID
with the relevant community ID:
The below describe the options and methods that can be called in the Widget API to customize behaviour of the chat widget.
The below methods can be called:
init(reference, options)
Initializes Adam, and returns the instance.
It takes two arguments:
reference
: A unique reference for the instance (use adam
if unsure):
options
: An options object to configure the widget (clientId
and source
are mandatory):
You can find more options to customize the widget below.
remove()
Disconnects the chat and removes it from the page:
In order to initialize the chat again, you must use the init() method detailed above.
openChatWindow()
Acts like a click on the Adam launcher, opening the chat window. This can be especially useful for mobile, where you might not want the launcher button to show - rather you can create a custom element and trigger the opening of the chat window programatically:
closeChatWindow()
Closes the chat window:
These values enable you to tailor the widget to your requirements.
clientId
string
This is a mandatory field. Pass the clientId relating to your community.
source
string
This is a mandatory field. Pass one of the following values to identify the channel that the conversations is being held on:
clientInfo
object
You can optionally pass a clientInfo
object to initiate the chat with the user information pre-loaded (e.g. for use in resident portals in logged-in state):
string
: user’s first namestring
: user’s last namestring
: user’s registered phone numberstring
: user’s registered email addressstring
: apartment numberstring
: property addresscolors
object
You can optionally pass a colors
object to tailor the colors used in the widget to your brand:
string
: 6-digit HEX or RGB stringstring
: 6-digit HEX or RGB stringstring
: user’s 6-digit HEX or RGB stringWhen passing a colors
object, the icon on the launcher button will change from the Travtus T logo to a message bubble.
breakpoint
number
This is the resolution at which the chat window should switch from full screen (mobile view) to an overlay in the bottom right (desktop view). Defaults to 769
(tablet portrait).
Mobile view:
hideLauncherOnMobile
boolean
You can choose to hide the launcher button on mobile, and to instead open the chat window programatically using the openChatWindow()
method. This defaults to false
.
hideFooter
Example with all options passed:
Include the installation script before the </body>
tag on every page you want Adam to show, replacing CLIENT_ID
with the relevant community ID:
The below describe the options and methods that can be called in the Widget API to customize behaviour of the chat widget.
The below methods can be called:
init(reference, options)
Initializes Adam, and returns the instance.
It takes two arguments:
reference
: A unique reference for the instance (use adam
if unsure):
options
: An options object to configure the widget (clientId
and source
are mandatory):
You can find more options to customize the widget below.
remove()
Disconnects the chat and removes it from the page:
In order to initialize the chat again, you must use the init() method detailed above.
openChatWindow()
Acts like a click on the Adam launcher, opening the chat window. This can be especially useful for mobile, where you might not want the launcher button to show - rather you can create a custom element and trigger the opening of the chat window programatically:
closeChatWindow()
Closes the chat window:
These values enable you to tailor the widget to your requirements.
clientId
string
This is a mandatory field. Pass the clientId relating to your community.
source
string
This is a mandatory field. Pass one of the following values to identify the channel that the conversations is being held on:
clientInfo
object
You can optionally pass a clientInfo
object to initiate the chat with the user information pre-loaded (e.g. for use in resident portals in logged-in state):
string
: user’s first namestring
: user’s last namestring
: user’s registered phone numberstring
: user’s registered email addressstring
: apartment numberstring
: property addresscolors
object
You can optionally pass a colors
object to tailor the colors used in the widget to your brand:
string
: 6-digit HEX or RGB stringstring
: 6-digit HEX or RGB stringstring
: user’s 6-digit HEX or RGB stringWhen passing a colors
object, the icon on the launcher button will change from the Travtus T logo to a message bubble.
breakpoint
number
This is the resolution at which the chat window should switch from full screen (mobile view) to an overlay in the bottom right (desktop view). Defaults to 769
(tablet portrait).
Mobile view:
hideLauncherOnMobile
boolean
You can choose to hide the launcher button on mobile, and to instead open the chat window programatically using the openChatWindow()
method. This defaults to false
.
hideFooter
Example with all options passed: