Build a Conversational Bot
Last updated
Was this helpful?
Last updated
Was this helpful?
BDK is a library of tools and intelligent API bindings that provides an ultra simplified configuration and authentication setup, intuitive message and room management, customizable message templating, and a new activities API that makes it easy to facilitate bot workflows. The BDK and bot project generated by the Symphony Messaging Generator makes it super easy to get started!
To begin let's open up the code generated for you by the Symphony Messaging Generator in your favorite IDE. Navigate to the BotApplication.java
file:
To build a conversational workflow, add the following datafeed listener (onMessageSent
) to your main bot class:
Above, we showed you a simple example of how to leverage the BDK to build a conversational bot. To see more advanced usage of the BDK in order to build complex financial workflows, continue on to our dedicated BDK Certification course:
The above snippet is listening for all incoming messages that contain "/hello". To see a full list of datafeed listeners provided by the BDK, navigate . If the message received by the bot contains "/hello", the bot will respond by sending a message to the stream or conversation in context. Run your bot and let's see it in action:
As you can see, it's super easy to access the message, room, and user context from an incoming event. The V4Initiator
and V4MessageSent
classes provide convenience methods that make it easy to orchestrate workflows. For a more detailed overview of how to leverage the BDK's message, room, and user management classes, continue .