Cookies

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Widgets Developer's Guide for version Current of Widgets.

Learn which session cookies are used by Widgets in Genesys Cloud CX to restore chat sessions, track the state of the UI, store a customer's decisions, and more.

Related documentation:

Purpose

Genesys Widgets uses cookies to store non-sensitive data in the browser. The end-user's browser must allow cookies for Genesys Widgets to operate properly. Each cookie is required, and without the ability to read and write these cookies, Genesys Widgets features will not function properly.

Cookie creation

All cookies start with the prefix _genesys.widgets to easily identify them. By default, Genesys Widgets cookies are created in a way that allows the cookies to be read across sub-domains by setting the domain attribute in the cookie options. We derive the proper domain value by parsing the host site's domain and extracting it.
Important
Genesys Widgets never stores Personally Identifiable Information (PII) in its cookies.

Duration

All cookies used by Genesys Widgets are created as session cookies and will be deleted when the user's browser is fully closed.

Sub-domains

Normally, cookies cannot be transferred between sub-domains of a website unless they are configured to do so. Genesys Widgets automatically detects the domain of the host site and configures all cookies to be transferable between sub-domains. For example, you could start a chat on testsite.com and restore that chat session on store.testsite.com, support.testsite.com, or portal.testsite.com.

Cookie support in test environments

Genesys Widgets uses special cookies that persist across sub-domains. This is a critical feature for plugins like WebChat that need to restore an active chat session while navigating around a website. The side effect of using this type of cookie is that they won't work when using test environment domain names such as localhost or an IP address. You must use a fully qualified domain name (FQDN) such as localhost.com or any other variant that can be identified as a domain name. Cookies will also fail to work if you run the test site as an HTML file path directly in the browser.

One workaround is to update your system's hosts file to create an FQDN alias for localhost, your test environment's name, or an IP address.

Example

  127.0.0.1       localhost
  127.0.0.1       localhost.com

A fully qualified domain name (FQDN) such as localhost.com or any other variant that can be identified as a domain name is not mandatory, but it is recommended. This way, the cookies will also work when using test environment domain names such as localhost or an IP address.

List of cookies

The following is a list of cookies used by Genesys Widgets.

App

Cookie name Purpose
_genesys.widgets.app.autoLoadList Contains a list of active plugin names that are updated based on the usage of widgets during deployment. This is to ensure that a widget is auto-loaded during a page refresh or page navigation when there is an active session associated with it.

Console

Cookie name Purpose
_genesys.widgets.console.session Contains the active Console plugin open/close state.
_genesys.widgets.console.commandPlugin Contains the selected plugin name from the Commands section.
_genesys.widgets.console.command Contains the selected command to run from the Commands section.
_genesys.widgets.console.eventPlugin Contains the selected plugin from the Events section to listen for events.
_genesys.widgets.console.event Contains the selected event type to listen against, from the Events section.
_genesys.widgets.console.optionsArea Contains the command options to send when executing a command.
_genesys.widgets.console.activeSubscriptions Contains the list of all active event subscriptions listening via the Console plugin.
_genesys.widgets.console.windowPosition Contains the position of the Console plugin on the screen.

WebChat

Cookie name Purpose
_genesys.widgets.webchat.state.open Contains the WebChat Widget open or close state for internal tracking purposes.
_genesys.widgets.webchat.metaData Contains all the metadata details related to the current active chat session.
_genesys.widgets.webchat.state.filters Contains any prefilters that were added using WebChatService plugin commands addPrefilter or sendFilteredMessage.
_genesys.widgets.webchat.state.minimized Contains the WebChat Widget minimized or maximized state for internal tracking purposes.
_genesys.widgets.webchat.autoInvite.disabled Contains a value that disables or enables the WebChat autoInvite feature. It is dynamically updated based on the user's response to the initial WebChat invite.
_genesys.widgets.webchat.state.lastMessageCountRead Contains the number of messages that are read during an active chat session that calculates the number of unread messages when WebChat is minimized. It is automatically cleared whenever the WebChat Widget is maximized or closed/ended.
_genesys.widgets.webchat.state.asyncUnreadMessageCount Keeps track of the number of unread messages related to an Async Chat, when WebChat is minimized. It is cleared whenever the WebChat Widget is maximized by the user to read the new messages.
_genesys.widgets.webchat.state.purecloud-v2-sockets.JWtoken Used only with PureCloud V2 API, containing the JWT token related to the current active chat session.
_genesys.widgets.webchat.state.purecloud-v2-sockets.ConversationID Used only with PureCloud V2 API, containing the active conversation ID related to the current chat session.
_genesys.widgets.webchat.state.purecloud-v2-sockets.MemberID Used only with PureCloud V2 API, containing the user ID of the WebChat Widget related to the current active chat session.
_genesys.widgets.webchat.state.purecloud-v2-sockets.WS_URL Used only with PureCloud V2 API, containing the WebSocket event stream URI for listening to new incoming messages.
_genesys.widgets.webchat.state.purecloud-v2-sockets.LastMsgId Used only with PureCloud V2 API, containing the last unique ID of the message sent in the WebChat Widget.
Retrieved from "https://all.docs.genesys.com/WID/Current/GCDeveloper/Cookies (2024-03-19 03:31:42)"
Comments or questions about this documentation? Contact us for support!