The project was built to address two challenges at the HackTrain VI hackathon, looking at simplifying how users could cancel and book tickets with a chatbot, and finding customers alternate routes to their destinations if trains are cancelled.
We chose a microservice architecture for the project, using a React with chatbot front-end, a Node.js API conversion server and a Node.js rerouting application.
We worked through the night developing the project, you can see our implementation of tasks at 2am, and 5am shown on the flow charts above. We built the conversion layer microservice to convert from SilverRail’s SOAP API into a cleaner JSON REST API that we could call from Azure bot services.
The user interacts with the chatbot, with the ability to cancel, refund or exchange tickets, or to find alternate routes (via train/underground, bus or walking) to their destination. Their request goes from the React.js front-end to the Azure Bot Services back-end which does natural language processing on the request, based on our trained model we created.
If the confidence level is high enough for their request, it’s sent on to our API abstraction microservice, which calls the SilverRail SOAP API and returns a prettier version of its response. If the request is successful, the user gets a confirmation. Otherwise, they’re prompted for more information, or shown cards giving them selectable options.