Using RAW Message Payloads in Custom Components to Leverage Channel Specific UI Extensions (MS TEAMS Example) by Frank Nimphius

image

Connectors in Oracle Digital Assistant ensure that the bot response is rendered best for different messengers. The foundation of this rendering is the conversation message model (CMM) that is the metadata used by Oracle Digital Assistant built-in components to define the bot user interface. The metadata is then transformed by connectors to the format expected by messengers like Facebook, Slack, MS Teams and many more. Custom components integrate with CMM through the MessageModel class in the Oracle custom component SDK.

Like when using the System.CommonResponse component channelCustomProperties component (as explained in another Oracle TechExchange article*), you can return a message payload from custom components that are messenger specific and that allow you to use layout extensions available on a specific messenger channel. By doing so, you bypass the payload format transformation in the channel connectors and instead post the payload “as is” to the messenger client.

In this article, I explain how you use the MessageModel’s RAW message format to send a channel specific layout. The example used is Microsoft Teams’ adaptive card layout.

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

Example

The image below shows the the output rendered by the custom component that you can download for this article. The custom component uses multiple text messages and an attachment message to print a confirmation for a pasta order. Read the complete article here.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.