Experiments with Frappe as CRM in Glific
Akhilesh Negi
September 19, 2022

For the past few months, we have been working with Reap Benefit to visualize citizen engagement of their chatbot in a mapping dashboard created in R/shiny. Read more about their journey with Glific and our journey in creating the dashboard here.

Initially, we went with the combination of Glific, BigQuery, and R/shiny.

Glific: To report any local issue, a beneficiary sends details of the issue through WhatsApp messages to the chatbot.

BigQuery: all the data collected in Glific is then synced to Bigquery where data can be cleaned and all details of an issue can be clubbed together as a single entry

R/shiny: Cleaned data can be then queried and populated on the map to visualize the information shared on the dashboard

Next, we started integrating Frappe to replace Bigquery so that it can serve as a single place for storing all information of an organization. In ReapBenefit’s case, it helps as all the information gathered through WhatsApp can be stored across different tables.

In addition to being a central repository for all data, some other cool features of Frappe which caught our eyes 

  • Being UI-driven makes most things in Frappe simple to use. Therefore any new entity like users, locations, issues, etc. can be created/edited through UI. We can even update the schema for each entity using UI which makes it easier to make changes for capturing more information
  • The CRUD APIs for newly formed entities come pre-packaged, making it easier to integrate existing frappe applications with other applications using APIs
  • Data can be collected using forms, chatbots, and IVR systems and can be populated easily.
  • Creating a Leaderboard dashboard and seeing engaged users’ profile are some of the many cool features Frappe provide with minimal configuration
Snapshot of ReapBenefit’s Solve Ninja dashboard

Thus visualizing citizen engagement of a chatbot becomes a two-step process

  1. Collecting and storing data:  With the use of Glific Flows, information can be gathered through multiple WhatsApp messages, and once all the information is gathered,  it can be sent Frappe application using a webhook at the end of the flow. When calling webhook we can determine which data we want to send to Frappe and to which entity data belongs
  2. Visualizing data:  We extended our existing code and switched to RPostgres package to get data from the Frappe Postgres database instead of  Bigquery and Voilà! It worked like a charm. This completed our proof-of-concept work where an issue can be reported over WhatsApp, and the data captured can be sent to the Frappe application which can then be visualized in a mapping dashboard.
    For interested folks, all our code is open source here.

In a recent Tech4dev sprint along with Tejas and Gautam from Reap Benefit, we met Ankit who is currently working with Reap Benefit, as part of the fractional CXO initiative of Tech4Dev. We all sat together and discussed the work done so far, how we can improve in the future, planned next milestones, and how this feature can be generalized for other NGOs.