utilAPI

This object contains utility-related APIs.

This method hides the chat button.

By default, the chat button is always shown if no business hours are specified. If business hours are specified, the chat button is shown during business hours and hidden outside of business hours. To learn how to configure business hours, see Set Business Hours in Messaging for In-App and Web.

This command can override the default behavior.

You can't hide the chat button if the chat window is already showing. Also, this method doesn’t have session continuity. For example, after a refresh, the button returns to its initial state. If business hours are specified, this call overrides the current visibility only until the next business hours interval.

None.

This method shows the chat button.

By default, the chat button is always shown if no business hours are specified. If business hours are specified, the chat button is shown during business hours and hidden outside of business hours. To learn how to configure business hours, see Set Business Hours in Messaging for In-App and Web.

This command can override the default behavior.

This method doesn’t have session continuity. For example, after a refresh, the button returns to its initial state. Also, if business hours are specified, this call overrides the current visibility only until the next business hours interval.

None.

This API launches the web chat client with the messaging conversation window maximized. See Launch Chat.

None.

Use the event handlers of this method to perform actions after the chat client launches.

Event HandlerDescription
thenRuns actions if the web chat client launches successfully.
catchRuns actions when the web chat client launch fails.
finallyRuns actions after the chat client launches successfully or not.

This method returns a Promise object.