Webchat API

We provide some API to control the user interface and functionality of webchat.

Usage of API


$sinitic.api(command, [, arg1[, arg2[, ...]]])

Parameters:

  • command
    The name of command. See the following list.

  • arg1, arg2, ...
    The arguments required by command.


List of Commands


openChat

    Display the chat window

    Arguments: none

closeChat

    Minimize the chat window

Arguments: none

toggleChat

    Switch between displaying or minimizing the chat window.

Arguments: none

setLang

Arguments:

  • langCode. String. 

We support the following display language:

Language

langCode

English

en

Traditional Chinese

zh_TW

Simplified Chinese

zh_CN

Japanese

jp

Vietmanese

vi

Indoesian

in

Thai

th


setTeam

Arguments:

  • teamId. String. The id of agent team.

pageTrack

    Record current page into browsing history. Agent can see the history in ChatCenter.

Arguments: none

trigger

    Trigger a specific dialogue flow.

Arguments:

  • triggerName. String. Defined in Bot Editor.



Was this article helpful?

Can’t find what you’re looking for?

The Sinitic team is here for you.

Contact Support