Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

An Event Context is the payload Omneo provides when an event fires — via a webhook or a reaction. It differs from a standard API response in that it includes enriched, related data alongside the triggering object to minimise the need for additional API calls.

Why contexts are different from API responses

A standard GET /api/v3/profiles/{id} response returns the profile object. The profile event context returned by a profile.updated webhook also includes:
  • Aggregations (spend_12m, shop_count, etc.)
  • flattened_tags (tags as a flat array for easier JSON Logic evaluation)
  • flattened_statuses
  • Current tier and tier definition
  • Profile attribute objects (comms, appearance)
This means your webhook handler can act on the event without making additional API calls back to Omneo.

Profile event context

Fields available at root level (accessed directly as first_name, not profile.first_name):
{
  "id": "8fc344db-713e-4590-ab26-e82d77ba3313",
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane@example.com",
  "gender": "female",
  "tier_handle": "gold",
  "joined_at": "2023-01-15 00:00:00",
  "birth_year": 1985,
  "birth_month": 9,
  "birth_day": 15,
  "flattened_tags": ["vip", "stylist-client"],
  "flattened_statuses": ["active"],
  "reward_balance": 25.00,
  "point_balance": 1500,
  "combined_balance_dollars": 40.00,
  "aggregations": {
    "spend_12m": 2450.00,
    "spend_all": 12800.00,
    "spend_atv_12m": 175.00,
    "shop_count": 14,
    "shop_days": 12
  },
  "tier": {
    "handle": "gold",
    "name": "Gold"
  },
  "attributes": {
    "comms": {
      "email_promo": true,
      "email_optout": false,
      "sms_promo": false
    },
    "appearance": {
      "size_top": "12",
      "size_shoe": "8"
    }
  }
}

Transaction event context

For transaction.created and transaction.updated events, the context includes the transaction and the linked profile:
{
  "id": "txn-uuid",
  "profile_id": "profile-uuid",
  "total": 149.95,
  "total_original": 199.95,
  "transacted_at": "2025-06-15 14:32:00",
  "external_id": "ORDER-10334",
  "receipt_ref": "659",
  "location_id": 2,
  "items": [...],
  "profile": {
    "id": "profile-uuid",
    "first_name": "Jane",
    "tier_handle": "gold",
    "aggregations": { ... }
  }
}

Tier achieved context

For tier.achieved events, the context includes the profile and the tier definition that was achieved:
{
  "profile_id": "profile-uuid",
  "definition": {
    "handle": "gold",
    "name": "Gold"
  },
  "profile": { ... }
}

Using contexts in reactions

All fields in an event context are available as variables in reaction filters and target templates. See JSON Conditions for how to reference them.

Context vs API response

If you need data not included in the context (e.g., full address list, complete transaction history), make a follow-up API call using the profile_id from the context.