Eventer
Eventer is a Pipe for registering channel events in the platform. It is used to record sending, delivery, non-delivery events, as well as to manage moderation and stopping of placement mailings.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
event_type | string | No | — | Event type. Required for stop, moderate_pass, moderate_error. Not used for other event types |
channel_id | int | No | — | Numeric channel identifier. If not set, taken from the event context. Not required for stop, moderate_pass, moderate_error |
action_type | int | No | — | Numeric event identifier within the channel (Event ID). Required for all event types except stop, moderate_pass, moderate_error |
event | object | Yes | — | Event parameters (see below) |
Event Parameters (event)
| Field | Type | Required | Description |
|---|---|---|---|
send_message_id | string | Yes | Message identifier in the platform. Supports templating |
time | string | No | Event time in RFC3339 format (e.g., 2024-05-15T10:30:00Z). If specified, the event is assigned this date instead of the current time |
message | string | No | Text message attached to the event. Supports templating. Useful for recording error text in a bounce: "message": "$error.code $error.message" |
caution
Possible Errors
- Template processing error in
params.event.send_message_id - Invalid format of
params.event.send_message_id
Examples
Send Event Registration
{
"id": 100,
"type": "event",
"params": {
"channel_id": 10001,
"action_type": 100021,
"event": {
"send_message_id": "$origin.send_message_id"
}
},
"outs": {
"error": 101
}
}
Stop Placement Mailing
{
"id": 150,
"type": "event",
"params": {
"event_type": "stop",
"event": {
"send_message_id": "$origin.send_message_id"
}
}
}
Moderation Error
{
"id": 18,
"type": "event",
"params": {
"event_type": "moderate_error",
"event": {
"send_message_id": "$origin.send_message_id"
}
},
"outs": {
"success": 19,
"error": 20
}
}
Recording Error in Bounce
The message field allows saving the error text from a previous pipe (e.g., HTTP code and description from http_request) into the event:
{
"id": 4,
"type": "event",
"params": {
"channel_id": 10001,
"action_type": 100003,
"event": {
"send_message_id": "$origin.send_message_id",
"message": "$error.code $error.message"
}
}
}