Displaying content
Hosted Experience provides an interface for rendering HTML content that can support your digital human experience. This content should be provided in your conversation platform's intent response through the displayHtml Supported commands
Supporting content accompanying an intent response will continue to be displayed to users until the user minimises the supporting content box, or until it is replaced by new content through another intent response.
You can see examples of how this is provided for Dialogflow ES and Lex.
Note: Content within the html property is stringified, so this content must be escaped.
HTML & CSS may be included in your html instruction and will be rendered inside the content area.
You can hide the on screen content in two ways:
Programatically
Call the method uneeqUpdateDisplayContent(null) to hide the content programatically via javascript.
Conversation Response
Send a custom instruction from your NLP system with the value hideContent: true
Example:
For security reasons, Javascript will be removed from the provided html and not executed within your website, or inside the content area. There are some exceptions however; the following methods may be securely executed as part of onclick events:
Method | Example |
---|---|
uneeqAsk | <button onclick="uneeqAsk('question 1')">Question 1</button> |
uneeqEndSession | <button onclick="uneeqEndSession()">End Session</button> |
uneeqSetShowUserInputInterface | <button onclick="uneeqSetShowUserInputInterface(true)">Show Input</button> |