Skip to main content
Analytics Webhooks

To send Builtfirst data to your data analysis tools

Updated over 9 months ago

To configure a webhook, go to the top right menu > Webhooks.


Each webhook call includes one log. Logs are sent asynchronously.

Events types (log types)

Redemptions
Logs associated with the redemption process

  • Confirmed (redemption_confirmed)

    • Triggered whenever a user clicks on the “Yes, it’s been activated” button, this should be interpreted as the user confirming they got the deal, not every user will actually click the button even if they got the deal.

    • Data sent with the event(fields detailed below): Event, Redemption

  • Support requested (redemption_support_requested)

    • Triggered when a user clicks on the “No, I need help to connect with support” button

    • Data sent with the event(fields detailed below): Event, Deal, Buyer-org, Buyer-user, Community

  • Activated (redemption_activated)

    • The user clicks on the “Complete with …” or “Send email to …” button, which indicates that the user triggered the redemption flow(an email was sent to the deal provider or the landing page of the deal was shared with the user)

    • Data sent with the event(fields detailed below): Event, Redemption

  • Reviewed (redemption_reviewed)

    • The user clicks on the “I reviewed the offer” button, which indicates interest from the user, it’s a necessary step before they can trigger the “redemption_activated” event

    • Data sent with the event(fields detailed below): Event, Redemption

  • Clicked(redemption_clicked)

    • This event is triggered whenever a user visits a particular deal page

    • Data sent with the event(fields detailed below): Event, Discount

Items

  • Searched(items_searched)

    • The user searches on the page with the list of products

    • Data sent with the event(fields detailed below): Event, Searches

Object types:

Event

id 
type
data
mock //"true" as value if this is a test with no real data

Product

id 
name
seller_id
seller_name
deal //optional

Deal

id 
title
saving_amount
version

Buyer-org

id 
name
user: User

User

id 
name
email

Community

id 
name

Search

term 
buyer_org
community

Categories(not in the first version)

[
{
name
}
]

Collection(not in the first version)

[
{
name
}
]

Redemption

product 
buyer_org
community

Example 1

{
id: "unique of each log",
object: "event",
mock: true,
type: "redemption_activated",
data:{
object: "redemption",
product:{
object: "product",
id: "ID",
name: "Novo product name",
seller_id: "ID",
seller_name: "Novo Inc.",
deal: { //optional
object: "deal"
id: "ID",
title: "20% OFF Partnership Tech",
saving_amount: 4000,
version: "2022-06-06 20:24:29.809"
},
},
buyer_org:{
object: "buyer_org",
id: "ID",
name: "Krajcik-O'Hara corp",
user: {
object: "user",
id: "ID",
name: "",
email: "anything@builtfirst.com",
}
},
community:{
object: "community",
id: "ID",
name: "Marketplace name"
}
}
}

Example 2

{
id: "unique of each log"
object: "event",
type: "items_searched",
data:{
object: "search",
term: "search term entered by the user",
buyer_org:{
object: "buyer_org",
id: "ID",
name: "Krajcik-O'Hara corp",
user: {
object: "user",
id: "ID",
name: "",
email: "anything@builtfirst.com",
}
},
community:{
object: "community",
id: "ID",
name: "Marketplace name"
}
}
}

Origin validation

Each webhook call will include a header so that it can be validated that Builfirst is the source of the request.

The header is "Builtfirst-Webhook-Signature-SHA256" and the value will be a hash of the request body signed with a secret key that can be found on the webhook configuration page.

Example of Node implementation to validate the signature:

const crypto = require('crypto')

const body = `raw json sent by Builtfirst`
const secret = '';
const hash = crypto.createHmac('sha256', secret)
.update(body)
.digest('hex');

The "hash" variable value should be equal to "Builtfirst-Webhook-Signature-SHA256"

Did this answer your question?