Skip to content


Type Definitions


Configuration options to create the session.


  • Object


connectionParams Object
launchType String <optional> Takes "message" or "embed" as value. Defaults to "message".

"message" - launches the session in a new window (similar to session launch using Workspace app for Chrome).
"embed" - Embeds the session inside third party Chrome app.
container Object <optional> Appview element created inside third party Chrome app.

Applicable only when launchType is "embed".
bounds Object <optional> Sets a fixed width and height to the session.
autoresize boolean Should be set to false to give fixed width and height to session. By default, this value is set to true in which case the session is resized to match the size of appView element inside third party Chrome app or the new window.
width Number Width of the session specified in pixels. This value will be set only when autoresize is set to false.
height Number Height of the session specified in pixels. This value will be set only when autoresize is set to false.
preferredLang String <optional> Specifies the preferred language code to be used inside the session. If the language code specified is either invalid or unsupported then it falls back to "en".

Supported language codes : en, de, es, fr, ja, ko, ru, zh, zh-cn, zh-tw.

If the value is unspecified then the browser"s language code is used.


connectionParams full example:

    var appView = document.createElement("appview");

    var connectionParams = {
        "launchType" : "embed",
        "container": appView,
        "bounds" :{
            "width": "800",
        "preferredLang" : "ja" //Setting to Japanese

eventListener (event)

Listener to handle the events.


Name Type Description
event Object Object as appropriate to the eventType registered.


Name Type Description String ID of the session object
evebt.type String Event type triggered Object Data as appropriate to the event triggered

- onConnection
- onConnectionClosed
- onURLRedirection
- onError


Callback having the session object created.


Name Type Description
sessionObject Session Session object to interact with the session like register and handle events, start and disconnect.


function sessionCreated(sessionObject) {
//Handle session interactions like events, start, disconnect here.
//ICADATA has been constructed for example. Recommending to use StoreFront/WebInterface SDK to get ICA.
//Refer session.start() for more details.
    var icaData = {
    var launchData = {"type" :"json",value :icaData};

    function sessionResponseCallback(response) {
        console.log("start", response);



Callback that handles the response.


Name Type Description
response Object Response object


Name Type Description
response.success boolean Status of the method call. Holds the value true in case of success and false in case of failure. In case of failure, details of the error is set in the response object.
response.sessionId String Id of the session.
response.error String Reason for the failure of the method call.
Was this article helpful?