Action Hook Message Structure
General hook message structure for all event types:
| Parameter | Type | Example | Description |
|---|---|---|---|
| event_type | string | "click" | Event name from the events table |
| event_date | string | "2018-03-04T13:13:19.034315796Z" | Event timestamp in RFC 3339 format |
| profile_id | string | "abcdefgh12345678" | Profile ID of the recipient |
| _xxh | string | "ad1850e0d1d9481e" | Email XXHash used for profile identification in Altcraft |
| _md5 | string | "145bb30f7ddf1184cb560bc4b7705646" | MD5 hash of the subscriber's email |
| list_id | int | 111 | Database ID in which the event occurred |
| account_id | int | 23 | Account ID under which the event occurred |
| sends_trying_num | int | 2 | Number of message sending attempts (present only if the number of attempts is greater than 0) |
| is_test | bool | false | Indicates whether the event was triggered by test sending |
| is_static | bool | false | Whether dynamic substitutions were used in the message content |
| subscription_hash_id | string | "0a4b910312345" | Subscription hash |
| custom_data | JSON object | {"alice@example.org"} | Custom data set defined in the action hook settings interface |
| event_data | JSON object | {"browser": "Firefox"} | Event-specific data (can be tracking or delivery event data) |
| subscription | array | [ | An array with subscription details including information about the resource, communication channel, recipient, and subscription status. The structure is described below. |
When exporting historical events, message content is not transferred. Events are sent in the same format as in real time, and null is passed for deleted profiles.
event_data structure
Tracking events
These event types are considered tracking events:
- uopen, open, uclick, click, confirm, confirmsub, unsub, read, glanced, skimmed,
- uclick_sms, click_sms, uclick_sms, unsub_sms,
- uopen_push, open_push, click_push, uclick_push.
| Parameter | Type | Example | Description |
|---|---|---|---|
| message_id | int | 17 | Message template ID in Altcraft |
| campaign_id | int | 973 | Campaign ID |
| scampaign_id | int | 973 | Campaign ID in Altcraft system |
| segment_id | int | 0 | Segment ID if available |
| resource_id | int | 3 | Resource ID |
| ip | string | "10.9.0.14" | Subscriber's IPv4 address |
| country | string | ".us" ".ru" | Country top-level domain |
| city | string | "New York" "Moscow" | Subscriber's city |
| postal_code | string | "101000" | Postal code |
| region | string | "Ohio" "Moskovskaya oblast" | Region |
| tz | string | "Europe/Vaduz" | Time zone |
| lat | float | 55.244075 | Latitude |
| lon | float | 55.244075 | Longitude |
| user_agent | string | "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" | User-Agent string |
| os | string | "Linux x86_64" | Operating system |
| browser | string | "Firefox" | Browser and version |
| device | string | "web" | Device |
| link_url | string | "http://www.example.com" | Redirect link |
| launch_id | string | "00000017000003cd5a9bf01a" | Campaign launch ID |
| send_message_id | string | "5a9bf01a17_3cd_11_6f_0_2.5a8c045fc1dde44cbf718f78" | SendMessageID |
| full_message_id | string | "fQIQs4FgAAEBIcARAxDxAQAAEJECFQADuZJygDTgWXpQ_BVrkejVzu2bsMzQ3NDkxODlKR8-gA" | Full SendMessageID |
| email_message_id | string | "mzi5c1~+9vqekqmy63mh8xhgt2qjwfkad6lmiafbyn-0te1_uzckfqyi4ry" | Email-safe SendMessageID (email events only) |
| extra_uid | string | "ew4Sgf41Qwjq8_2_2E_w_k___t.2SDvJv8bvBYQFtSDx_7bTV2f.2_2E_4Sgf41DXc7Z_D" | Extra UID (for push events only) |
| provider | string | "YandexAppMetricaDeviceIDAndroid" | Provider |
| prev_st | int | 1 | Group identifier: 1 - test group, 2 - control group |
Messaging events
For event types:
- send, deliv, suppress, complain,
- send_sms, deliv_sms,
- send_push, deliv_push.
| Parameter | Type | Example | Description |
|---|---|---|---|
| message_id | int | 17 | Message template ID in Altcraft |
| campaign_id | int | 973 | Campaign ID |
| segment_id | int | 0 | Segment ID if available |
| resource_id | int | 3 | Resource ID in Altcraft |
| launch_id | string | "00000017000003cd5a9bf01a" | Launch ID |
| send_message_id | string | "5a9bf01a17_3cd_11_6f_0_2.5a8c045fc1dde44cbf718f78" | SendMessageID |
| full_message_id | string | "fQIQs4FgAAEBIcARAxDxAQAAEJECFQADuZJygDTgWXpQ_BVrkejVzu2bsMzQ3NDkxODlKR8-gA" | Full SendMessageID |
| email_message_id | string | "mzi5c1~+9vqekqmy63mh8xhgt2qjwfkad6lmiafbyn-0te1_uzckfqyi4ry" | Email-safe SendMessageID (email events only) |
| extra_uid | string | "ew4Sgf41Qwjq8_2_2E_w_k___t.2SDvJv8bvBYQFtSDx_7bTV2f.2_2E_4Sgf41DXc7Z_D" | Extra UID (for push events only) |
| provider | string | "YandexAppMetricaDeviceIDAndroid" | Provider |
For events sbounce, hbounce, sbounce_push, hbounce_push:
| Parameter | Type | Example | Description |
|---|---|---|---|
| bounce_code | int | 500 | Server response code |
| bounce_message | string | "No such email" | Server response message |
For undeliv, undeliv_sms, undeliv_push events:
| Parameter | Type | Example | Description |
|---|---|---|---|
| undeliv_code | int | 400 | Error code |
| undeliv_message | string | "Invalid Caller ID" | Error message |
Pixel events
For pixel_open events:
| Parameter | Type | Example | Description |
|---|---|---|---|
| ip | string | "10.9.0.14" | Subscriber's IPv4 address |
| country | string | ".ru" | Country top-level domain |
| city | string | "Moscow" | City |
| pixel_id | int | 41 | Pixel ID |
| postal_code | string | "390000" | Postal code |
| region | string | "Ryazanskaya oblast" | Region |
| tz | string | "Europe/Vaduz" | Time zone |
| lat | float | 55.244075 | Latitude |
| lon | float | 55.244075 | Longitude |
| user_agent | string | "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" | User-Agent string |
| os | string | "Linux x86_64" | Operating system |
| browser | string | "Firefox" | Browser and version |
| device | string | "web" | Device |
The full list of possible parameters is available in this article.
Popup events
For the following event types: popup_post, popup_click, popup_error, popup_bounce, popup_close, popup_open:
| Parameter | Type | Example | Description |
|---|---|---|---|
| popup_id | int | 123 | Popup ID |
| referer | string | "api.example.com" | HTTP Referer header |
| smid | string | "fGmXiWU9Y4NSIpCwl4QQQQEQEAABCRA" | Sent message identifier |
| utm_campaign | string | "utm_campaign" | UTM campaign tag |
| utm_content | string | "utm_content" | UTM content tag |
| utm_source | string | "utm_source" | UTM source tag |
Some events include unique parameters:
| Parameter | Type | Example | Description |
| popup_post | |||
| post_uid | string | "7bc142b5-7f38-4272-bc7e-7539f70b25b1" | Unique form submission ID |
| popup_click | |||
| name | string | "main_block" | Name of the clicked element |
| url | string | "example.com/page" | href attribute value of the clicked element |
| popup_error, popup_bounce | |||
| error | string | "object_not_found" | Error text |
| error_category | int | 404 | Error code |
Promocode events
For promocode_attach, promocode_detach, promocode_activate events:
| Parameter | Type | Example | Description |
|---|---|---|---|
| attached | string | "2020-10-25T13:28:52Z" | Date and time the promocode was attached |
| detached | string | "2020-10-25T13:28:52Z" | Date and time the promocode was detached |
| activated | string | "2020-10-25T13:28:52Z" | Date and time the promocode was activated |
| code | string | "TEST-XOUH-KBJM-J5K9-24I1" | Promocode |
| db_id | int | 123456 | Profile database ID |
| loyalty_id | int | 9 | Loyalty program ID |
| profile_id | string | "000000000000000000000000" | Profile ID |
All timestamps are in RFC 3339 format.
Segment events
For segs_add and segs_remove events:
| Parameter | Type | Example | Description |
|---|---|---|---|
| campaign_id | int | 9 | Campaign ID |
| launch_id | string | "" | Launch ID |
| message_id | int | 0 | Message template ID |
| segment_id | int | 80 | Segment ID |
| send_message_id | string | "" | Sent message ID |
| full_message_id | string | "fQIQs4FgAAEBIcARAxDxAQAAEJECFQADuZJygDTgWXpQ_BVrkejVzu2bsMzQ3NDkxODlKR8-gA" | Full SendMessageID |
Profile merge and split events
For profile_merge and profile_split events:
| Parameter | Type | Example | Description |
|---|---|---|---|
| destination | array | [ |