Recommended events
You choose the names of your events: AlphaFlow adds a new name to the catalogue with its first event. But the ready-made templates and the AI assistant are built on the names below — send your events under these names and with these properties, and a flow created from a template works without edits.
Events
| Event | When | Properties | Template |
|---|---|---|---|
order_created | An order is placed | order_id, total, payment_url | "Unpaid order"; the exit and the goal of "Abandoned cart" |
order_paid | An order is paid | order_id, total | The exit and the goal of "Unpaid order"; the inactivity rule of "Reactivation" |
order_status_changed | The status of an order changes | order_id, status, status_title, tracking_url | "Order status" |
order_delivered | An order is delivered | order_id, review_url | "Review request" |
cart_updated | A cart changed, and there is no order yet | cart_id, total, cart_url | "Abandoned cart" |
appointment_scheduled | An appointment is made or moved | appointment_id, visit_at, service, master | "Appointment reminder" |
appointment_cancelled | An appointment is cancelled | appointment_id | The exit of "Appointment reminder" |
visit_completed | A visit took place | appointment_id, review_url | "Review request" for services |
inactive_60d | 60 days without order_paid | — | "Reactivation". You do not send it: AlphaFlow writes it itself |
- Dates are ISO 8601. A date without a time zone is read in the time zone of the account.
- Links —
payment_url,tracking_url,cart_url,review_url— are fullhttps://addresses: a template puts them into the text as they are.
What each template does with these events — Templates.
Shop: an order is placed and paid
The order is placed, and fifteen minutes later it is paid. The "Unpaid order" flow waits an hour after
order_created — the payment comes earlier, and no reminder is sent:
- JSON
- cURL
- PHP
- Python
- Node.js
{
"batch": [
{
"message_id": "shop:order_created:A-1042",
"event": "order_created",
"occurred_at": "2026-11-20T12:05:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
"payment_url": "https://shop.example.com/pay/A-1042"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
},
{
"message_id": "shop:order_paid:A-1042",
"event": "order_paid",
"occurred_at": "2026-11-20T12:20:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5
}
}
]
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"batch": [
{
"message_id": "shop:order_created:A-1042",
"event": "order_created",
"occurred_at": "2026-11-20T12:05:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
"payment_url": "https://shop.example.com/pay/A-1042"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
},
{
"message_id": "shop:order_paid:A-1042",
"event": "order_paid",
"occurred_at": "2026-11-20T12:20:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5
}
}
]
}'
<?php
$payload = <<<'JSON'
{
"batch": [
{
"message_id": "shop:order_created:A-1042",
"event": "order_created",
"occurred_at": "2026-11-20T12:05:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
"payment_url": "https://shop.example.com/pay/A-1042"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
},
{
"message_id": "shop:order_paid:A-1042",
"event": "order_paid",
"occurred_at": "2026-11-20T12:20:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5
}
}
]
}
JSON;
$ch = curl_init('https://events.alphasms.net/v1/events');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <KEY>',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, ' ', $response;
import requests
response = requests.post(
"https://events.alphasms.net/v1/events",
headers={"Authorization": "Bearer <KEY>"},
json={
"batch": [
{
"message_id": "shop:order_created:A-1042",
"event": "order_created",
"occurred_at": "2026-11-20T12:05:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
"phone": "+380671234567",
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
"payment_url": "https://shop.example.com/pay/A-1042",
},
"consents": {
"viber_marketing": True,
"sms_marketing": True,
},
},
{
"message_id": "shop:order_paid:A-1042",
"event": "order_paid",
"occurred_at": "2026-11-20T12:20:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
},
},
],
},
timeout=30,
)
print(response.status_code, response.json())
const response = await fetch("https://events.alphasms.net/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <KEY>",
},
body: JSON.stringify({
"batch": [
{
"message_id": "shop:order_created:A-1042",
"event": "order_created",
"occurred_at": "2026-11-20T12:05:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5,
"payment_url": "https://shop.example.com/pay/A-1042"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
},
{
"message_id": "shop:order_paid:A-1042",
"event": "order_paid",
"occurred_at": "2026-11-20T12:20:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"total": 1250.5
}
}
]
}),
});
console.log(response.status, await response.json());
The consents came with the order: the customer ticked "send me offers" at checkout.
Shop: the status of an order
Each change of the status is a separate event. The status is part of message_id, so a repeat of the same
status does not count twice:
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "shop:order_status_changed:A-1042:shipped",
"event": "order_status_changed",
"occurred_at": "2026-11-21T09:00:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"status": "shipped",
"status_title": "handed over for delivery",
"tracking_url": "https://novaposhta.ua/tracking/?cargo_number=20450000000000"
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"message_id": "shop:order_status_changed:A-1042:shipped",
"event": "order_status_changed",
"occurred_at": "2026-11-21T09:00:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"status": "shipped",
"status_title": "handed over for delivery",
"tracking_url": "https://novaposhta.ua/tracking/?cargo_number=20450000000000"
}
}'
<?php
$payload = <<<'JSON'
{
"message_id": "shop:order_status_changed:A-1042:shipped",
"event": "order_status_changed",
"occurred_at": "2026-11-21T09:00:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"status": "shipped",
"status_title": "handed over for delivery",
"tracking_url": "https://novaposhta.ua/tracking/?cargo_number=20450000000000"
}
}
JSON;
$ch = curl_init('https://events.alphasms.net/v1/events');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <KEY>',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, ' ', $response;
import requests
response = requests.post(
"https://events.alphasms.net/v1/events",
headers={"Authorization": "Bearer <KEY>"},
json={
"message_id": "shop:order_status_changed:A-1042:shipped",
"event": "order_status_changed",
"occurred_at": "2026-11-21T09:00:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
},
"properties": {
"order_id": "A-1042",
"status": "shipped",
"status_title": "handed over for delivery",
"tracking_url": "https://novaposhta.ua/tracking/?cargo_number=20450000000000",
},
},
timeout=30,
)
print(response.status_code, response.json())
const response = await fetch("https://events.alphasms.net/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <KEY>",
},
body: JSON.stringify({
"message_id": "shop:order_status_changed:A-1042:shipped",
"event": "order_status_changed",
"occurred_at": "2026-11-21T09:00:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"status": "shipped",
"status_title": "handed over for delivery",
"tracking_url": "https://novaposhta.ua/tracking/?cargo_number=20450000000000"
}
}),
});
console.log(response.status, await response.json());
status is your code of the status, handy for conditions ("only shipped"); status_title is the status in
words, as the customer will read it.
Salon: an appointment
An appointment is made. When it is moved, send the same event with the new visit_at and a new message_id:
the reminder starts over for the new time.
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "salon:appointment_scheduled:5521:2",
"event": "appointment_scheduled",
"occurred_at": "2026-11-18T19:30:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"traits": {
"first_name": "Olena"
},
"properties": {
"appointment_id": 5521,
"visit_at": "2026-11-25T15:00:00+02:00",
"service": "Haircut",
"master": "Iryna"
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"message_id": "salon:appointment_scheduled:5521:2",
"event": "appointment_scheduled",
"occurred_at": "2026-11-18T19:30:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"traits": {
"first_name": "Olena"
},
"properties": {
"appointment_id": 5521,
"visit_at": "2026-11-25T15:00:00+02:00",
"service": "Haircut",
"master": "Iryna"
}
}'
<?php
$payload = <<<'JSON'
{
"message_id": "salon:appointment_scheduled:5521:2",
"event": "appointment_scheduled",
"occurred_at": "2026-11-18T19:30:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"traits": {
"first_name": "Olena"
},
"properties": {
"appointment_id": 5521,
"visit_at": "2026-11-25T15:00:00+02:00",
"service": "Haircut",
"master": "Iryna"
}
}
JSON;
$ch = curl_init('https://events.alphasms.net/v1/events');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <KEY>',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, ' ', $response;
import requests
response = requests.post(
"https://events.alphasms.net/v1/events",
headers={"Authorization": "Bearer <KEY>"},
json={
"message_id": "salon:appointment_scheduled:5521:2",
"event": "appointment_scheduled",
"occurred_at": "2026-11-18T19:30:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233",
},
"traits": {
"first_name": "Olena",
},
"properties": {
"appointment_id": 5521,
"visit_at": "2026-11-25T15:00:00+02:00",
"service": "Haircut",
"master": "Iryna",
},
},
timeout=30,
)
print(response.status_code, response.json())
const response = await fetch("https://events.alphasms.net/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <KEY>",
},
body: JSON.stringify({
"message_id": "salon:appointment_scheduled:5521:2",
"event": "appointment_scheduled",
"occurred_at": "2026-11-18T19:30:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"traits": {
"first_name": "Olena"
},
"properties": {
"appointment_id": 5521,
"visit_at": "2026-11-25T15:00:00+02:00",
"service": "Haircut",
"master": "Iryna"
}
}),
});
console.log(response.status, await response.json());
The cancellation removes the reminder:
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "salon:appointment_cancelled:5521",
"event": "appointment_cancelled",
"occurred_at": "2026-11-19T10:00:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"properties": {
"appointment_id": 5521
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"message_id": "salon:appointment_cancelled:5521",
"event": "appointment_cancelled",
"occurred_at": "2026-11-19T10:00:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"properties": {
"appointment_id": 5521
}
}'
<?php
$payload = <<<'JSON'
{
"message_id": "salon:appointment_cancelled:5521",
"event": "appointment_cancelled",
"occurred_at": "2026-11-19T10:00:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"properties": {
"appointment_id": 5521
}
}
JSON;
$ch = curl_init('https://events.alphasms.net/v1/events');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <KEY>',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, ' ', $response;
import requests
response = requests.post(
"https://events.alphasms.net/v1/events",
headers={"Authorization": "Bearer <KEY>"},
json={
"message_id": "salon:appointment_cancelled:5521",
"event": "appointment_cancelled",
"occurred_at": "2026-11-19T10:00:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233",
},
"properties": {
"appointment_id": 5521,
},
},
timeout=30,
)
print(response.status_code, response.json())
const response = await fetch("https://events.alphasms.net/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <KEY>",
},
body: JSON.stringify({
"message_id": "salon:appointment_cancelled:5521",
"event": "appointment_cancelled",
"occurred_at": "2026-11-19T10:00:00+02:00",
"dedupe_key": "5521",
"contact": {
"phone": "+380501112233"
},
"properties": {
"appointment_id": 5521
}
}),
});
console.log(response.status, await response.json());
visit_at may come with a time zone or without one (then the time zone of the account). Without visit_at the
reminder has no moment to wait for, and the person leaves the flow without a message.
History
For "Reactivation" and for conditions like "bought three times" to work from the first day, send the orders of
past months as history — a file in the cabinet (History from CSV) or
events with backfill: true (History).
Events AlphaFlow writes itself
These events appear in the journal next to yours, with context.source = flow. A flow can start on them
or leave on them. You cannot send them: a message_id starting with flow: is refused.
| Event | When | Properties |
|---|---|---|
consent_revoked | A contact withdrew a consent (false in consents) or unsubscribed by the link in an email | channel, topic, source |
message_delivered | An SMS or a messenger message was delivered | idempotency_key, channel (which channel of a cascade delivered it), status |
message_failed | A message was not delivered | idempotency_key, channel, status, error |
sms_stop | A subscriber answered STOP to the number of your account, and you have a contact with this phone | number, keyword, in_sms_id |
inactive_60d and others of inactivity rules | A contact did not send the rule's event for the set number of days | event, last_event_day, days_silent, active_days, window_days |