Add Live Experience to Oracle Digital Assistant

Add Oracle Live Experience to Oracle Digital Assistant.

Before you start

Before you begin, you already installed and set up Oracle Digital Assistant on your website and you are familiar with Oracle Digital Assistant, including its customer portal administration interface.
With Live Experience added to Oracle Digital Assistant, you allow your customers an affordable escalation path where they can progress their chat session with the chat bot to start a Live Experience audio or video engagement.

Chat bots are capable of handling simple customer issues, but by adding Live Experience to Oracle Digital Assistant, you enhance the customer's experience. If the chat bot isn't capable of resolving the issue, the chat bot invites the customer to talk with an associate or agent.

To complete the steps outlined here, you need the following:
  • A WebDAV client to insert remote code changes directly into the Oracle Digital Assistant Customer Portal views.
  • Login credentials and access URLs for the Oracle Digital Assistant Customer Portal.

Here's what to do

  1. Add the Live Experience widget into ODA.
    1. Download the Live Experience JavaScript SDK and extract live-experience-cp-widget-web.zip.
    2. Unzip live-experience-cp-widget-web.zip.
    3. Using your WebDAV client, upload the live experience widget into customer/development/widgets/custom.
    4. On the Customer Portal administration page, enter LiveExperience into the search bar in the top right corner. On the LXWidget page, in the TR corner, click Activate this version.
      This activates the Live Experience widget in the dev environment.
  2. Add the LX widget to the views where you want it to work.
    Modify customer/development/views/templates/fy17.php to include the following snippet, invoking the LX widget:
    ...
    <!-- Start ChatBot (ODA) inlay -->
    <rn:widget path="custom/templateSelector/chatBotInlay" />
    <!-- Start LX web widget -->
    <rn:widget path="custom/templateSelector/LiveExperience" {lx_server="emea.live.oraclecloud.com"} 
    lx_tenant="your_tenant_name" lx_client_id="your_client_id" lx_client_secret="your_client_secret" />
    Don't forget to specify your tenant in the above code snippet:
    • your_tenant_name is the name of your Live Experience tenant.
    • lx_client_id the client ID for your Live Experience application.
    • client_secret is the client secret for your Live Experience application.

    By default, the Live Experience widget uses the live.oraclecloud.com server. You can specify the https://emea.live.oraclecloud.com server by adding the lx_server parameter to the snippet.

  3. Customize the ODA widget to share chat-bot messages with the LiveExperience widget.
    In customer/development/widgets/custom/templateSelector/chatBotInLay/1.0/view.php, add the following code to the Bots.on('widget:opened' handler:
    Bots.on('widget:opened', function() {
     if (Bots.getConversation().messages != null &&
     Bots.getConversation().messages.length < 1) {
     Bots.sendMessage("Hi");
     }
     // Start LX-specific config
     const lxWidgetElement = $('.rn_LiveExperience').attr('id');
     const lxInstanceID = RightNow.Text.getSubstringAfter(lxWidgetElement, 'rn_');
     const widget = RightNow.Widgets.getWidgetInstance(lxInstanceID);
     if (widget) { 
     Bots.on('message:received', widget.interceptAgentRequest.bind(widget));
     } else { 
     console.warn("Couldn't find LX widget");
     }
     // End LX-specific config
    }