article by Frank Nimphius, December 2020

 

The attachment type is a useful feature of the System.CommonResponse component, especially when the messenger is rendering images as part of a conversation.

A feature I was looking for is the ability to add a title string or a header text. So far I helped myself by adding a text response before rendering the attachment response. Well, I've done that so far.

As of Oracle Digital Assistant 20.08, the attachment type supports the headerText property, which in combination with the footerText property can produce output as shown below.

As you can See, a text message is rendered before and after the image. The BotML for this is shown in the image below

Notice the headerText and the footerText properties. 

Note: The "\n"  character does not work on all messengers as a line break. The screenshot is taken using the embedded conversation tester in Oracle Digital Assistant. 

Related Content

Tech-Exchange Quick-Tip: Adding Channel Specific UI Extensions Using the System.CommonResponse Component ChannelCustomProperties Property (MS Teams Example)

TechExchange Quick-Tip: Using RAW Message Payloads in Custom Components to Leverage Channel Specific UI Extensions (MS TEAMS Example)

TechExchange Quick-Tip: How to Embed YouTube Videos In Oracle Digital Assistant Web SDK (Web Messenger)

TechExchange: Examples of using Channel-Specific Extensions on the Web

 

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

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

 

Author