Citizen Feedback Chat Bot - Technical Documentation
Objective
To provide user facilities to raise a complaint, provide their valuable feedback and rate the service through chat bot experience.
The Main Landing Page of Feedback Bot will appear like the image below which contains three options- Raise a Complaint, Provide Feedback and Rate the Service along with the FAQ's section.
Technical Implementation details:
The screen has been developed using the new-UI structure.
The link for the Feedback Bot Main Index is given below, it can be used to understand the starting point of the flow:
CF (Citizen Feedback) Module has been segregated into a specified structure, All the atoms and molecules are added under there respective folders in react-components, and the configurations is mentioned in config.js file. All the routing related to CF module are handled in index.js file in citizen folder. Below is the snippet for folder structure.
MDMS data:
For FAQs section data is being imported from MDMS, For calling of MDMS data React Hooks has been used, so that it could be shared throughout the modules. Below is the little code snippet for the call used for MDMS.
const { data: faqData, isLoading } = Digit.Hooks.pt.useMDMS(Digit.ULBService.getStateId(), "XstateWebChatbot", "FrequentlyAskedQuestions", {});
Below is the link for the MDMS data for FAQs section:
Localization :
Localization keys are added under the ‘rainmaker-cf’ locale module. In future, if any new labels are implemented in the Citizen Feedback then those should also be pushed in the locale DB under rainmaker-cf locale module.Below is the example of few locale labels.
API Used :
In Citizen Feedback Chatbot module webSocket have been used for making the connection with the backend. Below is the URL used for webSocket connection:
ws://dev.digit.org/xstate-webchat