Giter Site home page Giter Site logo

datapirates21 / freescout-sidebar-webhook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fulldecent/freescout-sidebar-webhook

0.0 0.0 1.0 107 KB

Sidebar Webhook asynchronously injects HTML from your server into conversation sidebars

License: MIT License

PHP 25.23% Blade 7.49% HTML 51.96% Hack 15.31%

freescout-sidebar-webhook's Introduction

FreeScout Sidebar Webhook

Sidebar Webhook asynchronously injects HTML from your server into conversation sidebars.

This screenshot shows what it does: you can load any content on a per-customer, per-message basis from your own web server, asynchronously, every time a conversation is loaded on the screen.

In this picture, the pink rectangle and happy faces were loaded from an external server based on the customer's email address.

screenshot

Use cases

  • Directly link to your customer management system
  • Show details about order status live from your fulfillment system
  • Quickly ship changes to your FreeScout system UI without updating modules
  • Connect to backends using PHP/Node.js/Ruby/Perl/Rust/Go/Bash/Haskell and even Java

Installation

These instructions assume you installed FreeScout using the recommended process, the "one-click install" or the "interactive installation bash-script", and you are viewing this page using a macOS or Ubuntu system.

Other installations are possible, but not supported here.

  1. Download the latest release of FreeScout Sidebar Webhook.

  2. Unzip the file locally.

  3. Open SidebarWebhookServiceProvider.php using a code editor and change the value of WEBHOOK_URL to be your endpoint's secret URL.

  4. Copy the folder into your server using SFTP.

    scp -r ~/Desktop/freescout-sidebar-webhook [email protected]:/var/www/html/Modules/SidebarWebhook/
  5. SSH into the server and update permissions on that folder.

    chown -r www-data:www-data /var/www/html/Modules/SidebarWebhook/
  6. Access your admin modules page like https://freescout.example.com/modules/list.

  7. Find Sidebar Webhook and click ACTIVATE.

  8. Purchase a license code by sending USD 10 at https://www.paypal.com/paypalme/fulldecent/10usd

Your webhook server

Your webhook server will receive requests of type application/x-www-form-urlencoded (in PHP, access with $_POST)

{ 
    "customerEmail": "[email protected]",
    "customerPhones": [],
    "conversationSubject": "Testing this email",
    "conversationType": "email",
    "mailboxId": 1,
    "csrfToken": "osnuthensuhtnoehu2398g3"
}

Your webhook server shall respond with a partial HTML document which is directly injected into the sidebar.

Project scope

Our goal is to have a very simple module to allow vast extensibility in the conversation sidebar.

Anything that makes it simpler (removes unneded code) or more extensible for most people (adding a couple post parameters in boot()) will be a welcome improvement.

At this point, it is a non-goal to add friendly configuration of WEBHOOK_URL or other configuration options.

Inspiration

freescout-sidebar-webhook's People

Contributors

fulldecent avatar ramisj12 avatar

Forkers

ramisj12

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.