INTRODUCTION:
Makes chatbot menu options configurable so it can easy to maintain without a dev engineer. So we can add/edit existing menu options.
...
Status
...
Status | ||
---|---|---|
|
...
Owner
...
...
Contributors
...
...
Approved
...
Status | ||||
---|---|---|---|---|
|
...
Decision
...
Status | ||||
---|---|---|---|---|
|
...
It has the following advantages:
It will help with a faster deployment process.
Quick change based on the requirement and easy to deploy.
Any time/ anyone / any flow/menu text can change quickly.
Add/Edit change the text for Menu options.
Problem statement:
As a solution owner, I would want to deploy menu options faster without having to depend on a release on both portal and WhatsApp with the following details -
Able to change the text
Able to change the menu options (Add/edit/remove)
Able to create new flows/structure such as introducing new menu options which are not there
Able to change answers to queries
Able to add/edit/remove hyperlinks
Able to analyze the data after changes
...
💡 Research insights
It takes place for any owner can change the menu-driven flow for the chatbot and its full flex change any time without doing code change in a git repository.
📊 Solution hypothesis
It will help with a faster deployment process.
...
Quick change based on the requirement and easy to deploy.
...
Any time/ anyone / any flow/menu text can change quickly.
...
...
Design solutions:
Solution 1:
...
Solution 2
...
Overview
Using AWS container
Enable load and execute config from
...
aws container for a chatbot.
Make literals and
...
chart flow configurable.
Keep files in blob storage public accessible.
While doing a build for chatbot/router run the below commands in
...
the docker file
Code Block FROM node:10.19.0 as builder WORKDIR /app COPY . /app ADD http://source.file/config/literals /config/literals.js ADD http://source.file/config/chatflow /config/chatflow.js RUN npm install FROM node:10.19-slim COPY --from=builder /app . EXPOSE 4000 8443 CMD [ "node", "appRest.js" ]
For every build, it will download it from the blob and add it
/router/config/*
files.So now we can change
...
only those required files and do build and deploy
Benefits:
Easy to maintain, add, and modify any time Menu options and query answers.
Now it's configurable from outside chatbot so it's easier to deploy.
We can keep/maintaining all versions of files.
It will help to revert back to the old version of files if something went wrong with the new version of files.
Risks:
Only authorized users can upload and edit the config.
Only a tech person can do it over, Jenkins
Solution 2:
Using API (DB)
Store config in Database to fetch and update config. It all using
...
APIs to create and update config using a JSON object as the request body.
Code Block |
---|
Create
{{host}}/chatbot/config/create
Update
{{host}}/chatbot/config/update |
This will take place in
...
Jenkins job,
...
Any owner can update config
...
Link
...
.
...
Benefits
...
:
Easy
...
Now its configurable from outside chatbot so its more easier to deploy.
Below requirements will satisfy.
...
Able to change the text
...
Able to change the menu options (Add/edit/remove)
...
to create
...
Able to change answers to queries
...
Able to add/edit/remove hyper links
...
Able to analyse the data after changes
We can keep/maintaing all versions of files
It will help to revert back the old version of files if something went wrong with new version of files.
Only tech guys can do upload an
...
and update using API’s
Jenkins job to read and update config using
...
API.
non-tech guys can
...
easily update using API
Risks:
Can't revert back to the old version config.
Difficult to maintain
...
versioning of files.
✅ Follow up
Keep track of the discussion with the following status and steps.
...
Decision
...
Status
...
Next steps
...
https://project-sunbird.atlassian.net/browse/SB-21488
...
Status | ||||
---|---|---|---|---|
|
- POC
- Discussion with DC
- Implementation
- Verify