For the complete documentation index, see llms.txt. This page is also available as Markdown.

Braze integration

This guide applies only when selling pre-orders through Purple Dot's own checkout. Pre-orders sold through the Shopify checkout benefit from the same tracking as your regular sales.

If you have enabled the Braze integration from the Integration settings page in the Merchant Portal, when a shopper buys a pre‑order the Purple Dot checkout will send one POST /users/track request that:

  1. Upserts marketing consent to the shopper’s profile ( attributes)

  2. Logs the pre_order_placed event (events)

  3. Emits a purchase row per line‑item (purchases)


{
  "attributes": [
    {
      "email": "<shopper_email>",
      "has_email_marketing_consent": <true|false>,
      "has_sms_marketing_consent": <true|false>
    }
  ],
  "events": [
    {
      "email": "<shopper_email>",
      "name": "pre_order_placed",
      "time": "<ISO8601_timestamp>",
      "properties": {
        "order_id": "<pre_order_reference>",
        "source": "Purple Dot",
        "shipping": {
          "address": {
            "first_name": "<first_name>",
            "last_name": "<last_name>",
            "address1": "<address_line_1>",
            "address2": "<address_line_2>",
            "city": "<city>",
            "region": "<state_or_region>",
            "country": "<country_code>",
            "postal_code": "<postal_code>",
            "phone_number": "<phone_number>"
          }
        },
        "total_price":  { 
            amount: <pre-order total price>,
            currency: <price currency> 
        },
        "discounts": <array_of_discount_objects>,
        "items": [{
            product_id: <line-item product ID>,
            product_name: <line-item product name>,
            variant_id: <line-item variant ID>,
            sku: <line-item variant SKU>,
            quantity: <line-item quantity>,
            item_price: <price of single item>,
            row_total: <total price of row>, 
        }]
      }
    }
  ],
  "purchases": [{
    email: "<shopper_email>",
    time: "<ISO8601_timestamp>",
    currency: <pre_order currency>,

    product_id:  <line-item product ID>,
    product_name: <line-item product name>,
    variant_id: <line-item variant ID>,
    sku:<line-item variant SKU>,
    quantity:  <line-item quantity>,
    price: <price of single item>,
  }]
}

Last updated