SiteEventBatchRequest
events object[]required
Possible values: >= 1, <= 100
The event's id on the site — a UUID generated when it happened. It is what makes a resend count as a duplicate; the same id twice in one batch is one event.
Possible values: Value must match regular expression ^[A-Za-z0-9_.:-]{8,64}$
9b2f6c1e-4d7a-4f0e-9a51-2f8c3d6e7a10<source>.<object>.<what happened>. Your own integration's events go under custom..
Possible values: <= 80 characters, Value must match regular expression ^(wp|wc|wcs|form|fcrc|custom)(\.[a-z0-9_]+){1,3}$
wc.order.paidWhen it happened, in ISO 8601 with a time zone.
The version of this event's data format.
Possible values: >= 1 and <= 100
1The site's address (home_url() in WordPress). When sent, it must be the one the site was connected at.
Possible values: <= 500 characters
https://store.example.comcontact objectnullable
The person the event is about. Without one, no flow starts.
ref objectrequired
Who the person is on the site — the link that finds the same contact even after a change of number.
wp_user: a WordPress user. wc_customer: a WooCommerce customer. wc_guest: a purchase without an account. lead: someone known only by a form or a cart.
Possible values: [wp_user, wc_customer, wc_guest, lead]
The person's id on the site. Someone without an account (wc_guest, lead) goes by the sha256 of their e-mail.
Possible values: non-empty and <= 191 characters
42Possible values: <= 40 characters
Possible values: >= 2 characters and <= 2 characters
Possible values: <= 80 characters
Possible values: <= 80 characters
Possible values: <= 254 characters
Possible values: Value must match regular expression ^[a-z]{2}(-[A-Z]{2})?$
attributes object
Possible values: <= 20
Possible values: <= 20
consent object
The consent the person gave or withdrew on the site. An opt-out always applies; an opt-in
only moves a contact from unknown to opted_in, never over an opt-out or a
suppression.
- Opt-in
- Opt-out
Possible values: [opted_in]
What the person agreed to and where: the ticked box's text, the order, the site.
Possible values: >= 3 characters and <= 500 characters
When the person agreed.
data object
What happened, in whatever shape the site chooses. In the flow, it is under {{trigger.<path>}}.
What happened, in whatever shape the site chooses. In the flow, it is under {{trigger.<path>}}.
{}{
"events": [
{
"id": "9b2f6c1e-4d7a-4f0e-9a51-2f8c3d6e7a10",
"name": "wc.order.paid",
"occurred_at": "2024-07-29T15:51:28.071Z",
"schema_version": 1,
"site_url": "https://store.example.com",
"contact": {
"ref": {
"kind": "wp_user",
"id": "42"
},
"phone": "string",
"country": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"locale": "string",
"attributes": {},
"tags": [
"string"
],
"remove_tags": [
"string"
],
"consent": {
"status": "opted_in",
"evidence": "string",
"at": "2024-07-29T15:51:28.071Z"
}
},
"data": {}
}
]
}