Templates: what to send
The cabinet has six ready-made flows for shops and services: Flows → AlphaFlow templates.
Each of them works without edits when your system sends the events and the properties listed below.
- A flow created from a template is a draft: check the text and the sender name, try it on a test contact and publish it.
- All six send a Viber message, and an SMS to those who have no Viber.
- Every template has its texts in Ukrainian, Russian and English; the draft gets them in the language of your cabinet.
- At night messages wait for the morning: quiet hours are set in the flows settings, by the recipient's time zone.
A property marked required is in every variant of the text. Without it the message is not sent: the flow report shows the reason "A variable is missing and there is no fallback text".
Order status
Starts on order_status_changed — send it on every change of the status. Sends at once:
"Order #A-1042: handed over for delivery. Track it: https://…".
| Property | What it is |
|---|---|
order_id | required |
status_title | the status in words, as the customer reads it; without it — "status updated" |
tracking_url | the tracking link; without it the text has no link |
- A service message: no consent is needed.
- Put the status into
message_id(shop:order_status_changed:A-1042:shipped): every status is a new event, and a repeat of the same one is not.
- 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",
"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",
"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",
"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",
"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",
"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());
Abandoned cart
Starts on cart_updated — send it on every change of a cart that has no order yet. Waits 2 hours
after the last change: each new cart_updated starts the wait over. Leaves when order_created comes
from the same person — nothing is sent. Sends a reminder: "Items are waiting in your cart. Complete your
order: https://…".
| Property | What it is |
|---|---|
cart_url | the link to the cart; without it the text asks to complete the order without a link |
cart_id, total | not used in the text; handy for conditions |
- Marketing: it reaches only those who agreed to offers on the channel — see Consent to marketing.
- One reminder in 3 days to the same person at most.
- The goal is
order_createdwithin 3 days: the flow's report shows how many carts came back.
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "shop:cart_updated:C-311:5",
"event": "cart_updated",
"occurred_at": "2026-11-20T21:14:00+02:00",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"cart_id": "C-311",
"total": 2140,
"cart_url": "https://shop.example.com/cart/C-311"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"message_id": "shop:cart_updated:C-311:5",
"event": "cart_updated",
"occurred_at": "2026-11-20T21:14:00+02:00",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"cart_id": "C-311",
"total": 2140,
"cart_url": "https://shop.example.com/cart/C-311"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
}'
<?php
$payload = <<<'JSON'
{
"message_id": "shop:cart_updated:C-311:5",
"event": "cart_updated",
"occurred_at": "2026-11-20T21:14:00+02:00",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"cart_id": "C-311",
"total": 2140,
"cart_url": "https://shop.example.com/cart/C-311"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
}
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:cart_updated:C-311:5",
"event": "cart_updated",
"occurred_at": "2026-11-20T21:14:00+02:00",
"contact": {
"external_id": "client-77",
"phone": "+380671234567",
},
"properties": {
"cart_id": "C-311",
"total": 2140,
"cart_url": "https://shop.example.com/cart/C-311",
},
"consents": {
"viber_marketing": True,
"sms_marketing": True,
},
},
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:cart_updated:C-311:5",
"event": "cart_updated",
"occurred_at": "2026-11-20T21:14:00+02:00",
"contact": {
"external_id": "client-77",
"phone": "+380671234567"
},
"properties": {
"cart_id": "C-311",
"total": 2140,
"cart_url": "https://shop.example.com/cart/C-311"
},
"consents": {
"viber_marketing": true,
"sms_marketing": true
}
}),
});
console.log(response.status, await response.json());
Unpaid order
Starts on order_created. Waits an hour. Leaves when order_paid comes from the same person — the
reminder is not sent. Sends: "Order #A-1042 is awaiting payment: https://…".
| Property | What it is |
|---|---|
order_id | required |
payment_url | the payment link; without it the text asks to pay without a link |
total | not used in the text |
- A service message: no consent is needed.
- Send
order_paidwith the same contact identifier as the order: that is how AlphaFlow knows the person paid. - The goal is
order_paidwithin 3 days.
- JSON
- cURL
- PHP
- Python
- Node.js
{
"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"
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"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"
}
}'
<?php
$payload = <<<'JSON'
{
"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"
}
}
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_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",
},
},
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_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"
}
}),
});
console.log(response.status, await response.json());
Appointment reminder
Starts on appointment_scheduled — when an appointment is made and every time it is moved. Waits until
24 hours before visit_at. Leaves on appointment_cancelled. Sends: "Reminder: 25.11 at 15:00 —
Haircut. See you!".
| Property | What it is |
|---|---|
visit_at | required: the date and time of the visit, ISO 8601, with a time zone or without one (then the time zone of the account) |
service | the service; without it the text names only the date and time |
appointment_id, master | not used in the text; handy for conditions and your own texts |
- A service message: no consent is needed.
- Moved — send
appointment_scheduledagain with the newvisit_atand a newmessage_id(salon:appointment_scheduled:5521:2): the reminder starts over for the new time. - Too late — if the visit is less than 24 hours away when the event comes, no reminder is sent: "tomorrow you have an appointment" would not be true.
- One reminder per person. A new
appointment_scheduledof the same person replaces the previous wait: with two appointments ahead, the reminder comes for the one sent last.
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "salon:appointment_scheduled:5521:1",
"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:1",
"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:1",
"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:1",
"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:1",
"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());
Review request
Starts on order_delivered; for services change the start event to visit_completed in the flow editor.
Waits one business day — by the calendar of business days in the flows settings — and sends at the same time
of day as the event. Sends: "How was order #A-1042? We would appreciate a review: https://…".
| Property | What it is |
|---|---|
review_url | required: the link to the review form |
order_id | the order number; without it the text thanks for the choice instead |
- An advice message: it goes to everyone who has not refused advice on the channel (
viber_tips: false,sms_tips: false).
- JSON
- cURL
- PHP
- Python
- Node.js
{
"message_id": "shop:order_delivered:A-1042",
"event": "order_delivered",
"occurred_at": "2026-11-22T16:10:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"review_url": "https://shop.example.com/review/A-1042"
}
}
curl -X POST 'https://events.alphasms.net/v1/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <KEY>' \
--data-raw '{
"message_id": "shop:order_delivered:A-1042",
"event": "order_delivered",
"occurred_at": "2026-11-22T16:10:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"review_url": "https://shop.example.com/review/A-1042"
}
}'
<?php
$payload = <<<'JSON'
{
"message_id": "shop:order_delivered:A-1042",
"event": "order_delivered",
"occurred_at": "2026-11-22T16:10:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"review_url": "https://shop.example.com/review/A-1042"
}
}
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_delivered:A-1042",
"event": "order_delivered",
"occurred_at": "2026-11-22T16:10:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77",
},
"properties": {
"order_id": "A-1042",
"review_url": "https://shop.example.com/review/A-1042",
},
},
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_delivered:A-1042",
"event": "order_delivered",
"occurred_at": "2026-11-22T16:10:00+02:00",
"dedupe_key": "A-1042",
"contact": {
"external_id": "client-77"
},
"properties": {
"order_id": "A-1042",
"review_url": "https://shop.example.com/review/A-1042"
}
}),
});
console.log(response.status, await response.json());
Reactivation
Starts on inactive_60d — an event AlphaFlow writes itself; you send order_paid. Sends: "Olena, it has
been a while! Drop by — new arrivals are waiting.".
- Creating the flow from the template also creates the inactivity rule "60 days without
order_paid": it watches the customers who have paid at least once and writesinactive_60dfor those who stopped. If the account already has a rule fororder_paidand 60 days, the flow uses it. - The name comes from
first_namein the contact'straits; without it the text has no name. - Marketing: it reaches only those who agreed to offers on the channel — see Consent to marketing.
- Starts again for the same person only after the previous run is over. The goal is
order_paidwithin 14 days. - Send the orders of the last two months as history — History from CSV: the customers who bought before you connected are then counted from their real last order.
- The rule catches the 60th day of silence, not everyone who left long ago: a customer silent for more than 63 days when the rule appears gets no message. Otherwise a new rule would write to everyone who left a year ago.
Consent to marketing
"Abandoned cart" and "Reactivation" are marketing: they reach only those who agreed to receive offers, and only on the channels they agreed to. Send the consent with any event — at checkout or at registration:
"consents": { "viber_marketing": true, "sms_marketing": true }
With only sms_marketing, the message goes by SMS. false withdraws the consent: marketing on that channel
stops. "Order status", "Unpaid order" and "Appointment reminder" are service messages and need no consent;
"Review request" goes until the person refuses advice. More — Consents.