Docs / Introduction / 

Send Events Using Webhooks

Send Events Using Webhooks

Events can be sent to Able CDP from custom apps using its inbound webhook. This is convenient to attribute purchases and other conversions that aren't necessarily reflected in the payment system. For example, when the service usage accumulates before being invoiced once a payment threshold is reached or next billing cycle occurs.

Custom events should be sent to Able as POST requests to https://app.ablecdp.com/uip-events/event in JSON format with Content-Type: application/json header.

Request body example for a purchase:

{
  "funnel_mark": "%%FUNNEL_MARK%%",
  "event_type": "Purchase",
  "resource": {
  	"deal_value": 10,
    "deal_currency": "USD",
    "deal_items": [
    	{ 
      	"name": "File download", price: 5, qty: 2, sku: "DL1", category: "High-speed"
      } 
    ], 
    "keys": { 
    	"email": "john@aol.com",
      "client_id": "12354"
    }
  }
}

%%FUNNEL_MARK%% is the unique funnel identifier. sku and category in deal_items are optional, they’re used for various groupings and reporting in Google Analytics. keys must have at least one value.

Complete request format reference, only the fields marked with asterisk are mandatory:

  • * funnel_mark - unique funnel identifier, available in the Get Code section of the Able CDP Dashboard.
  • * event_type - PageView, CompleteRegistration, Purchase. Supported event types depend on the integration and generally follow Facebook standard events names.
  • * resource - detailed event and customer information

Resource object reference:

  • referrer_url
  • utm_source
  • utm_medium
  • utm_campaign
  • utm_term
  • utm_content
  • deal_value - full value of the purchase or conversion
  • deal_currency - purchase or conversion currency, mandatory when deal_value is set
  • deal_items - array of items included in the deal, optional. Each item may include name, price, qty, sku and category
  • event_source - URL for web events, name of the integration for server-to-server and offline events
  • lead - Lead object. May have arbitrary fields, which are automatically mapped by outbound CRM integrations. Suggested values are: firstName, lastName, company, country, industry
  • description - event description, used as the purchased item name when deal_items are missing.
  • message - lead form message text
  • order_id - internal unique order identifier
  • custom_data - optional extra fields passed to integrations without processing. For example, Stripe integration populates 'coupon' field when a coupon is used, and a Facebook integration sends each extra field to the destination Pixel or Event Set as a custom parameter
  • client - hash with two keys ip and ua, containing users' browser details: IP address and user-agent respectively
  • * keys - Visitor Keys. Uniquely identify customer, linking front-end events and back-end events together. At least one supported Visitor Key must be present. Each key can be a string or an array of strings if multiple key values of the same type need to be passed.

Supported Visitor Keys:

  • phone - phone number
  • email
  • client_id - application specific client (visitor) id
  • gclid, wbraid, gbraid - Google Ads Click Id
  • fbp, fbclid - Facebook click identifier, fbc and fbp cookies
  • ga_cookie - Google Analytics Client Id / meaningful part of _ga cookie
  • app_instance_id - a unique identifier of the Firebase app instance
  • apladid - Apple Advertising Identifier
  • andadid - Android Advertising ID
  • msclkid - Microsoft Ads / Bing Ads click id
  • ttp, tpclid - TikTok Pixel cookie and click id

In server-side integrations normally only a phone, email and/or client_id is sent, as the rest of the identifiers are tracked by the visitor tracking script and Able should be able to attribute transaction to the original visitor internally.