Controlling the Widget
Use the Javascript API to control widget behaviors
RepAI("init", api_key, options?)
RepAI("init", "<API_KEY>", {
/**
* Whether or not to hide the widget initially.
*
* Defaults to false.
*/
hidden: false,
/**
* Which side to render the widget on, 'left' or 'right'.
*
* Defaults to 'right'.
*/
position: "right",
/**
* Whether or not to connect the widget on init, or manually later.
* If the client has recently connected, they will connect anyway
* despite this setting to allow for navigation and refreshes.
*
* Defaults to true.
*/
connect: true,
/**
* Which design to use for the launcher, 'pill' or 'video'. Pill
* is the small circle design that is used on smaller devices.
* Video is the larger widget. Even if 'video' is specified,
* 'pill' will be used on smaller devices.
*
* Defaults to 'video'.
*/
launcher: 'pill',
/**
* Class name to use as selector for sensitive elements, causes
* them not to be sent when viewing a visitor's screen. Should not
* include selector characters like . or #, cannot be an arbitrarily
* complex selector.
*
* Defaults to 'sb-block'.
*/
blockClass: "sb-block",
/**
* How the widget initializes itself. It has three possible values.
*
* "retrigger" The widget will re-establish its session on each page load.
* This is the default mode.
*
* "iframe-jit" The widget loads the page into an iframe
* when an agent connects. After that the widget will be continuously
* connected as they navigate the site.
*
* Defaults to 'retrigger'
*/
mode: "retrigger"
})RepAI("show")
RepAI("hide")
RepAI("expand")
RepAI("alert", options?)
RepAI("dial")
RepAI("bookMeeting")
RepAI("connect")
RepAI("disconnect")
RepAI("showPopup", options?)
RepAI("startJourney", options)
Last updated
Was this helpful?