Thanks to Oracle A-Team, I had a chance to work with Chatbots.
3 pure NodeJS applications, on couple of Oracle Cloud platforms and Facebook messenger, and my chatbot was running.
Let me explain, the architecture a bit. To start with, following is the simple representation of how it works.

Message Platform Server : Is a NodeJS application, deployed on Oracle Application Container cloud, acts as a channel between Facebook Messenger and the chatbot engine. It simply converts the incoming messages from Facebook and sends it to chatbot readable format. Also, when chatbot replies, it converts to Facebook readable formats and passes it to messenger.
Chatbot Engine : Is a NodeJS application, which communicate with some REST APIs based on a conversation flow document and moves the flow of the conversation from one state to another.
Flow JSON : Where we document, every state of a conversation and which APIs to call to generate a response. For example, at the beginning of the conversation, start from "menu" state, and call "/start" API. The flow metadata file is driving the behavior of the bot engine. The bot engine uses a finite-state-machine (FSM) to drive the conversation. Every step in the conversation is modeled as a state, and all possible next steps to move the conversation to a next state are defined as state transitions. Every time a state is entered, the response elements defined for this state in the flow metadata are processed and the response is constructed and returned to the messaging platform.
Component APIs : Where several microservices are running, In my case I create a set of APIs, named Airport API which returns, starting from get flight info based on flight number, where is the check-in gate, baggage information, delayed flights etc.
Every component api should have a flow json, which defines that state transitions in the conversation and which APIs to call inorder to generate the response of the chat.
Now a bit more details about Component APIs and Flow JSON relationship.
In my case, Airport API, so I will explain my flow json in context to that.
First of all, below is the structure of each "state" in the flow json.

Each state has a "stateName", which generates a "response", using one or multiple component APIs. Optionally, it can also provides some options, which user can choose to further communicate with the chatbot.
Each of these options, generates an Event, which is mapped to another "state".
There is a special "state" called "stateTransitionError", it gets invoked when chatbot engine cannot translate/understand user input and it gives user option to navigate to the "start" state.
This is a simple, state transition map, only depicting a single flow.

Regarding the Flow, a multiple approach can be used, rather than writing a huge JSON document :
Here is a GIF of the running bot :
According to Oracle A Team, Oracle will soon release an intelligent bot cloud, which will be used then to replace the messaging platform server and chatbot engine.
3 pure NodeJS applications, on couple of Oracle Cloud platforms and Facebook messenger, and my chatbot was running.
Let me explain, the architecture a bit. To start with, following is the simple representation of how it works.
Message Platform Server : Is a NodeJS application, deployed on Oracle Application Container cloud, acts as a channel between Facebook Messenger and the chatbot engine. It simply converts the incoming messages from Facebook and sends it to chatbot readable format. Also, when chatbot replies, it converts to Facebook readable formats and passes it to messenger.
Chatbot Engine : Is a NodeJS application, which communicate with some REST APIs based on a conversation flow document and moves the flow of the conversation from one state to another.
Flow JSON : Where we document, every state of a conversation and which APIs to call to generate a response. For example, at the beginning of the conversation, start from "menu" state, and call "/start" API. The flow metadata file is driving the behavior of the bot engine. The bot engine uses a finite-state-machine (FSM) to drive the conversation. Every step in the conversation is modeled as a state, and all possible next steps to move the conversation to a next state are defined as state transitions. Every time a state is entered, the response elements defined for this state in the flow metadata are processed and the response is constructed and returned to the messaging platform.
Component APIs : Where several microservices are running, In my case I create a set of APIs, named Airport API which returns, starting from get flight info based on flight number, where is the check-in gate, baggage information, delayed flights etc.
Every component api should have a flow json, which defines that state transitions in the conversation and which APIs to call inorder to generate the response of the chat.
Now a bit more details about Component APIs and Flow JSON relationship.
In my case, Airport API, so I will explain my flow json in context to that.
First of all, below is the structure of each "state" in the flow json.
Each state has a "stateName", which generates a "response", using one or multiple component APIs. Optionally, it can also provides some options, which user can choose to further communicate with the chatbot.
Each of these options, generates an Event, which is mapped to another "state".
There is a special "state" called "stateTransitionError", it gets invoked when chatbot engine cannot translate/understand user input and it gives user option to navigate to the "start" state.
This is a simple, state transition map, only depicting a single flow.
The flow is written in Mustache(https://mustache.github.io/mustache.5.html). It is a simple “logic-less” template engine. It works by expanding tags in a template using values provided in a JSON object. It is "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. A state definition in mustache looks like this :
{"name": "flightDetails", "type" : "response"
,"responseItems" :
[ { "type":"prompt", "languages":
[{"language":"en","prompt": "Your flight departs at {{flowScope.departureTime}} , {{#isDelayed}} And, it looks like, your flight has reported a delay in departure. Sorry about that. {{/isDelayed}}"}
]
}
,{"type":"prompt","languages":
[{"language":"en","prompt": "Do you want, the following info on your flight?"}]
,"options" :
[{"payload" : { "event" : "immigrationInfo" }
,"languages" :
[{"language": "en", "prompt": "Immigration Info"}]
}
,{"payload" : { "event" : "checkinInfo" }
,"languages" :
[{"language": "en", "prompt": "Check-in Counter/Gate"}]
}
,{"payload" : { "event" : "onlineCheckin" }
,"languages" :
[{"language": "en", "prompt": "Online Check-in URL"}]
}
]
}
]
,"componentServices" : [{"name" : "getFlightDepartureTime"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "departureTime","scope": "flow"}]
}
,{"name" : "getIsFlightDelayed"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "isDelayed","scope": "request"}]
}
]
}
,"responseItems" :
[ { "type":"prompt", "languages":
[{"language":"en","prompt": "Your flight departs at {{flowScope.departureTime}} , {{#isDelayed}} And, it looks like, your flight has reported a delay in departure. Sorry about that. {{/isDelayed}}"}
]
}
,{"type":"prompt","languages":
[{"language":"en","prompt": "Do you want, the following info on your flight?"}]
,"options" :
[{"payload" : { "event" : "immigrationInfo" }
,"languages" :
[{"language": "en", "prompt": "Immigration Info"}]
}
,{"payload" : { "event" : "checkinInfo" }
,"languages" :
[{"language": "en", "prompt": "Check-in Counter/Gate"}]
}
,{"payload" : { "event" : "onlineCheckin" }
,"languages" :
[{"language": "en", "prompt": "Online Check-in URL"}]
}
]
}
]
,"componentServices" : [{"name" : "getFlightDepartureTime"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "departureTime","scope": "flow"}]
}
,{"name" : "getIsFlightDelayed"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "isDelayed","scope": "request"}]
}
]
}
Regarding the Flow, a multiple approach can be used, rather than writing a huge JSON document :
- Use Oracle Policy Automation to write the rules and state transitions
- Use Oracle BPM to define human taskflows
- Use a custom application where admin/business users can define the states and transitions, as well as pick up APIs from a catalog.
Here is a GIF of the running bot :
According to Oracle A Team, Oracle will soon release an intelligent bot cloud, which will be used then to replace the messaging platform server and chatbot engine.
This comment has been removed by the author.
ReplyDeleteWow Nice blog. It was really useful to create a messenger bot
ReplyDeleteChatbot Development Services USA,
ReplyDeleteWeb Designing Services USA,
iPhone App Development Services USA,
Android App Development Services USA,
iOS App Development Services in USA,
What you have written in this post is exactly what I have experience when I first started my blog.I’m happy that I came across with your site this article is on point,thanks again and have a great day.Keep update more information.
ReplyDeleteChatbot Company in India
Chatbot Company in Chennai
Chatbot Development Company in Chennai
Chatbot in Chennai
Chatbot Development Company in India
Thanks for sharing Information to us. If someone wants to know about,I think this is the right place for you!
ReplyDeleteAndroid App Development in Coimbatore
Chatbot Development Company
3D Animation Company
This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. chatbot online
ReplyDeleteThis is excellent details about chatbot. Great article
ReplyDeleteChatbot Services
voice chatbot
Chatbot Companies
Best AI Chatbot
Thanks for sharing very interesting post, I appreciate to blogger for amazing post.
ReplyDeleteMobile App Development Company in USA
outsourcingall.com "Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it.
ReplyDeleteThis paragraph gives clear idea for the new viewers of blogging, Thanks you. You’re doing a great job Man, Keep it up.
Seo training in bangladash
outsourcing training in dhaka
Best Website Development and Design Company in Bangladesh
free outsourcing training
graphic design training
digital marketing training
affiliate marketing training
outsourcing training
We have to thank and share such a nice blog post and interesting information. It is helpful for develop my knowledge, people always searching for this type of posts.
ReplyDeleteAI Chatbot
Chatbot Development
RPA Bot
Artificial Intelligence Company in Dubai
Thanks for sharing useful information.. we have learned so much information from your blog..... keep sharing
ReplyDeleteOracle Fusion HCM Online Training
Nowadays, the internet has made it a lot easier to learn from the comfort of home. cursos de ti
ReplyDeleteI think great site for these post and i am read the most of contents have useful for my Carrier.Thanks for these useful information.Any information are commands like to share him.
ReplyDeleteChatbot Company in Dubai
Chatbot Companies in Dubai
Chatbot Development
AI Chatbot Development
Chatbot Companies in UAE
Chatbot Company in Chennai
Chatbot Company in Mumbai
Chatbot Company in Delhi
Chatbot Development Companies
Claribot is an latest invention of Chatbot Development Company in Indiapowered by Claritaz, which is an answer-database enabled chatbot that helps in resolving customer-queries in a conversational fashion, incorporating keyword-based and semantic search.
ReplyDeleteAppsinvo was founded in 2015 and it is india-based company. Appsinvo is a Top Mobile App Development Company in India, USA and UK that develops unique, easy to use, high functionality and seamless operation that makes your web and mobile app more innovative. Since 2015, we have been delivering our services for the last 5 years in 120 countries and we have developed more than 300 mobile apps that makes more than 150 clients happy and satisfied with our services.
ReplyDeleteMobile App development company in Asia
Top Mobile App Development Company
Top Mobile App Development Company in Noida
Mobile App Development Company in Delhi
Top Mobile App Development Companies in Australia
Top Mobile App Development Company in Qatar
Top Mobile App Development Company in kuwait
Top Mobile App Development Companies in Sydney
Mobile App Development Company in Europe
Mobile App Development Company in Dubai
Someone essentially lend a hand to make severely posts I would state. That is the very first time I frequented your website page and thus far? I surprised with the analysis you made to create this particular submit incredible. Fantastic job!
ReplyDeleteAI Chatbot Development
Chatbot Development
Chatbot Development Companies
Chatbot Company
Chatbot Companies
AI Chatbot Companies
ReplyDeleteThanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle ADF . Actually I was looking for the same information on internet for Oracle ADF and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more aboutOracle ADF . By attending Oracle ADF Training .
Hello everyone!
ReplyDeleteDo you want to know how much chatbot development cost to get exceptional customer chatbot service to bring your business online. QSS Technosoft has well described about the estimation cost to develop chatbot solution.
Some really great tips here. Thanks for the post!best cloud server solutions in USA
ReplyDeleteSharing the same interest, Infycle feels so happy to share our detailed information about all these courses with you all! Do check them out
ReplyDeletebig data training in chennai & get to know everything you want to about software trainings.
Sharing the same interest, Infycle feels so happy to share our detailed information about all these courses with you all! Java Training in Chennai & get to know everything you want to about software trainings.
ReplyDelete