Configuring the Web SDK

This section describes how to set up and load the SDK for JavaScript to access the web services supported by the SDK.

Prerequisites

Before setting up the SDK for Javascript to invoke web services using the API, verify that the configuration you are using is a customer interface provided by Nuance.

Setting up the Web SDK

Here are the basic steps you need to follow when configuring the Web SDK:

  1. Host the Web SDK Bootstrap file on your site.

  2. Add a script tag to your page that has a source pointing to the Web SDK JavaScript file:

                        < script src = ”build / nuan_websdk_bootstrap.js” >  <  / script >
                    
  3. Add a link tag to your page that has href pointing to the websdk build CSS:

                        < link rel = "stylesheet" type = "text/css" href = "build/nuance-chat.css" >  <  / link > /p>
                    
  4. Configure your page to call the following methods:

    1. NuanMessaging.initializeMessagingSDK: Invoke with the parameters that will be given by Nuance and a callback to a function on your page. For example,

                                  NuanMessaging.initializeMessagingSDK("west", "tagserverv3", "1112233", CBfunction() {})
                              
    2. NuanMessaging.getAndSetSDKConfig: Defines client specific configurations. They are included in the WebSDK repository configuration document. For example,

                                  NuanMessaging.getAndSetSDKConfig().siteID = 10003715;
                              
    3. NuanMessaging.loadChatAssets(): Injects the sandboxed iFrame. For example,

                                  NuanMessaging.loadChatAssets(): Injects the sandboxed iFrame
                              
    4. NuanMessaging.getAndSetSDKConfig().enableCustomC2CRendering: If you are using the Nuance embedded plug-in, then host it on your page and call it with the function.

Note: This is the standard configuration to be configured on your machine. Additionally, your Nuance Deployment Engineer can help you set up your chat experience and targeting rules.