Visitor Side API (JavaScript) Reference
- 10 Articles
- Updated on Apr 26, 2022
- Published on Mar 11, 2022
Get Started
Where to define code
To use Comm100 Live Chat API, you can either write the code on your own page, or define the code
in your Control Panel. If you define the code on your own page, the code will be available for
chat button, invit...
- Updated on Jul 26, 2022
- Published on Mar 11, 2022
General
Site ID
You can use API to get ID of your site, example is shown below:
/** @type {number} */
const siteId = Comm100API.get('livechat.siteId');
All Campaign ID
You can use API to get all IDs of campaign used on current page. Not...
- Updated on Mar 11, 2022
- Published on Mar 11, 2022
Chat Button
Visibility
Get
To know whether a specific button is visible or not, you could use the following API:
/** @type {string} */
const campaignId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
/** @type {boolean} */
const isVisible = Comm1...
- Updated on Jun 13, 2023
- Published on Mar 11, 2022
Invitation
Display
Event
Comm100 Live Chat API provides event when invitation shows:
Comm100API.on('livechat.invitation.display', function (invitation) { });
Here, invitation is an object containing useful info about current invitatio...
- Updated on Sep 24, 2025
- Published on Mar 11, 2022
Pre-Chat
Skip PreChat
To skip pre chat:
/** @type {boolean} */
const isPrechatSkipped = true;
Comm100API.set('livechat.prechat.isSkip', isPrechatSkipped);
Please notice that prechat forms need to be filled with correct data to ensure that...
- Updated on Jan 3, 2024
- Published on Mar 11, 2022
Chat
Chat Status
You could use the following API to listen to chat status changes:
Comm100API.on('livechat.chat.start', function (chatGuid) { });
Comm100API.on('livechat.chat.end', function () { });
Here, when chat starts, the callback wi...
- Updated on Jun 13, 2023
- Published on Mar 11, 2022
Post-Chat
Fields
Get All Fields
You could get all fields in postchat using API:
/** @type {string} */
const campaignId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
/** @type {Array
- Updated on Mar 11, 2022
- Published on Mar 11, 2022
Offline Message
Fields
Get All Fields
You could get all fields in Offline Message using API:
/** @type {string} */
const campaignId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
/** @type {Array
- Updated on Mar 11, 2022
- Published on Mar 11, 2022
Side Window
Display
To see if side window is visible, you could use the following API:
/** @type {boolean} */
const isVisible = Comm100API.get('livechat.sideWindow.isVisible');
To set the visibility of side window, you could use the follo...
- Updated on Nov 29, 2022
- Published on Mar 11, 2022
SSO (Single Sign On)
Artifact
Get
To get the artifact you set in, you could use the following API:
const artifact = Comm100API.get('livechat.sso.artifact');
Set
To set artifact for sso login, you could use the following API:
const ...