Giter Site home page Giter Site logo

call-service-whatsapp's Introduction

call-service-whatsapp

Telegram Whatsapp GitHub yarn npm node nvm

Customer service via whatsapp

Have a number and several attendants and control all the service through whatsapp.
The main idea came from the need to have several attendants, segmented into sectors, with the possibility of managing the entire service process through whatsapp itself. Without the attendant needing to access any web page or an external application.

Infrastructure

Nvm installation

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# or
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

Docker installation

$ curl -fsSL https://get.docker.com -o get-docker.sh

$ sudo sh get-docker.sh

$ sudo usermod -aG docker ${USER}

$ sudo apt-get install docker-compose

After finishing, restart the terminal to load the new information.

Nodejs installation

$ nvm install 16.10.0

$ node --version

$ docker --version

$ docker-compose --version

Application startup

Install all dependencies.

$ yarn install
# or
$ npm i

The application depends on a MySql/MariaDB database.
If you don't have one:

Docker

$ cd Docker
$ docker-compose up

Prisma

The connection to the database is carried out through the prism orm.

For users who have permission to change the database, run the command:

$ yarn prisma:migrate

This command will migrate the modeling in the schema to the database.

For users without permission, execute the query in ./prisma/migration.sql, directly in the database.
At the end of the query, run the command:

$ yarn prisma:generate

The generate command generates assets for the Prisma Client based on the data model defined in the ./prism/schema.prisma file.

Creating the center and sectors

To insert the agents in the database, we first need to create the call center and sectors. See the example at ./prisma/create.ts.

We are now ready to launch the application in development mode.

$ yarn start:dev

Build

$ yarn build

$ yarn start

Commands

There are already ready commands, which you can insert directly into the chat during a call or outside a call, they are:

  • &end: ends the transaction;
    ├> sends a message to the client informing the termination of its protocol;
    ├> releases the user for a new service;
    └> sends a message to the attendant informing the termination.
  • &list: lists all transactions linked to the user and sends them to the attendant in
    xlsx format.
    • &list c=[id]: lists all transactions for a given user.
  • &customer: lists all clients and sends this information in xlsx format.
    • &customer c=[id]: retrieves all information for a specific customer;
    • &customer g=[id]: retriever a customer and start a call.
  • &transfer s=[sector name]: transfers the customer to the specified sector that
    had attendants.
  • &pause: not implemented:
    └> puts a given call on hold.
  • &status: not implemented:
    └> informs the status of a given service.

Commands can be created and edited at commands.ts.


Note

This code is in no way affiliated with WhatsApp. Use at your own discretion. Don't spam this.

This code was produced based on the baileys library and it is still under development.

call-service-whatsapp's People

Contributors

jrcleber avatar

Stargazers

Will avatar

Watchers

 avatar

call-service-whatsapp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.