Returns the current page, this method respects page redirection.
Returns the current page without respecting page redirection.
Returns an array of all operators with their current status.
Returns all page redirections.
Returns the company's pages.
Replaces the current page by the one described by the provided pageId. See PageAPIPage for more information on how pages in livesupp work and what they mean. It's like replacing a page by a pointer to another page. Example:
Assume the customer is on a page with id 1.
switchPage gets called with pageId 3
From now on, when the customer visits a part of the website that matches to the page with id 1, it gets replaced by the page with id 3.
However, if the customer's page gets matched to a page with id 2, it does not get replaced. To turn off this behaviour on the visited page, use stopRedirectingPage
If you want the redirection to stop at a point in time, use the expiration parameter. The default behaviour is that the redirection does not expire.
Optional options: { Optional expiration?: DateSelects an operator. The customer can only have one selected operator at any moment. The selection may fail, for example when the operator is not available at the moment. If it fails, the return value is false, otherwise the return value is true.
Makes an offer to start a conversation to an operator - preferably the selected one.
Optional options: { pairAnyOperatorOfPage if false, starts a conversation with the selected operator, else with any available operator, default is false
placeInQueueIfNotPossible if true, in case the operator is not available, it places the customer in a queue, else it fails silently, default is false
Optional pairOptional placeTODO: add docs
Generated using TypeDoc
Description
This API allows websites to customize the behaviour of Livesupp through front-end JS on the customer's side.