Creating and Using Webhooks

BenchmarkONE can fire webhooks anywhere you'd normally add automations

Erin Posey avatar
Written by Erin Posey
Updated over a week ago

BenchmarkONE has the ability to fire webhooks anywhere you'd normally add automations; this includes campaigns, tag rules, form submissions, webpage visits, or link clicks. With these webhooks you'll be able to send data on the contact level, including contact custom fields. Currently, this is only officially supported as part of our Zapier integration. You can, however, create a webhook via the API, which will allow you to send webhook payloads to any URL of your choice without the use of Zapier at all.

  • You need to send a URL and webhook name (for display in the BenchmarkONE UI) to our AddWebhook endpoint. Here's the specs:

Headers: Content-Type: application/json

Payload: { "URL": "https://yourdomain.com/webhooks/listener", "WebHookName": "My New Webhook" }

  • If you get a 201 response, you're golden. It will echo the information you provided, as well as give you a unique ID for that hook.

Example response:

{
 "Data": {
 "WebHookIdEncrypted": "WG1keDlDS1hUZGNyb2cyNXhdnD8RjqmecXc0S1ozbGlVRmFfdmRkbi1xODE1",
 "URL": "https://yourdomain.com/webhooks/listener",
 "WebHookName": "My New Webhook",
 "CreateDT": "2018-09-11T15:20:09.8862116Z"
 },
 "StatusCode": 1
}

Your newly registered webhook will now be available in the automation builder in BenchmarkONE. The next step is to build out your listener in the language of your choice to handle the payloads in whichever way you'd prefer.

When you get a webhook, the payload should look something like this:

{  
   "Data":[  
      {  
         "contactId":"QmNXLWlfVk0zN1dOaERKYU45c0pEZzdxSUZTaE1ZanNvUmpySjc3eGxYYzE1",
         "firstName":"Eric",
         "lastName":"Weiss",
         "title":"Customer Support Rep",
         "company":"The Real Hatchbuck",
         "createdDt":"2017-03-16T19:24:19.327",
         "contactUrl":"https://app.hatchbuck.com//Contact/ContactDetail?eid=QmNXLWlfVk0zN1dOaERKYU45c0pEZzdxSUZTaE1ZanNvUmpySjc3eGxYYzE1",
         "emails":[  
            {  
               "id":"dVRyQlRfLU1GZ3J1ZXBRUk4zSnZWRjd5ZUtpVy1oaW1vWThSV2EtOXBVczE1",
               "address":"eweiss@hatchbuck.com",
               "type":"Work",
               "typeId":"VmhlQU1pZVJSUFFJSjZfMHRmT1laUmwtT0FMNW9hbnBuZHd2Q1JTdE0tYzE1",
               "isPrimary":true
            }
         ],
         "phones":[  
            {  
               "id":"Y211cTRiTVRSZElqUGY4NVVRY1lFV1FQaS1aY2JOeEZBUEd2Xzc4ejZ5VTE1",
               "number":"3142880399",
               "type":"Work",
               "typeId":"QTBncHV0dndnaGNnRVMzLTR0SGtFRmRvZjdqNm4zcVphQi1XX1Z2MXVtRTE1",
               "isPrimary":true
            },
            {  
               "id":"UkhBQ19RTDdnaU1NY09OMWVvYldiQU5zQTU2Umx4VkJBX3czSDhpTi1OUTE1",
               "number":"(866) 991-4888",
               "type":"Work",
               "typeId":"QTBncHV0dndnaGNnRVMzLTR0SGtFRmRvZjdqNm4zcVphQi1XX1Z2MXVtRTE1",
               "isPrimary":false
            }
         ],
         "tags":[  
            {  
               "name":"met my dad",
               "score":3,
               "id":"Yno4aWRiXzFKTUNkcE10cEtBLUQ4eUM4SWRfWlJLWmNCY1dBeXBRLU1kWTE1"
            },
            {  
               "name":"visited website",
               "score":1,
               "id":"TWs0U1hXeDJzdDk5ZHBIcVhzZzVQV3hxOHE1X2IydE9KXy01bGFMU0E4QTE1"
            }
         ],
         "campaigns":[  
            {  
               "name":"ad timers",
               "step":3,
               "id":"1066365"
            },
            {  
               "name":"Basic A - Tags Basic B copy copy",
               "step":3,
               "id":"288854"
            }
         ],
         "status":{  
            "name":"Investigator",
            "id":"VnFMcmNUMXFfT0tXM1RYZ3FWQUdSRkVra1ZDZG1IajZucEo0UzZ3ZkF5VTE1"
         },
         "temperature":{  
            "name":"Colder",
            "id":"d0ZFT3NTdENxMTNjWFZESkdiSWtubGhWWjA0cUpVcy1BWWwzTUdJaVNDRTE1"
         },
         "salesRep":{  
            "username":"tholt576@yahoo.com1",
            "id":"TWpHRE14dFBERVY3c3hQaG9lZ2ZsdkhoWDZLanVYYUk5MktQbEhxRHZZVTE1"
         },
         "addresses":[  
            {  
               "id":"N3cwanMxVjBTVERCcDZUeTh3MmVEemZKNzIwZ0FCUzRHLS1HczJPbkpHYzE1",
               "street":"911 Washington Avenue",
               "city":"St. Louis",
               "state":"MO",
               "zip":"63129",
               "countryId":"LS1qcWZaeVFGdkRXNnZpcTlkclVORHNLMTVnMWhObkFQVnItdmM0RTlTczE1",
               "type":"Work",
               "typeId":"SjFENlU0Y2s2RDFpM0NKWEExRmVvSjZ4T3NJMG5pLWNYZjRseDBSaTVfVTE1",
               "isPrimary":true
            }
         ],
         "timezone":"Central Standard Time",
         "socialNetworks":[           ],
         "instantMessaging":[           ],
         "website":[  
         ],
         "source":{  
            "name":"Facebook",
            "id":"UkRGdHA3YkpiYVYzN3JqVzVhWWxaMlkyejlhd3FxLWxuTmlXZ3pKaE54RTE1"
         },
         "referredBy":"Katie Culp",
         "customFields":[  
            {  
               "name":"Office Location",
               "type":"Text",
               "value":"IDK"
            },
            {  
               "name":"Original Source",
               "type":"Text",
               "value":"Maybe"
            },
            {  
               "name":"BOA / Jr. Ins Agent Email",
               "type":"Text",
               "value":""
            }
         ],
         "subscribed":true
      }
   ],
   "StatusCode":0
}
Did this answer your question?