# whatsapp.automatic_event

Meta's automatic event identification detected a lead or purchase in a Click-to-WhatsApp conversation.

### Payload notes

Branch on `eventName` (`LeadSubmitted` or `Purchase`). `Purchase` may carry the detected amount in `customData` (`currency`, `value`). It carries the `ctwaClid`.

### Conversions API match key

Meta omits the clid on a minority of referrals, most often WhatsApp Status placements; this event can supply it. Zernio writes it onto the conversation, so `POST /v1/whatsapp/conversions` becomes usable for it.

### Availability

Detection is not available for EU, UK and JP businesses. Elsewhere the owner opts in during Embedded Signup. An endpoint subscribed on a number whose owner did not opt in receives nothing.




**Payload for `whatsapp.automatic_event`:**

- **test** `boolean`: Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
- **id** `string`: Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
- **profiles**: `WebhookProfiles` - See schema definition
- **event** `string`: No description - one of: whatsapp.automatic_event
- **timestamp** `string` (date-time): UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
- **accountId** `string`: SocialAccount id of the WhatsApp number whose conversation was flagged.
- **conversationId** `string`: Zernio conversation id, when the thread could be resolved.
- **platformMessageId** `string`: The wamid of the message Meta's analysis flagged.
- **eventName** `string`: Meta-detected event: `LeadSubmitted` | `Purchase`.
- **ctwaClid** `string`: Meta's CTWA click id, the Conversions API match key.
- **customData** `object`: Purchase events may carry the detected amount.
  - **currency** `string`: No description
  - **value** `number`: No description
- **detectedAt** `string` (date-time): No description