Skip to content

InnoSWP/SeamlessSupport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seamless Support

License Python Telegram Flask Firebase Socket.io

Summer 2022

Contents

Overview

A simple tool for seamless customer support across platforms by a volunteer team.

SeamlessSupport-Final.mp4

Motivation

Today, there are many platforms that more and more people use. It's not always the case that platforms have documentation available to resolve users' ever-increasing questions. But no need to worry - Seamless Support is already coming for help! With Seamless Support,you can easily add customer support and the ability to answer all your questions to volunteers, which will make using your product easier and make the customer happier - isn't that what we want?

What is Seamless Support?

Seamless support is a project focused on providing users with the ability to quickly and easily integrate customer support services into their product.This project provides the following functionality:

  1. Providing a single platform for customer support.

  2. Possibility to integrate theservice into existing applications,allowing customers to provide feedback.

  3. Possibility for volunteers to answer questions in the existing service(Telegram) without the need to create a separate application.

Installation

Python

This project is written on Python 3.10. It is also important to have PYTHON and PIP added to the PATH to run the project from the console.

P.S. We also tried to run project on Python 3.8, however special syntax list[dict] was used so project didn't compile. You can delete this part in firebase.py file, however it is not recommended. Please use modern versions of python.

Libraries required

All libraries could be seen in requirements.txt. Download them by pip install -r requirements.txt

How to create database

  1. Create project on Firebase
  2. Open Realtime Database -> Rules and edit file so that it will look like this.
{
  "rules": {
    ".read": false,
    ".write": false,
    "users": {
      ".indexOn": ["email"]
    },
    "frequent-questions":{
      ".indexOn": ["user_id"]
    }
  }
}

How to set up database

  1. Open your project on Firebase
  2. Open Project settings -> Service account -> Python -> Generate new private key
  3. Save key as seamless-support-firebase-adminsdk.json on the ./Backend level

How to set up bot

  1. Create new bot via BotFather
  2. Copy BOT_TOKEN and add it to .env (see setup env further)
  3. Run your bot without configured CHANNEL_ID (see run step further)
  4. Add your bot to channel (Not chat) and give it admin right to send/edit/delete messages. Bot will send message with CHANNEL_ID
  5. Copy CHANNEL_ID and click delete message button.
  6. Add CHANNEL_ID and add it to .env

How to set up env variables

Create .env file (or environment variables) on top level and set:

DATABASE_URL=https://<YOUR_PROJECT>.firebaseio.com/
PASSWORD_ALPHABET=SYMBOLS_ACCEPTED_IN_PASSWORD
SALT=SALT_FOR_PASSWORD
BOT_TOKEN=1111111111:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CHANNEL_ID=-1000000000000
SECRET_KEY=$ecE1KeEYt0YouR@pp

How to launch server and bot

Server + API

$ cd Backend
$ python3 app.py

Telegram bot

$ cd TelegramBot
$ python3 main.py

How does the project works

The interface of the system consists of two parts: frontend part for clients that want to ask questions on some service, and telegram part - where volunteers can answer asked questions.

For clients

In the service that uses our project client needs:

  1. Login into their own account.

  2. Find a chat window with the support service.

  3. Ask questions.

For volunteers

In telegram volunteers need to be added in the chanell with questions, then the procedure of answering questions occur in several easy steps:

  1. Open the channel with questions.

  2. Choose the questions that you are able to answer and click button ‘Answer the question’

image_0

  1. Once you have accepted the question, bot will write to you saying that you have a new dialog in your own chat, and if you did it accidentally, then you can cancel it.

image_1

  1. After refreshing the page with dialogs, volunteers will see new dialog in it with this question. image_2

  2. Then the volunteer can choose the dialog he wants to be in. Here he can answer the question by writing a message in telegram, go to another dialog (‘Go back’ button) or close the question (‘Finish dialog’ button).

image_3

  1. Once the volunteer finishes dialog, the question will disappear from the questions list.

About us

Development team

Polina Zelenskaya - team leader and telegram bot developer. Responsible For teamwork, management, telegram bot,and connection of program logic with the database.

Laith Alebrahim - front end developer. Responsible for the design part of the project,client’s interface.

Software testing

Ruslan Abdullin - tester designer. Do everything to break the development team's service.

Project management

Evgeny Gerasimov - scrum master. Responsible for better interaction between team members, for presenting and documenting the project.

Stages of development

To manage the project, we used theScrum methodology and broke down the stages of project creation into weekly sprints. Sprint description

Sprint 1

Sprint goal - meet with the team and create a plan of the project

  1. Use-case diagram

  2. User stories

  3. Product backlog

Outcome of the sprint:

Functionality:

  1. We found out that our project MVP (version 1) require:

  2. Registration to start dialogue

  3. Ability to ask questions on thesite

  4. Ability to answer questions in telegram

  5. Preferable Features:

  6. Automatic question canceling

  7. Automate Frequent questions

Prototype findings:

  1. When we discussed volunteers interface, we found problem that questions

that bot send in chat could be missed (bot sent message, several people in

chat written some messages,as a result message will be lost).

We Found several solutions to this problem:

  1. Pin questions in chat, so volunteers will have opportunity to seeall

of them

  1. Replace group to channel.So no-one except bot will have access to

send messages,and no question will be lost.

  1. During our discussion we found out that the customer need to seethe

history of message.Thesolution of this problem is to ask client to register

in order to ask questions,and to see answers to their problems.So our

database will also store users (e.g.email, phone number, telegram aliasl) to

make a link between the client and their chat history

Sprint 2

Sprint goal - create MVP that will contain:

  1. Some graphical interface(any)

  2. Basic database(no volunteers statistics, no user sessions)

  3. Simpletelegram bot to manage questions (+ ability to answer them as one message)

  4. API that will connect bot, frontend and database

Outcome of the sprint:

Front-End Part outcomes:

  1. We made float chat to contact with supporter

  2. We Checked the email if it’s correct email (username,@ and ( . ) before the suffix )

  3. We used "Socket" library to connect theapi with thechat

Telegram bot part outcomes:

  1. Bot write introduction message (with instructions of the final configuration step)

when he is added to the channel.

  1. Bot send new questions to the channel with buttons for acceptance.

  2. Bot show what questions are not accepted yet,and what questions are in progress.

  3. Bot managethatvolunteers couldn't accept in progress questions.

  4. Bot manages that he doesn't have permission to write volunteers and throws an alert

so that volunteers should start dialogue.

  1. Bot provide an opportunity to cancel selected questions.

  2. Bot send a start message when a new volunteer starts the chat.

Database outcomes:

  1. Firebase database connection and basic tables are created.

API outcomes:

  1. Requests to manage databases automatically.

  2. WebSockets to send chat messages seamlessly.

Sprint 3

Sprint goal - finish MVP (connect everything with glue):

  1. Graphical interface as floating window (+ message deletion)

  2. Database v1 (question/answer is stored, however dialogues not supported)

  3. Telegram bot v1 (ability to answer questions, to save volunteers data, design dialogue implementation) API v1 (everything above but connected)

Outcome of the sprint:

Front-End Part outcomes:

  1. We Connected the front-end with the backend and made a short test by sending a message to the bot to reply to it.

  2. We Fixed some problem in design (When we close the float chat the visibility of the chat will not close completely)

Telegram bot part outcomes:

  1. Bot now works with API.

  2. Bot could acceptanswers from volunteers (and send them to API).

  3. Bug with bot.close() request fixed.

  4. Bot could send messages to the channel without the /ask command.

  5. Bot functionality is fully documented.

Database outcomes:

  1. Firebase Connection with API implemented.

API outcomes:

  1. Sockets support implemented.

  2. Frontend works flawlessly with API.

  3. API could work with bot.

Sprint 4

Sprint goal - document code, add comments, present MVP and learn how to extract keywords from sentences on different languages (for frequent questions part)

Outcome of the sprint:

  1. We managed to create our MVP:

    1.1 Connect Frontend with API

  2. We met with the customer and discussed progress. It allowed us to change our work process to be more preferable for customer.


Interaction with client

In the beginning of each sprint we met our customer to share the results in our project with him. Customers always gave us useful feedback that helped us to improve our project and add new useful features.

Difficulties

The main difficulty during our project is that by our system we want to cover needs of two different types of users - software engineers as people who may want to integrate our system in their projectand direct users of the concrete integrated system.To meet the needs of all users the code should be maintainable and functionally complete. It means that:

  1. Code Should be modular, so all developers could add some new features in their project.

  2. System should have a friendly interface, so that every user of the system could find and answer questions easily, without any loss of questions/answers. Interface Should beclean.

  3. System should have all needed for conversation features, the user should be able to write messages,attach files, send voice or video messages,add codesippets or math formulas.

On all of the above mentioned points our team had several weeks. It is clear that it is impossible to cover all these features in such an amount of time.So we needed to work hard to cover most of them.

Status of the project

As was mentioned before, the area of application of this project is wide, so there's still a lot of work to do. However, our team is glad to say that the most important things are already done and wait for further improvement.

Final product

You can test the result of our work here:

Site with seamless support service (important: use Innopolis University network to achieve the site, and open it from your PC)

Telegram bot

To see the result of integration you can use abovementioned resources to see how they can look in your product!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published