The Mobile & Digital Assistant Blog covers the latest in mobile and conversational AI development and engagement

TechExchange: How to Optimize The Display of Long Texts in Oracle Digital Assistant Web Messenger

Frank Nimphius
Master Principal Product Manager

article by Asaf Lev, April 2020

updated, May 2020 for Oracle Web SDK 20.51 and later

A good practice for messages in a bot conversation is to keep them short. Messenger have a limited area for displaying messages, so longer text responses cause the user to scroll as they read. Often also the full message is not needed for a user to understand and continue. This article explains how you can optimize longer bot messages displayed in the Oracle Web Messenger client to only show the message in full if the user clicks on a link or button. 

Image 1: Long message with hidden paragraphs 


Image 2: Expanded message with hidden paragraphs displayed



Related Content

Overview of the new Oracle Web SDK and its customization features in Oracle Digital Assistant 19.10 and later

TechExchange: Engage Users By Splitting Long Messages Into Short Ones. No More "too long; didn’t read"

TechExchange Quick-Tip: How To Use Custom Channel Properties With Oracle Web SDK Messenger To Add Custom Metadata To Bot Responses

TechExchange: Dynamically Changing the Audio Voice and Accent Used by Digital Assistant in Oracle Web SDK Messenger

TechExchange: All 2-Minutes Oracle Digital Assistant Tech Tip Videos on YouTube


Join the discussion

Comments ( 4 )
  • shruti Friday, June 5, 2020
    It is not working for me. I think there are many things which needs to be changed for websdk >20.5 in article. i did everything but its not working.
    Message is coming from skill and I am using system.Output to print the message.
  • Frank Nimphius Friday, June 5, 2020
    Don't think this is a problem on the SDK side. In your BotML you set multi line text as

    component: "System.SetVariable"
    variable: "setInsightsMessage"

    Then you print it as

    component: "System.Output"
    text: |-

    You should use "setInsightsMessage" as the variable. Also, since the variable holds an array, you need to iterate over it when printing the output

  • Shruti Saturday, June 6, 2020
    According to docs "The code below shows the JavaScript logic added to the same HTML document to handle the paragraph split." .
    in which file I need to add? index.html or setting.js.
    when I added the code of showhideparagraph and splitparagraph in setting.js many error came. chatbot was not getting reflected. when I added in index.html it was not giving any changes in chatbot output.

    in article you have called deletegate above the init call. but no where init is mentioned in new channels.

    can you mention which code needs to be added in which file. index.html, setting.js,web-sdk.js etc.
  • Frank Nimphius Monday, June 8, 2020
    Good point. In Oracle Web SDK < 20.5 this is the index.html. In Oracle Web SDK >= 20.5 this is indeed the settings.js file as all initialization code has moved here.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.