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 |
|
Traditional Chinese |
|
Simplified Chinese |
|
Japanese |
|
Vietmanese |
|
Indoesian |
|
Thai |
|
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.