Setting up your first Webhook

Connecting your business to RevOps streamlines your billing operations, feature enablement, and team notifications to activate customers faster, easier, and more consistently than ever before.

To demonstrate the process, we'll build a simple example to show how Deal Webhooks can notify downstream systems of feature flags a customer has assigned.

With this guide, we will:

  1. Create a webhook endpoint
  2. Capture and use information from a Deal webhook
  3. Print a message out in our app

How do RevOps Webhooks work?

A Webhook is simply an HTTP POST sent from RevOps to a URL you've configured. For the Deal Webhook, we'll notify you every time a Deal is modified and provide detailed information about the Deal.

Webhooks under the hood

URLs for webhooks are configured in your RevOps Console at Developer > Webhooks. While you can create as many as you like, in this example, we'll only use one.

While this how-to is in python, you can use any language you prefer.

Requirements for this Guide

  1. The developer role in your RevOps Console
  2. ngrok https://ngrok.com/download
  3. python Python >=3.6 https://www.python.org/
  4. pip https://github.com/pypa/pip

Step 1: Clone & Run the sample server

To process the webhook, you need a server capable of receiving and responding to the HTTP request. The snippet below will clone our sample project, install the required components, start the server, and tell it to listen on port 3005.

$> git clone https://github.com/revops-io/revops-webhook-server
$> cd revops-webhook-server
$> pip install -r requirements.txt
$> python server.py
$> ngrok http 3005

You should get a result similar to:

Session Status    online                                                                                                                                                                      
Session Expires   1 hour, 59 minutes                                                                                                                                                          
Version           2.3.38                                                                                                                                                                      
Region            United States (us)                                                                                                                                                          
Web Interface     http://127.0.0.1:4040                                                                                                                                                       
Forwarding        http://thiswillchange.ngrok.io -> http://localhost:3005                                                                                                                       
Forwarding        https://thiswillchange.ngrok.io -> http://localhost:3005

We'll need that last line in our next step.

Step 2: Connect your server to RevOps

Next, we need to tell RevOps what data to send where. For this, we need to configure the webhook to talk to our server.

  1. Log in to your RevOps account.
  2. Go to Developer > Webhooks
  3. Create a new webhook endpoint by clicking Add New Webhook
  4. Fill in a Name. You can choose anything you like.
  5. In the Event Type dropdown, select Deals
  6. For the Callback Url, use the last line from the step above.
  7. Click Save.

Your webhook is now live and all Deal updates will generate requests to your server.

Step 3: Test your configuration

But let's confirm everything is working as expected. To test this, we could edit any Deal in the system but we don't want to accidentally change something so let's generate a test request.

  1. Visit your Deal Desk to retrieve a specific Deal Id. This is in the url and looks something like cc3ad2d6-0de7-4ae3-bf73-db8023ba2ec3
  2. Copy that value into the Test with Deal Id on the webhook you just created
  3. Click Test Configuration

You should get a result similar to:

Webhooks Configuration

Congratulations! You are three steps closer to automating your processes!

Now that you have this data, what you do from here is up to you but we've seen most of our customers want to do a handful of things:

  1. Activate Feature Flags for a customer
  2. Notify teams via Slack or Email
  3. Create customer accounts in support system