Turn-Io-Adapter

Transform api

Objective

Reap benfit system is one of the vendor whose providing the chatbat services using the http://turn.io as backend services to communicate with citizen through chatbot. As part of the requirement, we need to create a complaint in digit platform when ever citizen has raised the complaint through reap benfit chatbot.

Overview

turn-io-adapter service is a wrapper to transform reap benfit request format to digit pgr request format. this service will have _transform api and it will construct requried pgr request from the request message sent by reap benfit system. Reap benfit system will consume _tranform api to communicate with digit pgr mdoule.

In this process, once complaint cretaed, We will send the whatsapp message to citizen with track link. Whenever some action taken by ULB employes on complaint, we will send whatsapp message to citizen.

Pre-requisites

Before you proceed with the configuration, make sure the following pre-requisites are met -

  • Java 8

  • Rainmaker-PGR service is running

Key Functionalities

  • Complaint can create in digit platform from reapbenfit system chatbot

  • message will sent to citizen through whatsapp when employee perform some action on complaint

Deployment Details

Please deploy the following builds

  • rainmaker-pgr-db:v1.1.3-bb2961cf-13

  • turn-io-adapter:v1.1.3-bb2961cf-19

  • egov-searcher:v1.1.3-d43c421c-5

  • nlp-engine:v1.0.0-c3889d14-10

Note: Please refer the the following url for nlp-engine techical documentation.

https://digit-discuss.atlassian.net/l/c/BA8ATuFh

 

Frontend commits

https://github.com/egovernments/frontend/commit/b7aa5196eb4d15cc5d76268d76a5a8a82adb15c7

https://github.com/egovernments/frontend/commit/da2da150d8a9bd04143ab4d48546adbdcb95ed93

 

Infra Configuration Details

1) turn-io-adapter: "http://turn-io-adapter.egov:8080/" (In service host configuration)

2) Add /turn-io-adapter/_transform in egov-mixed-mode-endpoints-whitelist configuration

3) Once you are done with 2nd step restart zuul pod

MDMS Data

We need to add name filed in complaint category master in pgr. Please find the below link for data.

https://raw.githubusercontent.com/egovernments/egov-mdms-data/DEV/data/pb/RAINMAKER-PGR/ServiceDefs.json

 

LOCALIZATION DATA

Push the localization data for all the locality data with module as rainmaker-chatbot. Please find the below sample localization object.

{ "code": "SC1", "message": "Azad Nagar - WARD_1", "module": "rainmaker-chatbot", "locale": "en_IN" }

Business Service / Workflow Configuration

NA

Actions & Role Action Mapping


Actions

{ "id": 2116, "name": "Create Turn Io Adapter", "url": "/turn-io-adapter/_transform", "displayName": "Turn Io Adapter", "orderNumber": 1, "enabled": true, "serviceCode": "turn-io-adapter", "code": "null", "path": "" }


Role Mapping

{ "code": "ANONYMOUS", "name": "Any User", "description": "Can Transform the Data" }

 

RoleAction Mapping

{ "rolecode":"ANONYMOUS", "actionid":2116, "actioncode":"", "tenantId":"pb" }

 

Data Setup

This is the samplerequest for _transform api to create a complaint

 

Integration

Integration Scope

Turn-io-adapter will be integrated with Rainmaker-pgr Application. Turn-io-adapter Application internally invoke the rainmaker-pgr service to generate the complaint.

Steps to Integration

  1. Turn-Io-adapter application to call turn-io-adapter/_transform to generate the complaint and takes the data from the pgr.