A website tagged with Glance cobrowse or use the Glance cobrowse injector on a website.
Authentication
Glance uses a form of authentication for external applications we call LoginKey https://help.glance.net/integrations/login-key/integration_loginkey/. LoginKey's are temporary keys (think JWT) that allows access to Glance services from external platforms and are included in the request body when making a POST request. A requirement of using this package is to provide a URL that can be called to retrieve a loginkey for use by a user.
Definitions:
Glance Group - This a numerical value assigned by Glance for your enterprise or BU.
PUID - Partner userid, this is a unique value per user, shared between Glance and a remote system. This value must be unique per user within a Glance group. This is often the user's SID or SSO account ID.
When using this plugin, authentication is fully up to your system/scenario. Glance has provided some example code to get you started https://help.glance.net/integrations/login-key/integration_samples/ , yours can be written in any lanuage you like, but upon sucessful authentication of the requesting user, your auth url should return a valid loginkey to be used with this component. A simple exmaple of this is to wrap the code below in a simple "is the requesting user logged in" logic check, if true, return the loginkey, if not send 403 etc. You can verify your LoginKey result using the validator on this page https://help.glance.net/integrations/login-key/login_check//
You will need to setup a service such as a node express POST request
to generate a Glance loginkey. The loginkey will give your agent
access to the AgentJoin page for Cobrowse.
Required. Enter your Glance Group ID (unique ID assigned to your company by Glance).
authurl
string
Required. Enter the URL to your login key service.
puid
string
Required. Identifies the Glance user.
openlocation
string
tab (default) opens agent viewer in new tab.window opens agent viewer in new browser window.
pressence
boolean
Optional. Determines if presence is enabled. If undefined, presence is set to off. false (default) pressence is off, true presence is on.
glancebaseurl
string
Optional. Used if testing early release features on the glance beta platform. production (default) or beta
visitorid
string
Required when pressence is set to true. Unique identifier that is used to lookup the visitor and change the state of the Join button.
debugmode
boolean
Optional. true turns on console logs to assist in debugging. false (default) turns off console logs.
custominvoke
object
Optional. A Presence Agent can invoke Javascript functions defined on the Visitor's web page by providing an object that defines the following parameters: func name of the function, args function arguments. See below for more detail and an example.
presessionfunc
function
Optional. In case you need to do some work before a signaling the visitor to accept terms, you can pass a javascript function to this property. See below for more detail and an example.
Presence
In order to allow for agent initatied sessions, Glance has created its Presence services framework. This service allows agents to "signal" visitor browsers to do thigs like start sessions, execute custom code, and so on. Each visitor is unqiuely identified within a Glance groupID using a unique vistor_id value. Visitors are "present" when they are actively focused on a browser tab that has Glance Cobrowse enabled and active or when focused inside a mobile app (Andorid/iOS SDK). An agent can click on the Join button when a visitor is present to initiate a session reqeust to that user. This concept is usually invoked when an agent in the app/crm is contextually "looking" at a record such as an account/contact/lead etc. for that visitor and wants to cobrowse with that user.
Definitions:
VisitorID - This is a unique value for the web visitor. This can be up to 62 digits in length, generally a hashed customer UUID format. This value is shared between the web property and the agent CRM for a given user.
Join Button - This is the UI component the Agent interacts with. It has a few states such as visitor present and not present. The button will be Blue when a visitor is not present currently, this allows teh agent to use the code methods to cnnect with a visitor/guest.
The VISITOR_ID should be set dynamically as a prop to the React component based on a known value that is atatched to a customer profile. Following React lifecycle methods, the UI state will update when a new value appears as the VISITOR_ID. You can set this property dynamically when an agent is viewing a record such as a case or contact record that is specific to a customer or action they are working on.
The visitor side (browser) publishes a visitor_id, the agent side subscribes to that same string in order to determine if the user is availible. More detail can be found here https://help.glance.net/glance-cobrowse/glance-cobrowse-customizing/presence/presence_visitor/
Custom Presence-Invokable Functions
Visitor's Page:
GLANCE_COBROWSE.Custom = {
customFunctionName: function (params) {
// Do custom things on visitor's page.
}
}
You can pass a reference to a function into this prop if you want to handle some work
prior to signaling the visitor's page to show terms. For example, if you need to fetch some user information from
a database or generate a custom key to set on the visitor's session.