Essentially, what we're trying to achieve here is how to start a co-browse-only support session initiated from the Agent side. The following example illustrates a short-code input from a custom Agent Console (which is generated on the Consumer page and given to the agent).
Session Provision - PHP
Send a POST request to /gateway/sessions/session and grab the session token ID.
-- You can use cURL in a PHP script to achieve this.
NOTE: Make sure you have set the right web application ID in your LA server's WPF!
On Consumer side send a PUT request to /assistserver/shortcode/create.
Send a GET request to /assistserver/shortcode/agent with short-code which will give us the CID.
-- For the request you need to specify the
appkey parameter and give it a short-code as the value.
Start support from Agent end with co-browse only using the CID and session token.
-- For the
AssistAgentSDK.startSupport() parameters, you can specify with the following:
Feel free to console log if you wish to view the values before the support session is initiated.
You will need to setup the co-browsing container. It's a good idea to do this before you start support. This can be achieved with
AssistAgentSDK.setRemoteView($share) and specifying the target div element as the parameter.
Once a support session has started, you should request a screenshare with the Consumer with
It may be useful to know when the consumer has joined the support session e.g. you might want to display some additional controls which are only available in screenshare. If so, this can be achieved as follows:
In this example you can see that the screenshare request method has been commented out, and the visibility of an element is toggled to show.
Other useful callbacks you may wish to include are: