Webhooks
When to use the server-side integration
Server-side requests are useful for sending information that occurs off your main property in real-time. Common use cases include:
- Passing in-store purchases in real-time
- Back-end events that occur in a sales funnel (i.e. phone call, package shipped, package returned)
Requirements
In order to setup webhooks, you must also be firing an Identify Pixel with corresponding user data whenever the user is authenticated on your website. This is required for us to match users from the webhook to onsite activity.
Webhooks must be delivered as valid JSON - Rockerbox cannot ingest XML or other formats
Server-side specs
You will need the following field from Rockerbox. Please ask your account manager for this field.
- Advertiser ID
Submit a POST request to:
https://webhooks.getrockerbox.com/webhook/data?advertiser=REPLACE_WITH_ADV_ID
Attach to this post a data object containing the required fields as well as any extra fields that you’d like to send to Rockerbox.
Required Parameters
email: the email associated with the user (string) customer_id: your internal identifier for the user (string) action: the name of the conversion event that the call is associated with (string) timestamp: the time of the conversion
Optional Pre-Defined Parameters:
- revenue
- order_id
- conversion_source
- in_store
- salesforce
- phone
Batch Server-side Integration
If you are unable to message Rockerbox in real-time and will be sending multiple events at once in batches, make sure to add the parameter below to your requests.
- timestamp: epoch UTC timestamp of the transaction
- Sample: “timestamp”:“1535147451”
Other Parameters
You can include as many additional parameters as you’d like. Just make sure it’s proper JSON
Sample Payloads
The following is an example of a marketing event payload where the timestamp is passed in epoch.
{
"user_id": "ce395cc1-9f1f-4fe1-a8a0-a279a8c33ab4",
"timestamp": "1535147451",
"ad_campaignid": "1035987215",
"ad_adgroupid": "2358097292",
"ad_creativeid": "88902099811"
}
The following is an example of a Subscription Order.
{
"email": "hello@rockerbox.com",
"timestamp": "1535147451",
"order_id": "PRCH11809871",
"revenue": "27.50",
"order_type": "subscription_start",
"order_timestamp": "2023-05-05 23:24:11.695"
}