Action hook message structure
Action hook structure
Parameter | Type | Example | Description |
---|---|---|---|
event_type | string | "click" | Event from captured events table. |
event_date | string | "2018-03-25T13:13:19.034315796Z" | Event date in RFC 3339 format. |
_xxh | string | "ad1850e0d1d9481e" | Eemail XXHash used for profile identification. |
_md5 | string | "145bb30f7ddf1184cb560bc4b7705646" | MD5 hash used for profile identification. |
list_id | int | 111 | Event database ID |
account_id | int | 23 | Event Account ID |
is_test | bool | false | Testing event flag |
custom_data | JSON object | {"email": "alice@example.org"} | A custom set of customer profile fields and values you specify in action hook settings. |
event_data | JSON object | {"browser": "Firefox"} | Event based data object. This can be tracking data, messaging data or pixel data. |
event_data structure for tracking events
Tracking events are:
- 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 | Template ID |
campaign_id | int | 973 | Campaign ID |
segment_id | int | 0 | Segment ID |
ip | string | "10.9.0.14" | IPv4address |
country | string | ".ru" | Country top level domain |
city | string | "Moscow" | City |
postal_code | string | "390000" | Postal code |
region | string | "Moskovskaya oblast" | Region |
tz | string | "Europe/Vaduz" | Time zone |
lat | float | 55.244075 | Geographic latitude |
lon | float | 55.244075 | Geographic longitude |
user_agent | string | "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" | User agent request head info |
os | string | "Linux" x86_64 | Operating system |
browser | string | "Firefox" | Browser, version |
device | string | "web" | Device |
link_url | string | "http://www.example.com" | HTTP redirect link |
launch_id | string | "00000017000003cd5a9bf01a" | Launch unique ID. |
send_message_id | string | "5a9bf01a17_3cd_11_6f_0_2.5a8c045fc1dde44cbf718f78" | Message sending ID. |
extra_uid | string | "ew4Sgf41Qwjq8_2_2E_w_k___t.2SDvJv8bvBYQFtSDx_7bTV2f.2_2E_4Sgf41DXc7Z_D" | Extra UID. Only for the push channel. |
event_data structure for messaging events
Messaging events are the following:
- send, deliv, undeliv, suppress, sbounce, hbounce, complain,
- send_sms, deliv_sms, undeliv_sms,
- send_push, deliv_push.
Parameter | Type | Example | Description |
---|---|---|---|
message_id | int | 17 | Template ID |
campaign_id | int | 973 | Campaign ID |
segment_id | int | 0 | Segment ID |
bounce_code | int | 500 | Email provider response codes for soft and hard bounces |
bounce_message | String | "No such email" | Email provider response messages for soft and hard bounces |
launch_id | string | "00000017000003cd5a9bf01a" | Launch unique ID. |
send_message_id | string | "5a9bf01a17_3cd_11_6f_0_2.5a8c045fc1dde44cbf718f78" | Message sending ID. |
extra_uid | string | "ew4Sgf41Qwjq8_2_2E_w_k___t.2SDvJv8bvBYQFtSDx_7bTV2f.2_2E_4Sgf41DXc7Z_D" | Extra UID. Only for the push channel. |
event_data structure for AK-Pixel events
A complete list of possible parameters can be found in this article.
Parameter | Type | Example | Description |
---|---|---|---|
ip | string | "10.9.0.14" | IPv4 address |
country | string | ".ru" | Country top level domain |
city | string | "Moscow" | City |
postal_code | string | "390000" | Postal code |
region | string | "Moskovskaya oblast" | Region |
tz | string | "Europe/Vaduz" | Time zone |
lat | float | 55.244075 | Geographical latitude |
lon | float | 55.244075 | Geographical longitude |
user_agent | string | "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" | User-Agent request head value |
os | string | "Linux x86_64 | Operating system" |
browser | string | "Firefox" | Browser, version |
device | string | "web" | Device |
event_data structure for promocode events
Promocode events include promocode_attach, promocode_detach, promocode_activate:
Parameter | Type | Example | Description |
---|---|---|---|
attached | string | "2020-10-02T13:28:52Z" | Time and date of attaching promocode to a profile |
detached | string | "2020-10-02T13:28:52Z" | Time and date of detaching promocode to a profile |
activated | string | "2020-10-02T13:28:52Z" | Time and date when promocode is activated to a profile |
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 dates are specified in RFS 3339 format.
event_data structure for segment events
Segments events are segs_add and segs_remove:
Parameter | Type | Example | Description |
---|---|---|---|
campaign_id | int | 9 | Campaign ID |
launch_id | string | "" | Launch unique ID. |
message_id | int | 0 | Template ID |
segment_id | int | 80 | Segment ID |
send_message_id | string | "" | Message sending ID. |
event_data structure for profile merge events
There are profile_merge and profile_split events:
Parameter | Type | Example | Description |
---|---|---|---|
destination | array |
| If profiles are merged, it contains the profile matching data that will result from the merging. If the profile is split, it contains the profile matching data that will result from the split. |
source | array |
| If profiles are merged, it contains matching data about the profiles to be merged. If the profile is split, it contains matching data about the profiles to be split. |
event_data structure for Telegram events
This type of event includes telegram_bot_send, telegram_bot_deliv, telegram_bot_click, telegram_bot_uclick, telegram_bot_undeliv, telegram_group_send, telegram_group_deliv, telegram_group_click, telegram_group_undeliv:
Parameter | Type | Example | Description |
---|---|---|---|
campaign_id | int | 9 | Campaign ID in Altcraft |
launch_id | string | "" | Campaign launch ID. |
message_id | int | 0 | Message template ID in Altcraft |
resource_id | int | 3 | Resource ID in Altcraft |
segment_id | int | 80 | Segment ID if available |
send_message_id | string | "" | Sent message ID |
event_data structure for campaign error events
This is camp_error event type exclusively.
Parameter | Type | Example | Description |
---|---|---|---|
campaign_id | int | 9 | Campaign ID in Altcraft |
error_code | int | 500 | Error code |
error_text | string | "LOG_INTERNAL_ERROR" | Error text |
launch_id | string | "" | Campaign launch ID. |
message_id | int | 0 | Message template ID in Altcraft |
resource_id | int | 3 | Resource ID in Altcraft |
segment_id | int | 80 | Segment ID if available |
send_message_id | string | "" | Sent message ID |
event_data structure for campaign launch events
This is campaign_launch event type exclusively.
Parameter | Type | Example | Description |
---|---|---|---|
event_type | string | "campaign_launch" | Event from captured events table. |
event_date | string | "2018-03-25T13:13:19.034315796Z" | Event date in RFC 3339 format. |
account_id | int | 23 | Event Account ID |
is_test | bool | false | Testing event flag |
event_data | JSON object | See below | campaign_id — campaign ID campaign_type — campaign type campaign_name — campaign name campaign_sub_id — campaign SubID data_type — audience source type data_id — audience source ID launch_id — account base16 ID and timestamp content — campaign messages |
Campaign launch message example
{
"event_type": "campaign_launch",
"event_date": "2016-12-09T10:11:24.934079204Z",
"is_test": false,
"account_id": 161,
"event_data": {
"campaign_id": 1472,
"campaign_type": "broadcast",
"campaign_name": "Campaugn Launch Hook",
"campaign_sub_id": "x11"
"data_type": "segment",
"data_id": 1221,
"launch_id": "000000a1000005c0584a834c",
"content": [
{
"message_name": "Hello",
"message_id": 1412,
"suppress_id": 271,
"replyto_email": "",
"replyto_name": "",
"text": "message text version",
"html": "<html> html message version </html>",
"from_name": "",
"from_email": "",
"attach_links": [],
"subject": "Hello, {your_name}!"
},
{
"message_name": "Hi",
"message_id": 1413,
"suppress_id": 272,
"replyto_email": "monty@altcraft.com",
"replyto_name": "Monty",
"text": "message text version",
"html": "<html> html message version </html>",
"from_name": "",
"from_email": "",
"attach_links": [
{
"name": "text_file.txt",
"url": "http://test.altcraft.com/api/attach/link/text_file.txt?token=eyJh..."
},
{
"name": "picture_file.png",
"url": "http://test.altcraft.com/api/attach/link/picture_file.png?token=eyJh..."
}
],
"subject": "Hi, {your_name}!"
}
]
}
}
content structure
If the "Add messages content" option is activated in the webhook settings, then the content
field is added to the general structure of the hook message.
- SMS
- Push
{
"content": {
"amp": "<html amp4email></html>",
"from_email": "no-reply@altcraft.com",
"from_name": "Altcraft",
"html": "<html></html>",
"replyto_email": "example@example.com",
"replyto_name": "Altcraft",
"subject": "Weather alert",
"text": "Text version",
"to_email": "profile@example.com",
"to_name": "Fname Lname",
"webversion_email_html": "http://click.altkraft.com/0000/path.html",
"webversion_email_text": "http://click.altkraft.com/0000/path.txt"
},
}
Parameter | Type | Example | Description |
---|---|---|---|
amp | string | <html amp4email></html> | AMP version of email |
from_email | string | "no-reply@altcraft.com" | Sender Email |
from_name | string | "Altcraft" | Sender name |
html | string | <html></html> | HTML version of email |
replyto_email | string | "example@example.com" | Email for replies |
replyto_name | string | "Altcraft" | Reply receiver name |
subject | string | "Weather alert" | Email subject |
text | string | "Text version is important..." | Text version of email |
to_email | string | "profile@example.com" | Receiver Email |
to_name | string | "Fname Lname " | Receiver profile name |
webversion_email_html | string | http://click.altkraft.com | Link to web version of email |
webversion_email_text | string | http://click.altkraft.com | Link to text version of email |
{
"content": {
"fromnamesms": "abcdefghijklmnqrstuvwxyz",
"sms": "Hello, Aaron! See the new items for you: http://click.altkraft.com/s/path",
"webversion_sms_text": "http://click.altkraft.com/000000/path.txt"
}
}
Parameter | Type | Example | Description |
---|---|---|---|
fromnamesms | string | "abcdefghijklmnqrstuvwxyz" | Caller ID |
sms | string | "Follow the link and claim your welcome bonuses!" | Text of message |
webversion_sms_text | string | http://click.altkraft.com | Link to web version of message |
{
"content": {
"app_push_settings": {
"background_color": "#00CED1",
"badges": 0,
"banner": "",
"critical_push": false,
"deliver_prior": 0,
"expir_time": 604800,
"led": "",
"media": "",
"silent_push": false,
"sound": "",
"subtitle": "",
"vibro": false
},
"body": "See if our new items are fit to make you even more awesome!",
"click_url": "https://click.altkraft.com/0000000",
"custom_push_json": {},
"icon": "",
"result_content": {
"content_available": true,
"data": {
"hub_link": {
"ack": "https://pxl.altkraft.com/crypto_post_events?/bFOoNcxW7lpDA",
"open": "https://pxl.altkraft.com/crypto_post_events?/LbFOoNcxW7lpDA"
},
"image": "",
"launch_id": "2_3J_4Z2ZTRaQr7p",
"mediaUrl": "",
"message": "See if our new items are fit to make you even more awesome!",
"uid": "fATFSGbgLjinkRE59ZXDOSd0BcAABARnhIxDBBAAAEbAQowRH"
},
"mutable_content": true,
"notification": {
"body": "See if our new items are fit to make you even more awesome!",
"click_action": "https://click.altkraft.com/0000000/abcdefghijklmnqrstuvwxyz",
"color": "",
"icon": "",
"sound": "default"
},
"title": "Just look, Alex! These are awesome!",
"priority": "normal",
"time_to_live": 604800,
"to": "5dbDUxVXHV"
},
"title": "Just look, Alex! These are awesome!",
"webversion_push_body": "http://click.altkraft.com/000000/path.txt"
}
}
Parameter | Type | Description |
---|---|---|
body | string | Body of push message |
click_url | string | URL to click |
custom_push_json | JSON object | Custom JSON of message |
icon | string | Path to the push message icon |
title | string | Title of message |
result_content | JSON object | Stores the structure of the data sent to the push service |
webversion_push_body | string | Link to the web version of the push message |
app_push_settings | JSON object | Advanced settings for mobile push |
web_push_settings | JSON object | Advanced settings for browser push |
Structure of app_push_settings
Parameter | Type | Example | Description |
---|---|---|---|
background_color | string | #00CED1 | Push notification background color |
badges | int | 0 | Event Indicator |
banner | string | http://example.com/path.img" | Path to the banner image |
critical_push | bool | false | Critical mode activation in push notification |
deliver_prior | int | 0,1 | Delivery Priority |
expir_time | int | 604800 | TTL of push notification (set in seconds) |
led | string | #00CED2 | LED indicator color |
media | string | http://example.com/path | Local file path in the app |
silent_push | bool | false | Enable/disable silent mode |
sound | string | /sound/sound.mp3 | Local sound file path in the application |
subtitle | string | "Только для вас!" | Message subheading (for iOS) |
vibro | bool | true | Vibrate when a push notification is received |
Structure of web_push_settings
Parameter | Type | Example | Description |
---|---|---|---|
actions | JSON object | [] | The array contains push buttons: link to go to (action) + button text (label) |
button_label | string | "Yes, go" | Action button text (value passed only for Safari provider) |
large_image | string | "https://.altkraft.com/284834790/1/664c6da207767c769a/image.png" | Path to the banner image |
expir_time | string | 604800 | TTL of push notification (set in seconds) |
large_image | string | "https://click.example.com" | Path to local banner image |
A link to the web version of the message is passed in the content
object only for the send event in email, sms and push channels. For other events, as well as for the send event in a custom channel, the content
object contains the webversion_link
field with an empty string:
"content": {
"webversion_link": ""
}