Skip to main content

SiteEventBatchRequest

events object[]required

Possible values: >= 1, <= 100

  • Array [
  • idstringrequired

    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}$

    Example: 9b2f6c1e-4d7a-4f0e-9a51-2f8c3d6e7a10
    namestringrequired

    <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}$

    Example: wc.order.paid
    occurred_atstring<date-time>required

    When it happened, in ISO 8601 with a time zone.

    schema_versioninteger

    The version of this event's data format.

    Possible values: >= 1 and <= 100

    Default value: 1
    site_urlstring

    The site's address (home_url() in WordPress). When sent, it must be the one the site was connected at.

    Possible values: <= 500 characters

    Example: https://store.example.com
    contact 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.

    kindstringrequired

    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]

    idstringrequired

    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

    Example: 42
    phonestringnullable

    Possible values: <= 40 characters

    countrystringnullable

    Possible values: >= 2 characters and <= 2 characters

    first_namestringnullable

    Possible values: <= 80 characters

    last_namestringnullable

    Possible values: <= 80 characters

    emailstringnullable

    Possible values: <= 254 characters

    localestringnullable

    Possible values: Value must match regular expression ^[a-z]{2}(-[A-Z]{2})?$

    attributes object
    property name*any
    tagsstring[]

    Possible values: <= 20

    remove_tagsstring[]

    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.

    oneOf
    statusstringrequired

    Possible values: [opted_in]

    evidencestringrequired

    What the person agreed to and where: the ticked box's text, the order, the site.

    Possible values: >= 3 characters and <= 500 characters

    atstring<date-time>

    When the person agreed.

    data object

    What happened, in whatever shape the site chooses. In the flow, it is under {{trigger.<path>}}.

    property name*any

    What happened, in whatever shape the site chooses. In the flow, it is under {{trigger.<path>}}.

    Default value: {}
  • ]
  • SiteEventBatchRequest
    {
    "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": {}
    }
    ]
    }