Setup Webhook

The goal of this tutorial is to show admins how they can use Upmarket Webhoooks to send events and data payloads from Upmarket to downstream systems of record like CRMs easily.

Role

  • Admin

How To Configure a New Webhook

  1. Select Settings from the Toolbar 
  2. Click Webhooks under Integrations 
  3. Click Create Webhook
  4. Enter a Webhook Name and click Create
  5. Enter the webhook/listener URL in the Endpoint field. 
    • Make sure that this is a HTTP POST endpoint and it should return HTTP 200 OK. This URL must be secured over HTTPS.
  6. Select the event type from the Event drop down
    • ex: Call Interactions
  7. Check Create/Update/Delete to enable the type of event to be notified on
    • A green window will appear confirming you have successfully created a Webhook
  8. Click on the Verification Key to copy the verification key to clipboard or click Generate to generate a new verification key
    • Use the copied verification key to to verify whether the event notifications that you receive originate from Upmarket, which will be available in request header as x-verification-key
  9. Create a Username and Password to add basic authentication for the provided Webhook Endpoint URL
  10. Click Create to publish the Webhook

Add Authentication for Webhook Endpoint (Optional)

If the downstream system requires every request to be authenticated with a user/password, you can add the authentication here.

  1. Select Settings from the Toolbar 
  2. Click Webhooks under Integrations 
  3. Click on an existing Webhook or create a new Webhook.
  4. Create a Username and Password to add basic authentication for the provided Webhook Endpoint URL
    • Click Save after any changes made to existing an Webhook

Using a Verification Key (Optional)

You can add a verification key to every outbound request from Upmarket to verify that the data received by the downstream is in fact from Upmarket. This step is recommended, but is optional.

  1. Select Settings from the Toolbar 
  2. Click Webhooks under Integrations 
  3. Click on an existing Webhook or create a new Webhook.
  4. Click on the Verification Key to copy the verification key to clipboard or click Generate to generate a new verification key
  5. Click Save after any changes made to existing an Webhook
  6. Use the copied verification key to to verify whether the event notifications that you receive originated from Upmarket. The key will be available in request header as x-verification-key
  7. To verify that the request was sent from upmarket please compare the x-verification-key header value with the one you received in the above step.

    NodeJS Example:
const VERIFICATION_KEY = “e10adc3949ba59ab”; // Copied verification key from upmarket
if(req.headers[“x-verification-key”] === VERIFICATION_KEY) {
// Request verified
}

Handling Webhook Errors

  • Upmarket will retry the specified endpoint on erroneous returns up to 5 times
  • Please make sure that HTTP 200 OK is returned to avoid repetitive API calls

Webhook Event Data Objects

Calls Event Data Object

{
    "Note": {
      "{{id}}": "string"
    },
    "accountCrmId": "string",
    "accountId": "string",
    "accountName": "string",
    "Answered": "boolean",
    "badNumberStatus": "boolean",
    "callBack": "boolean",
    "callBackDate": "date-time-iso-string",
    "callFlow": "string",
    "callFlowId": "string",
    "callFlowLabel": "string",
    "callFrom": "string",
    "callLengths": {
      "activeToCompleteLength": "string",
      "activeToHangUpLength": "string",
      "dialToActiveLength": "string",
      "dialToCompleteLength": "string",
      "hangUptoCompleteLength": "string",
      "pickedUpToHangUpLength": "string"
    },
    "callRecording": "string",
    "callRecordingFrameRate": "integer",  
    "callTimes": {
      "activeTimestamp": "string",
      "activeTimestampEpoch": "string",
      "activeTimestampFormatted": "hh:mm:ss a",
      "completedTimestamp": "date-time-iso-string",
      "completedTimestampEpoch": "date-time-iso-string",
      "completedTimestampFormatted": "hh:mm:ss a",
      "dialTimestamp": "date-time-iso-string",
      "dialTimestampEpoch": "date-time-iso-string",
      "dialTimestampFormatted": "hh:mm:ss a",
      "hangUpTimestamp": "date-time-iso-string",
      "hangUpTimestampEpoch": "date-time-iso-string",
      "hangUpTimestampFormatted": "hh:mm:ss a",
      "pickedUpTimestamp": "date-time-iso-string",
      "pickedUpTimestampEpoch": "date-time-iso-string",
      "pickedUpTimestampFormatted": "hh:mm:ss a",
      "startTimestamp": "date-time-iso-string",
      "startTimestampEpoch": "date-time-iso-string",
      "startTimestampFormatted": "hh:mm:ss a"
    },
    "callTo": "string",
    "callType": "string",
    "channel1": "string",
    "channel1FrameRate": "integer",
    "channel2": "string",
    "channel2FrameRate": "integer",
    "clientId": "boolean",
    "complete": "boolean",
    "contactId": "string",
    "contactName": "string",
    "content_script": "string",
    "createdTime": "timestamp",
    "dateCompleted": "date-time-iso-string",
    "dateCreated": "date-time-iso-string",
    "department": "string",
    "departmentId": "string",
    "departmentLabel": "string",
    "direction": "string",
    "outcome": "string",
    "outcomeLabel": "string",
    "emailFollowUpStatus": "boolean",
    "isCustomVersion": "boolean",
    "meetingStatus": "boolean",
    "noAnswer": "boolean",
    "noteId": "string",
    "notes": "string",
    "notesAdded": "boolean",
    "pickedUp": "boolean",
    "recordingChannels": "string",
    "recordingStarted": "boolean",  
    "result": "string",
    "sentiment": "string",
    "socialProof": [
      "{{id}}"
    ],
    "socialProofLabel": [
      "{{id}}"
    ],
    "team": "string",
    "teamId": "string",
    "teamLabel": "string",
    "meetingPlan": "string",
    "triggerLabel": "string",
    "twoPartyState": "boolean",
    "uId_gridId_createdTime": "id_gridId_timestamp",
    "unsubscribe": "boolean",
    "user": "string",
    "userName": "string",
    "version": "string",
    "versionLabel": "string",
    "voicemail": "boolean",
    "voicemailId": "boolean",
    "voicemailLabel": "boolean"
}

Meeting Event Data Object

{
  "duration": "integer",
  "end_time": "date-time-iso-string",
  "participant": {
    "email": "string",
    "join_time": "date-time-iso-string",
    "user_name": "string"
  },
  "participants": {
    "{{participantId}}": {
      "email": "string",
      "leave_time": "date-time-iso-string",
      "user_name": "string"
    }
  },
  "recordings": {
    "{{recordingId}}": {
      "file_extension": "string",
      "file_size": "integer",
      "file_type": "string",
      "recording_end": "date-time-iso-string",
      "recording_start": "date-time-iso-string",
      "recording_type": "string"
    }
  },
  "start_time": "date-time-iso-string",
  "status": "string",
  "timezone": "string",
  "topic": "string",
  "type": "integer",
  "uid": "string"
}

Email Event Data Object

{
    "accountId": "string",
    "activityId": "string",
    "contactId": "string",
    "createdTime": "timestamp",
    "from": "string",
    "gridId": "string",
    "message": "string",
    "messageId": "string",
    "read": "integer",
    "readDates": [
      "timestamp"
    ],
    "subject": "string",
    "taskId": "string",
    "templateId": "string",
    "threadId": "string",
    "to": "string",
    "uId_gridId_createdTime": "uid-gridId-timestamp",
    "user": "string",
    "userId": "string"
}

LinkedIn Message

{
  "accountId": "string",
  "activityId": "string",
  "contactId": "string",
  "createdTime": "timestamp",
  "gridId": "string",
  "sendDate": "timestamp",
  "taskId": "string",
  "uId_gridId_createdTime": "uid_gridId_timestamp",
  "user": "string"
}

LinkedIn Connect

{
  "accountId": "string",
  "activityId": "string",
  "contactId": "string",
  "createdTime": "timestamp",
  "gridId": "string",
  "sendDate": "timestamp",
  "taskId": "string",
  "uId_gridId_createdTime": "uid_gridId_timestamp",
  "user": "string"
}
Was this article helpful?

Related Articles