This object contains settings available in the Messaging for Web code snippet. See Get Started With APIs for Messaging for Web.

This property shows or hides the chat button at load time.

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.

When specifying this value, it overrides this default behavior. To retain the default behavior, omit this line.

The chat button returns to this same initial state after the chat window closes.

If set to true, this setting clears an active messaging session when the user navigates to a page configured with a Messaging channel that's different from the one used to initialize the session. After the session clears, the client retrieves the user’s conversation history for the current channel only. If this setting is set to false, the session isn’t cleared after the client switches Messaging channels and the client fetches the user’s conversation history across all channels.

For example, let’s say that you have two Messaging channels, one for unverified users and one for verified users. In this case, when a user starts a conversation as an unverified user and then becomes verified by logging in, the Messaging channel changes. If this setting is set to true, the session clears and the Messaging conversation window closes after the user becomes verified. When the user clicks the chat button again, the client retrieves the history of the user-verified channel. If you configured automated responses for both channels, after the client clears the previous session, the session starts with the automated response of the current channel.

The default is false.