Skip to main content
These examples show request bodies for POST /businesses/{id}/track. The event identifier is sent as top-level event. Customer identifiers, purchase amounts, and other event fields are sent inside top-level data.
Create or find the project-defined event in Project Defined Events. For example, an event named purchase_completed corresponds to a project-defined event with a public ID like pde_XXXX. Use that public ID as the top-level event in the payload. Configure purchase_amount_path on that project-defined event; Pocketflows resolves the path inside the event data.

Customer Identification

Option 1: Customer ID as a string

{
  "event": "pde_XXXX",
  "data": {
    "customer": "cust_abc123"
  }
}

Option 2: Customer as an object with id

{
  "event": "pde_XXXX",
  "data": {
    "customer": {
      "id": "cust_abc123"
    }
  }
}

Purchase Amount

The shape of the payload depends on your purchase_amount_path configuration. The path is resolved inside the event data.

Flat key — purchase_amount_path: "order_amount"

{
  "event": "pde_XXXX",
  "data": {
    "customer": "cust_abc123",
    "order_amount": 49.99
  }
}

Nested key — purchase_amount_path: "order.amount"

{
  "event": "pde_XXXX",
  "data": {
    "customer": "cust_abc123",
    "order": {
      "amount": 49.99
    }
  }
}

Deeply nested — purchase_amount_path: "order.total.amount"

{
  "event": "pde_XXXX",
  "data": {
    "customer": "cust_abc123",
    "order": {
      "total": {
        "amount": 49.99
      }
    }
  }
}