DIGIT Core
PlatformDomainsAcademyDesign SystemFeedback
2.8
2.8
  • โ˜‘๏ธIntroducing DIGIT Platform
    • DIGIT - Value Proposition
  • Platform
    • ๐Ÿ”ŽOverview
      • Principles
      • Architecture
        • Service Architecture
        • Infrastructure Architecture
        • Deployment Architecture
      • Technology
        • API Gateway
        • Open Source Tools
      • Checklists
        • API Checklist
        • Security Checklist
          • Security Guidelines Handbook
          • Security Flow - Exemplar
        • Performance Checklist
        • Deployment Checklist
      • UI Frameworks
        • React UI Framework
    • ๐Ÿ”งCore Services
      • Workflow Service
        • Setting Up Workflows
        • Configuring Workflows For An Entity
        • Workflow Auto Escalation
        • Migration To Workflow 2.0
      • Location Services
      • User Services
      • Access Control Services
      • PDF Generation Service
      • MDMS (Master Data Management Service)
        • Setting up Master Data
          • MDMS Overview
          • MDMS Rewritten
          • Configuring Tenants
          • Configuring Master Data
          • Adding New Master
          • State Level Vs City Level Master
      • Payment Gateway Service
      • User Session Management
      • Indexer Service
        • Indexer Configuration
      • URL Shortening Service
      • XState Core Chatbot
        • Xstate-Chatbot Message Localisation
        • XState-Chatbot Integration Document
      • NLP Engine Service
        • NLP Chatbot
      • SMS Template Approval Process
      • Telemetry Service
      • Document Uploader Service
      • Notification Enhancement Based On Different Channel
      • Report Service
        • Configuring New Reports
          • Impact Of Heavy Reports On Platform
          • Types Of Reports Used In Report Service
      • SMS Notification Service
        • Setting Up SMS Gateway
          • Using The Generic GET & POST SMS Gateway Interface
      • Survey Service
      • Persister Service
        • Persister Configuration
      • Encryption Service
        • Encryption Client Library
        • User Data Security Architecture
        • Guidelines for supporting User Privacy in a module
      • FileStore Service
      • ID Generation Service
      • Localization Service
        • Configuring Localization
          • Setup Base Product Localization
          • Configure SMS and Email
      • Email Notification Service
      • Searcher Service
      • Zuul Service
      • User OTP Service
      • OTP Service
      • Chatbot Service
      • National Dashboard Ingest
        • National Dashboard API Performance Testing Specs and Benchmark
        • National Dashboard: Steps for Index Creation
        • National Dashboard Adaptor Service
          • Deployment of Airflow DAG
          • Trigger Airflow DAG
          • Configure Airflow
          • Insert & Delete Data - Steps
          • Important Links & Credentials
          • Code Structure
          • KT Sessions
          • Pre-requisites For Enabling Adaptor
        • Revenue Maximisation
      • Audit Service
        • Signed Audit Performance Testing Results
      • Service Request
      • Self Contained Service Architecture (HLD)
      • Accelerators
        • Inbox Service
    • โœ๏ธAPI Specifications
      • User
      • Access Control
      • Employee
      • Location
      • Localisation
      • Encryption
      • Indexer
      • File Store
      • Collection
      • DSS Ingest
      • HRMS
      • National Dashboard Ingest
      • WhatsApp Chatbot
      • Master Data Management
      • ID Generation
      • URL Shortner
      • Workflow Service
      • Workflow v2
      • Document Uploader Service
      • OTP Service
      • Reporting Service
      • PDF Generation Service
      • Payment Gateway Service
    • ๐Ÿ”Data Protection & Privacy
      • Data Protection & Privacy Definitions
      • Legal Obligations For Privacy - eGov
      • Data Protection & Privacy - Global Best Practices
      • Guidelines
        • Platform Owner Guidelines
        • Implementing Agencies Guidelines
        • Admin Guidelines
        • Program Owner Guidelines
        • Data Security and Data Privacy
      • Data Privacy Policy Templates
        • eGov Data Privacy Policy
        • Implementing Agency Privacy Policy
        • Admin & Program Owner Privacy Policy
        • Supporting Agency Privacy Policy
      • Global Standards For All Roles
    • โ–ถ๏ธGet Started
      • Install DIGIT
      • Access DIGIT
      • Sandbox
      • Training and Certification
        • Training Resources
    • โš’๏ธIntegrations
      • Payment
      • Notification
      • Transaction
      • Verification
      • View
      • Calculation
    • ๐Ÿ›ฃ๏ธRoadmap
    • ๐ŸŽฌOpen Events
    • ๐Ÿ‘ฉโ€๐Ÿ’ปSource Code
    • ๐Ÿ‘๏ธProject Plan
    • ๐Ÿ“‹Discussion Board
    • ๐ŸคContribute
  • Guides
    • ๐Ÿ““Installation Guide
      • DIGIT Deployment
      • Quick Setup
        • DIGIT Installation on Azure
        • DIGIT Installation on AWS
      • Production Setup
        • AWS
          • 1. Pre-requisites
          • 2. Understanding EKS
          • 3. Setup AWS Account
          • 4. Provisioning Infra Using Terraform
          • 5. Prepare Deployment Config
          • 6. Deploy DIGIT
          • 7. Bootstrap DIGIT
          • 8. Productionize DIGIT
          • FAQ
        • Azure
          • 1. Azure Pre-requisites
          • 2. Understanding AKS
          • 3. Infra-as-code (Terraform)
        • SDC
          • 1. SDC Pre-requisites
          • 2. Infra-as-code (Kubespray)
          • CI/CD Setup On SDC
        • CI/CD Set Up
          • CI/CD Build Job Pipeline Setup
        • Prepare Helm Release Chart
        • Deployment - Key Concepts
          • Security Practices
          • Readiness & Liveness
          • Resource Requests & Limits
          • Deploying DIGIT Services
          • Deployment Architecture
          • Routing Traffic
          • Backbone Deployment
    • ๐Ÿ’ฝData Setup Guide
      • User Module
      • Localisation Module
      • Location Module
    • ๐ŸšฅDesign Guide
      • Model Requirements
      • Design Services
      • Design User Interface
      • Checklists
    • โš’๏ธDeveloper Guide
      • Pre-requisites Training Resources
      • Backend Developer Guide
        • Section 0: Prep
          • Development Pre-requisites
          • Design Inputs
            • High Level Design
            • Low Level Design
          • Development Environment Setup
        • Section 1: Create Project
          • Generate Project Using API Specs
          • Create Database
          • Configure Application Properties
          • Import Core Models
          • Implement Repository Layer
          • Create Validation & Enrichment Layers
          • Implement Service Layer
          • Build The Web Layer
        • Section 2: Integrate Persister & Kafka
          • Add Kafka Configuration
          • Implement Kafka Producer & Consumer
          • Add Persister Configuration
          • Enable Signed Audit
          • Run Application
        • Section 3: Integrate Microservices
          • Integrate IDGen Service
          • Integrate User Service
          • Add MDMS Configuration
          • Integrate MDMS Service
          • Add Workflow Configuration
          • Integrate Workflow Service
          • Integrate URL Shortener Service
        • Section 4: Integrate Billing & Payment
          • Custom Calculator Service
          • Integrate Calculator Service
          • Payment Back Update
        • Section 5: Other Advanced Integrations
          • Add Indexer Configuration
          • Certificate Generation
        • Section 6: Run Final Application
        • Section 7: Build & Deploy Instructions
        • FAQs
      • Flutter UI Developer Guide
        • Introduction to Flutter
          • Flutter - Key Features
          • Flutter Architecture & Approach
          • Flutter Pre-Requisites
        • Setup Development Environment
          • Flutter Installation & Setup Guide
          • Setup Device Emulators/Simulators
          • Run Application
        • Build User Interfaces
          • Create Form Screen
        • Build Deploy & Publish
          • Build & Deploy Flutter Web Application
          • Generate Android APKs & App Bundles
          • Publishing App Bundle To Play Store
        • State Management With Provider & Bloc
          • Provider State Management
          • BloC State Management
        • Best Practices & Tips
        • Troubleshooting
      • UI Developer Guide
        • DIGIT-UI
        • Android Web View & How To Generate APK
        • DIGIT UI Development Pre-requisites
        • UI Configuration (DevOps)
        • Local Development Setup
        • Run Application
        • Create New Screen In DIGIT-UI
          • Create Screen (FormComposer)
          • Inbox/Search Screen
          • Workflow Component
        • Customisation
          • Integrate External Web Application/UI With DIGIT UI
          • Utility - Pre-Process MDMS Configuration
          • CSS Customisation
        • Citizen Module Setup
          • Sample screenshots
          • Project Structure
          • Install Dependency
          • Import Required Components
          • Write Citizen Module Code
          • Citizen Landing Screen
        • Employee Module Setup
          • Write Employee Module Code
        • Build & Deploy
        • Setup Monitoring Tools
        • FAQs
          • Troubleshoot Using Browser Network Tab
          • Debug Android App Using Chrome Browser
    • ๐Ÿ”„Operations Guide
      • DIGIT - Infra Overview
      • Setup Central Instance Infra
      • Central Monitoring Dashboard Setup
      • Kubernetes
        • RBAC Management
        • DB Dump - Playground
      • Setup Jenkins - Docker way
      • GitOps
        • Git Client installation
        • GitHub organization creation
        • Adding new SSH key to it
        • GitHub repo creation
        • GitHub Team creation
        • Enabling Branch protection:
        • CODEOWNER Reviewers
        • Adding Users to the Git
        • Setting up an OAuth with GitHub
        • Fork (Fork the mdms,config repo with a tenant-specific branch)
      • Working with Kubernetes
        • Installation of Kubectl
      • Containerizing application using Docker
        • Creation of Dockerhub account
      • Infra provisioning using Terraform
        • Installation of Terraform
      • Customization of existing tf templates
      • Cert-Manager
        • Obtaining SSL certificates with the help of cluster-issuer
      • Moving Docker Images
      • Pre and post deployment checklist
      • Multi-tenancy Setup
      • Availability
        • Infrastructure
        • Backbone services
          • Database
          • Kafka
          • Kafka Connect
          • Elastic search
            • ElasticSearch Direct Upgrade
            • Elastic Search Rolling Upgrade
        • Core services
        • DIGIT apps
        • DSS dashboard
      • Observability
        • ES-Curator to clear old logs/indices
        • Monitoring
        • Tracing
        • Jaeger Tracing Setup
        • Logging
        • eGov Monitoring & Alerting Setup
        • eGov Logging Setup
      • Performance
        • What to monitor?
          • Infrastructure
          • Backbone services
          • Core services
        • Identifying bottlenecks
        • Solutions
      • Handling errors
      • Security
      • Reliability and disaster recovery
      • Privacy
      • Skillsets/hiring
      • Incident management processes
      • Kafka Troubleshooting Guide
        • How to clean up Kafka logs
        • How to change or reset consumer offset in Kafka?
      • SRE Rituals
      • FAQs
        • I am unable to login to the citizen or employee portal. The UI shows a spinner.
        • My DSS dashboard is not reflecting accurate numbers? What can I do?
      • Deployment using helm
        • Helm installation:
        • Helm chart creation
        • Helm chart customization
      • How to Dump Elasticsearch Indexes
      • Deploy Nginx-Ingress-Controller
      • Deployment Job Pipeline Setup
      • OAuth2-Proxy Setup
      • Jira Ticket Creation
  • Reference
    • ๐Ÿ‘‰Setup Basics
      • Setup Requirements
        • Tech Enablement Training - Essential Skills and Pre-requisites
        • Tech Enablement Training (eDCR) - Essential Skills and Prerequisites
          • Development Control Rules (Digit-DCR)
          • eDCR Approach Guide
        • DIGIT Rollout Program Governance
        • DevOps Skills Requirements
        • Infra Requirements
        • Team Composition for DIGIT Implementation
        • Infra Best Practices
        • Operational Best Practices
        • Why Kubernetes For DIGIT
      • Supported Clouds
        • Google Cloud
        • Azure
        • AWS
        • VSphere
        • SDC
      • Deployment - Key Concepts
        • Security Practices
        • CI/CD
        • Readiness & Liveness
        • Resource Requests & Limits
      • Understanding ERP Stack
        • ERP Monolithic Architecture
        • ERP Hybrid Architecture
        • ERP Coexistence Architecture
        • APMDP-HYBRID-INFRA ARCHITECTURE
        • eGov SmartCity eGovernance Suite
        • ERP Deployment Process
        • ERP Release Process
        • ERP User Guide
      • Deploying DIGIT Services
        • Deployment Architecture
        • Routing Traffic
        • Backbone Deployment
      • Troubleshooting
        • Distributed Tracing
        • Logging
        • Monitoring & Alerts
    • ๐Ÿ“ฅReference Reads
      • Analytics
      • DevSecOps
      • Low Code No Code
        • Application Specification
      • Beneficiary Eligibility
      • Government and Open Digital Platforms
      • Microservices and Low Code No Code
      • Registries
      • Platform Orientation - Overview
    • ๐Ÿ”Data Security
      • Signed Data Audit
      • Encryption Techniques
      • Approaches to handle Encrypted Data
    • โ•Privacy
    • ๐Ÿ•น๏ธDevOps
      • 1. How DNS works
      • 2. Load Balancer
      • 3. SSL/Cert-manager
      • 4.Ingress,WAF
      • 5.VPC
      • 6.Subnets
      • 7.EKS
      • 8.Worker Node Group
      • 9.RDS
      • 10.NAT
      • 11.Internet Gateway
      • 12.Block Storage (EBS Volumes)
      • 13.Object Storage (S3)
      • 14. Telemetry
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Overview
  • Key Functionalities
  • Integration Details
  • Integration Scope
  • Integration Benefits
  • Integration Approach
  • Configuration Details
  • Reference Docs
  • Doc Links
  • API List

Was this helpful?

  1. Platform
  2. Core Services
  3. XState Core Chatbot

XState-Chatbot Integration Document

PreviousXstate-Chatbot Message LocalisationNextNLP Engine Service

Last updated 1 year ago

Was this helpful?

Overview

The is a revamped version of the , which provides functionality to the user to access PGR module services like filing complaints, tracking complaints and notifications from WhatsApp. It allows the user to view receipts and pay bills for Property, Trade Licence, Fire NOC, Water and Sewerage and BPA service module.

Key Functionalities

  • File PGR complaint

  • Track PGR complaint

  • Support images when filing complaints

  • Notifications to citizens when an employee performs any action on the complaint

  • Allow users to search and pay bills of different modules.

  • Allow users to search and view receipts of different modules.

  • Allow users to change the language of their choice to have a better experience.

  • Put user interactions on an elastic search for telemetry.

Integration Details

Integration Scope

The XState chatbot can be integrated with any other module to improve the ease of searching and viewing bills/past payment receipts and to improve speed and convenience for bill payments. It can be integrated with the PGR module for easiness of creation and tracking of the complaint.

Integration Benefits

  • Increase in convenience and ease of making the bill payment.

  • Increase in no. of users opting for online payment.

  • Improvement in demand collection efficiency

  • Creating an additional channel for payment.

  • Remove dependency on mobile/web apps or counter.

Integration Approach

Integration of New Whatsapp Provider

Whatsapp provider is a third-party service that acts as an intermediary between the user WhatsApp client and the XState-Chatbot server. All messages coming/going to/from the user pass through the WhatsApp provider. The chatbot calls the WhatsApp provider to send messages to the user. When a user responds to any WhatsApp message the WhatsApp provider calls the Chatbot service configured endpoint with details like messages sent by the user, the sender number etc.

If any new WhatsApp provider is to be used with a chatbot, code must be written to convert the providerโ€™s incoming messages to the format that the chatbot understands. The final output from the chatbot is also converted to the WhatsApp providerโ€™s API request format.

Currently, the XState-Chatbot service is using ValueFirst as the WhatsApp Provider. This will require provider-specific environment variables to be configured. If the provider changes then, all these environment variables will also change. A few of those environment variables are stored as secrets, so these values need to be configured in env-secrets.yaml.

As this is a revamped version of the chatbot service, all of the secrets should already be present. There is no need to create new secrets.

Integration of PGR complaint feature in XState-Chatbot

Configuration Details

Configuration of PGR version in chatbot

  • pgrVersion

  • pgrUpdateTopic

To configure PGR v2 in XState chatbot then pgrVersion should be โ€˜v2' and pgrUpdateTopic should be 'update-pgr-requestโ€™.

Adding Information Images in PGR Complaint Creation and Open Search Information Image

To configure the filestoreid for an informational image follow the steps mentioned below

  1. Download the images from the section Information Images for PGR and Open Search

For example:

a) if supportedLocales: process.env.SUPPORTED_LOCALES || 'en_IN,hi_IN' then valuefirst-notification-resolved-templateid: "12345,6789"

b) if supportedLocales: process.env.SUPPORTED_LOCALES || 'hi_IN,en_IN' then valuefirst-notification-resolved-templateid: "6789,12345"

(Note: Both lists should not be empty - they must contain at least one element)

Configuration of push notification template messages with a button

Template messages with buttons are maintained in the same way as described in the previous section (Configuration of push notification template messages)

There are two types of button message

  • Quick Reply

  • Call To Action

The Value First document below provides more details.

Integration of Bill Payment and Receipt Search feature in Xstate-Chatbot

Configuration of module for Bill payment and Receipt search

For example: If the application modules are defined in the variable - bill-supported-modules: "WS, PT, TL" -the defined modules appear in the bill payment and receipt search. In the given example, the modules Water and Sewerage, Property Tax, and Trade License appear for bill payment and receipt search.

Environmental Variables
Description

WHATSAPP_BUSINESS_NUMBER

The mobile number to be used on server

VALUEFIRST_USERNAME

Username for configured number for sending messages to user through whatsapp provider API calls

VALUEFIRST_PASSWORD

Password for configured number for sending messages to user through whatsapp provider API calls

GOOGLE_MAPS_API_KEY

Maps API key to access geocoding feature

ROOT_TENANTID

Contains state level tenantid value

SUPPORTED_LOCALES

This variable contains the list supported language in chatbot. If there is a need to add new language in chatbot, then its respective locale need to add in this list.

PGR_VERSION

Contains PGR version value to use (i.e v1 or v2)

PGR_UPDATE_TOPIC

Depends on PGR version respective PGR update kafka topic name should mention here. Example: If PGR_VERSION: 'v2' then PGR_UPDATE_TOPIC: 'update-pgr-request'

BILL_SEARCH_LIMIT

Limit for showing maximum number of bills on search.

RECEIPT_SEARCH_LIMIT

Limit for showing maximum number of receipts on search.

COMPLAINT_SEARCH_LIMIT

Limit for showing maximum number of complaints on search.

BILL_SUPPORTED_MODULES

Contains the list of modules to be use for bill payment and receipts search.

INFORMATION_IMAGE_FILESTORE_ID

Contains the filestoreid of informational image, which shows how to share the user current location.

OPEN_SEARCH_IMAGE_FILESTORE_ID

Contains the filestoreid of open search informational image, which shows how to use open search pay feature for bill payment

USER_SERVICE_HARDCODED_PASSWORD

This variable contain fixed value of login password and otp. This value has to configured in env-secrets.yaml.

GEO_SEARCH

Boolean flag to enable and disable city / locality nlp search

Configuration of Telemetry File

Searcher config file:

Cron job mdms entry:

Localisation for PGR service

Information images for PGR and Open Search

Reference Docs

Doc Links

Title

API List

Title

The integration of PGR with a chatbot can be enabled and disabled by making changes in this . By exporting the respective PGR service file, the PGR service feature can be sable and vice versa.

To configure the PGR module to use in Xstate-chatbot - the below variable values need to change in the as per the requirement.

Upload the image into the filestore server. Use the upload file API from the Postman collection .

For the PGR information image mention the filestore id in the environment file.

For open search, the information image mentions the filestore id in the environment file.

The integration of the Bill payment and receipt search feature with the chatbot is enabled and disabled by making changes in this . The payment and receipt search feature can be enabled and vice versa by exporting the respective bill service and receipt service file.

To configure the list of modules to appear as an option for payment and receipt, Add the module business service code to the list present in the file.

Add the message bundle, validation and service code for the locality searcher in and files.

Add this in the and mention the filename in the respective .

๐Ÿ”ง
XState-Chatbot
chatbot
file
environment file
here
here
here
file
environment
egov-bill
egov-receipt
telemetry file
config repo
environment yaml file
Chatbot Message Localisation
NLP-search Engine
/xstate-chatbot/message
/xstate-chatbot/reminder
/xstate-chatbot/status
configs/localitySearcher.yml at qa ยท egovernments/configs
RAIN-2768 Added entry in cron job api config file ยท egovernments/egov-mdms-data@30881ab
Value First Whatsapp User Guide
75KB
eGov-WhatsApp Template (14th July 2021).xlsx