Coder Social home page Coder Social logo

isales's Introduction

==================================

Insight Sales | HubSpot Project

==================================

This project aims to create an automated and near real time service that predicts Hubspot contact's probability to buy exchange programs. In its main core, this project uses a XGboost model which was trained with Hubspot records of leads buying pattern.

In order to receive data from Hubspot, this project relies on a Google Cloud Function which works as a producer sending events to a redis queue. The GCP function is subscribed to HubSpot through a webhook service which triggers this function everytime a contact is created or modified in Hubspot. Then, this project's collector module reads the redis subscription queue, fetches contacts main information from Hubspot database and sends all this data to the preprocessor module through another redis queue. Next, the preprocessor module enhances the fetched data for the prediction stage. After all that, the model module predicts contact's propability to buy exchange programs by using a Xgboost machine learning model.

Finally, predictions generated by the ML model are sent to Hubspot database by the sender module. At the end of the day, these predicitons help sales representatives to decide which contacts they should invest their time.

Project Architecture


Motivation

  • Optimize Hubspot sales representative's time.
  • Ensure machine learning models ability of generating useful and real life insights

How to use it

Requirements

Usage

  • Clone this repository: $ git clone [email protected]:gPass0s/isales.git
  • Access the project root folder: $ cd isales
  • Rename the environment file: $ mv .env.template env
  • Dockerize: $ docker build --no-cache -t isales:latest -f Dockerfile .
  • Run collector service: $ docker run -d -it --name collector --network host --env-file env isales:latest python isales run collector
  • Run preprocessor service : $ docker run -d -it --name preprocessor --network host --env-file env isales:latest python isales run preprocessor
  • Run model service: $ docker run -d -it --name model --network host --env-file env isales:latest python isales run model
  • Run sender service: $ docker run -d -it --name sender --network host --env-file env isales:latest python isales run model

Unit testing

  • Activate the virtual environment: $ pipenv install && pipenv shell
  • Run tests: $ pipenv run python -m pytest --vv tests/

isales's People

Contributors

gpass0s avatar

Watchers

 avatar  avatar

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.