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

TechExchange: How-to Populate a Common Response Component Iterator from a Custom Component

Frank Nimphius
Master Principal Product Manager

Sample by Frank Nimphius, February 2018

For bots to do anything useful, they need to integrate with data queried from remote systems. The most popular option for this is to query and write data through REST services and JSON payloads.

This sample explains how you populate a context variable defined in BotML with an array from a custom component. The variable then is referenced from a Common Response component (CRC, or CR component) to display a list of choices. The sample does not contain the REST connector call but starts from a JSON string representing an array of fruits.

Note that explaining ow to access REST services from custom components through connectors in Oracle Oracle Mobile Clou Enterprise is subject to a separate blog article here in TechExchange. This article focuses on how to pass data to the BotML so the CR component can render the structured information as not all data is a series of strings only. 

At runtime, the sample bot displays the list of fruits for a user to select from (Figure 1). Notice that the list label is different from the selected value ("Yellow Banana" vs. "banana"). The CR component allows you to have labels that are different from the actual value set to a bot context variable (or multiple variables as you can save more than a single value from a list).

Download the Sample and Readme (ZIP)


Update note:


Oracle Intelligent Bots has been rebranded Oracle Digital Assistant to better describe its capabilities beyond a standard chatbot. To learn more, visit cloud.oracle.com/digital-assistant

Related articles

TechExchange - Custom Component Development in OMCe – Getting Up and Running Immediately

Join the discussion

Comments ( 1 )
  • Derrick Monday, March 22, 2021
    Thank you Frank, your youtube tutorials and clean code has helped me build some interesting Custom Components.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.