Setting up SMS notifications
You can set up automatic SMS notifications about changes in an order's delivery progress.
SMS types
There are two types of SMS notifications:
The SMS text should be standard and include:
- Company name
- Order number
- Courier tracking link with the tracking ID
For information on changing the standard text, see SMS customization.
The company name is taken from the settings in the Routing workspace.
Depending on the company's settings, the SMS may contain the order number:
- From Track & Trace (From the system option is active).
- From the client's external system (External customer number option is active). This is an arbitrary order number that can be added when uploading routes to Track & Trace. You can see it in the order card.
Note
If the order number is longer than 20 characters, it'll be truncated in the SMS. For example, 1234...2122
.
For more information on filling in the fields in Track & Trace, see Description of fields.
Conditions for sending an SMS:
- The order contains one phone number in +1XXXXXXXXXX format.
- The courier logged in to the Yandex Courier app and selected a route.
- The courier's geolocation data is received in real time.
- The courier started the route within the specified order time window (before the order's ETA).
- The order status isn't Delivered or Canceled.
Note
An SMS is sent for each order, even if multiple orders have the same recipient.
For example, if a route has three orders at the same location to the same client with the same phone number. This means an SMS will be sent to the recipient for each order. To avoid this, you can provide the phone number only for one order.
At the beginning of the route
Property |
Value |
Notification type |
|
Message text |
Order <order number> from <company name> is out for delivery. Status: ya.cc/link. |
Sending time |
Simultaneously for all orders on the route. |
Conditions for sending an SMS depend on the courier's starting location:
All of the following conditions must be true:
- The route start time has come (the
route_start
parameter), or the earliest delivery window comes no later than in 5 hours. - The depot at the beginning of the route was marked as visited (via the mobile app or API).
- The courier is not within the depot radius if the
mark_route_started_radius
parameter is set for the depot.
All of the following conditions must be true:
- The route start time has come (the
route_start
parameter), or the earliest delivery window comes no later than in 5 hours. - The courier launched the app and selected a route (started sending coordinates for the route).
Before the car arrives
Property |
Value |
Notification type |
|
Message text |
Order <order number> from <company name> will arrive in <remaining time before order arrival, min> minutes. Status: ya.cc/link. |
Sending time |
N minutes before the arrival at the order location (see SMS settings for companies). |
Conditions for sending an SMS:
- The courier follows the order sequence.
- The expected time for creating a notification has come.
Notification creation time
The notification creation time depends on the estimated time of arrival (ETA) calculation method.
The Estimated Time of Arrival (ETA) is calculated by Track & Trace every few minutes based on incomplete and active orders on the route. The estimate is based on current traffic and road condition data.
The ETA calculation method is determined by the company, but you can change it for an individual order in the eta_type
field. There are two ETA calculation methods available in Track & Trace: arrival_time
and delivery_time
.
Comparison of ETA calculation types
Property\Type |
arrival_time |
delivery_time |
Used by default |
yes |
no |
Order time window |
soft |
hard |
Notification creation time |
N seconds before the start of the delivery. ExplanationN is the time window when to send an SMS before the estimated arrival time. Learn more The start of delivery is the estimated time of arrival (ETA). |
N seconds before the start of delivery, but not before the delivery window. ExplanationN is the time window when to send an SMS before the estimated arrival time. Learn more The start of delivery is the estimated time of arrival (ETA). |
Example 1
The example describes the arrival_time
ETA calculation.
Delivery window: between 12:00 and 14:00. The courier's arrival notification must be sent 30 minutes in advance. The order handling time is 1 hour, and the auto detection coefficient is 0.5.
For arrival_time
, the delivery window is soft, so the courier can deliver the order earlier.
Let's say the courier's estimated time of arrival (ETA) is 10:00. The client receives the nearby
notification at 9:30. The order status changes to Delivered at 10:30, when the courier has spent a certain amount of time in the delivery area.
Example 2
The example describes the delivery_time
ETA calculation.
Delivery window: between 12:00 and 14:00. The courier's arrival notification must be sent 30 minutes in advance. The order handling time is 1 hour, and the auto detection coefficient is 0.5.
For delivery_time
, the delivery window is considered hard, so the courier can't deliver the order earlier. If a courier arrives before the delivery window starts, they will have to wait.
Let's say the courier's estimated time of arrival (ETA) is 10:00. The client receives the nearby
notification at 11:30. The order status changes to Delivered at 12:30, when the courier has spent a certain amount of time in the delivery area. The time is counted from the beginning of the delivery window.
Note
For courier performance reports, it's important that the order status is updated at the correct time. If the status automatically changes to Delivered when the courier is still waiting for the window to start, a time window violation is registered in the report. This may make statistics unreliable.
SMS settings
Set up SMS notifications in the interface: for company or couriers.
For company
You can set up SMS notifications in the routing workspace: Settings → Company → SMS messages.
If the Send to all clients option is:
- Enabled, SMS will be sent in the routes of all couriers regardless of the settings for individual couriers.
- Disabled, SMS will only be sent in the routes of couriers with the sending option activated.
The table below shows different combinations of company and courier settings and the resulting action. The company settings take priority over the courier settings.
SMS for company |
SMS for couriers |
SMS sent for courier |
Yes |
Yes |
To be sent |
Yes |
No |
To be sent |
No |
Yes |
To be sent |
No |
No |
Won't be sent |
Types of notifications are set by the options:
- Send at the beginning of the route
- Send before the courier arrives
You can choose both options or only one. For example, if couriers' routes start very early, you can disable sending an SMS at the start of the route to avoid disturbing clients if they're still asleep.
You can also specify the following in the company settings:
- Interval between the delivery time and the SMS message (by default, 1800 seconds, or 30 minutes).
- Sending time is the time window when messages can be sent.
For couriers
SMS notifications for individual couriers are set up in the Track & Trace settings: Track & Trace → Couriers.
Enable the SMS option next to the username of the appropriate courier.
Enable the Send SMS to clients option at the top-left of the page.
SMS customization
SMS messages use the same text, which can't be customized with the service tools.
If you want to customize the text, use the service API for generating order events and implement the notification logic on your side. This will let you use your own wording in SMS notifications rather than standard text. For more information, see Order notifications.