Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/signals/applications/forward-interventions/reference.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/signals/llms.txt.

Forwarded intervention reference

Public preview

Intervention forwarding is in public preview. You can't configure it in Console: Snowplow deploys it for you after you request it. Its configuration and payload may change in ways that aren't backward compatible before it's generally available.

This page describes what Snowplow sends when it forwards interventions to your destination, and how it handles your webhook's responses.

Each forwarded intervention is a JSON object. It contains the same information as the payload that subscriptions receive, but in a different shape: the target is in attributeKey, and attributes is a list.

The payload follows the iglu:com.snowplowanalytics.signals/intervention_instance/jsonschema/1-0-0 schema in Iglu Central. Use it to validate the payloads you receive, or to generate types for your code.

Parameters​

The forwarded payload has these fields:

FieldDescriptionType
intervention_idA unique identifier for this triggered interventionstring
nameThe name of the interventionstring
versionThe intervention versioninteger
attributeKey.nameThe name of the target attribute keystring
attributeKey.idThe value of the target attribute keystring
attributesThe attribute values you selected to send with the interventionarray
attributes[].attributeThe attribute, as <attribute_group>_v<version>:<attribute_name>string
attributes[].valueThe attribute value, encoded as a JSON stringstring

Parse each value as JSON to get the typed value. The order of the attributes list isn't fixed, so look attributes up by their attribute name. If an intervention doesn't send any attribute groups, the payload has no attributes field.

Example​

This example payload is for an intervention that sends two attributes:

json
{
"intervention_id": "2db4dc3a-fb77-44bf-9d27-0a92a6c1e879",
"name": "high_value_cart_abandonment",
"version": 2,
"attributeKey": {
"name": "domain_userid",
"id": "218e8926-3858-431d-b2ed-66da03a1cbe5"
},
"attributes": [
{
"attribute": "cart_attributes_v1:cart_value",
"value": "250"
},
{
"attribute": "cart_attributes_v1:unique_products_viewed",
"value": "[\"https://example.com/shoes\",\"https://example.com/socks\"]"
}
]
}

Here, "250" parses to the number 250, and the second value parses to an array of strings.

For a webhook, Snowplow sends the payload as the body of a request with these headers:

POST /interventions/forward HTTP/1.1
Host: profiles.example.com
Authorization: Bearer <your token>
Content-Type: application/json

Errors​

Return a 2xx status code from your webhook once it has accepted the intervention. Snowplow handles other responses as follows:

ResponseHow Snowplow handles it
400, 413, or 422Snowplow treats the intervention as invalid, saves it as a failed event, and doesn't retry it.
401, 403, 404, 405, 410, or 415Snowplow treats the request as a setup error, such as a wrong token or path. It stops delivering and retries occasionally until you fix the problem.
429Snowplow treats the request as throttled and retries it later.
5xx, timeouts, or connection errorsSnowplow retries the request with exponential backoff. If it still fails, Snowplow saves the intervention as a failed event.

These categories work the same way as for event forwarders.

Was this page helpful?