Affiliate Admin was Assigned

Fires when an affiliate admin is assigned to an order. targetEntity is the Order. The eventType is affiliate_admin_was_assigned.

Field guarantees

FieldGuarantee
eventData.performedBy✅ Always present (v1)
performedBy in v2⛔ Not delivered — blocked as PHI-adjacent
🚧

performedBy is v1-only. Note performedBy is the user who performed the assignment; the admin who was assigned appears only in eventDescription free text — an unstructured, unguaranteed source that must not be parsed. Both are absent from v2 — keep this webhook on v1 if you need either.

v1 payload (legacy)

{
  "_id": "event::2d3e4f5a-xxxx-xxxx-xxxx-6b7c8d9e0f1a",
  "ownerEntity": "pat::117eb3b9-xxxx-xxxx-xxxx-9424274b5425",
  "ownerEntityModel": "Patient",
  "targetEntity": "order::e5576e92-xxxx-xxxx-xxxx-3c3173a3fb82",
  "targetEntityModel": "Order",
  "eventTitle": "Affiliate Admin was Assigned.",
  "eventDescription": "Affiliate admin assignment recorded.",
  "eventType": "affiliate_admin_was_assigned",
  "eventData": {
    "performedBy": {
      "id": "usr::154300b9-xxxx-xxxx-xxxx-c09f9be9f8d7",
      "role": "affiliate-super-admin",
      "name": "REDACTED"
    }
  },
  "deleted": false,
  "createdAt": { "$date": "2026-01-01T12:00:00.000Z" },
  "updatedAt": { "$date": "2026-01-01T12:00:00.000Z" },
  "__v": 0
}
eventData fieldTypeAlways?Notes
performedByobject {id, role, name}The user who performed the assignment

v2 payload

Sanitized envelope. performedBy is stripped; the order reference is resolved from the target order.

{
  "event_type": "affiliate_admin_was_assigned",
  "event_id": "event::2d3e4f5a-xxxx-xxxx-xxxx-6b7c8d9e0f1a",
  "api_version": "2026-08-09",
  "timestamp": "2026-05-30T14:00:00.000Z",
  "affiliate_id": "aff::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "patient_id": "pat::117eb3b9-xxxx-xxxx-xxxx-9424274b5425",
  "patient_external_id": "ext-patient-123",
  "patient_marketing_consent": false,
  "is_returning_patient": true,
  "order_id": "order::e5576e92-xxxx-xxxx-xxxx-3c3173a3fb82",
  "order_status": "requires_affiliate_review"
}
FieldDelivered in v2Notes
Envelope + patient identity
order_id, order_statusResolved from the target order
performedByStripped