You can setup one or more Webhook Captures to send leads (or conversion events) to Driftrock.

For example, you might create a Webhook Capture for each source or application you want to connect to Driftrock.

Part 1: Creating a Webhook Capture

You'll first need a Capture to begin sending API calls to Driftrock.

If you are a 3rd party vendor, you might have already been provided one or more Driftrock Capture IDs so you can skip this step.

1. Create or login to your Driftrock account.

2. Browse the Lead Capture Library and choose Webhook.

3. Give you Capture a name by clicking the title - remember, you can create as many Webhook Captures as you like (perhaps for each source or app you connect to).

4. Make your first call to our API (See part 2 for API details).

Send your first test lead to our testing endpoint. With this you can finish setting up the Capture and let us know which fields you are going to send us. See part 2 for details on how to make the request.

5. Once you've sent your test lead, go to the Setup tab and map your incoming fields to your Driftrock standard or custom fields (if you need to create a new one).

6. Thats it! Your leads will appear in reports, and you can add Destinations if you need to send data to other systems.

Part 2: Using the Driftrock Events API

Url:

You can make POST requests to this url:

https://external-apis.driftrock.com/v2/event

Headers:

Content-Type: application/json
Accept: application/json
Authorization: Bearer xxxx-xxxx-xxxx-xxxx

where xxxx-xxxx-xxxx-xxxx is an api key that you can obtain by going to Settings -> Security. You can use a previously created key or create a new one.

Body:
The body must be JSON formatted and containing the required or recommended fields:

  • event_type [string] (required) : this should be set to lead, conversion or action.

  • event_name [string] (required) : tell us what label you would like to assign to this event (eg: User signed up, Page view, Purchase )

  • source_id [string] (required) : this is needed to link the event to the Capture, that you created

  • fields [json] (required) : this is a json field, where you send us the attributes of this event (eg: "fields": {"email": "test@driftrock.com", "question_1": "test answer"} )

  • event_id [string] (optional) : this can be any ID that is used in your system to uniquely identify this event. Note that if you send two events with the same event_id, they will be linked to the same person in our system.

  • person_id [string] (optional) : this can be any ID that is used in your system to uniquely identify a person. Note that if you send two events with the same person_id, they will be linked to the same person in our system.

  • ga_client_id [string] (optional) : this is the Google Analytics ID that you can provide to allow us to extract marketing info.

  • created_at [string] (optional) : if you would like to provide a more precise timestamp for when the event occurred. If not provided it will be set to the moment Driftrock receives the event, this is a subtle distinction but may be important to your business case. This should be passed in ISO8601 format, (eg: 2019-12-02T10:00:00.000Z)

Here's an example of what a simple body would look like

{ 
"event_type": "lead",
"event_name": "User signed up",
"source_id": "034feb07-0cd7-4d44-bbdb-ae18a8a4132f",
"fields": {
"email": "test@driftrock.com",
"first_name": "First name",
"last_name": "Last name",
...
}
}

Did this answer your question?