• Release Notes
  • User
  • Admin
  • Developers
  • Integrations

›JS API

General

  • Overview
  • LiveView / CoBrowsing / Session Recordings

JS API

  • Overview
  • CoBrowsing
  • LiveView / Session Recordings
  • WebChat
  • Web Calling
  • Video Conference
  • Logging
  • User
  • Team
  • API
  • Supported Browsers
  • Supported Technologies

Android

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

iOS

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

Flutter

  • Overview
  • Installation
  • Usage
  • Reference

Capacitor

  • Overview
  • Installation
  • Usage
  • Reference

JavaScript API - General API

Action rule matched

Get an array of matched ActionRules.

This array will only include rules which contain a 'Javascript Event' condition and have matched.

The name shown can be specified in the 'Javascript Event' condition itself.

An implementation example can be found here.

CV.api.hasActionRuleMatched(function(result) {
    // result is an array of matched action rules
    console.log(result);
});

Agents online

Checks whether agents are online and available

CV.api.isAgentOnline(function(result) {
    // result is either true or false
});

WebChat should be shown

Checks whether the WebChat should be visible according to rules

Once

This method checks once if the chat should be visible and calls the callback function if true

CV.api.shouldShowWebchat(function(){
    // Chat should be visible
}, function() {
    // Chat should not be visible or an error happened while checking
});

Continously

This method checks if the chat should be visible continously and calls the callback function once a rule evaluates to true

CV.api.shouldShowWebchatInterval(function(){
    // Chat should be visible
}, function() {
    // Chat should not be visible or an error happened while checking
});

Authentication

In order to authenticate against the Chatvisor API for certain requests (e.g. list of active users) it is required to set a user token before the request.

CV.rest.auth("my-user-token", true)
PropertyTypeDescription
tokenstringToken generated for this user in the settings
persistbooleanAuthentication is saved in the localStorage object instead of sessionStorage (optional; default: false)
← TeamSupported Browsers →
MANUALS
User Manual: Sales Suite
Admin Manual: Sales Suite
User Manual: Support Suite
Admin Manual: Support Suite
DEVELOPERS
Integrations
REST API
SDK API
LEGAL
Privacy Policy
Terms and Conditions
Imprint
Engage
Copyright © 2024 TeamViewer Austria GmbH