Set 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 text of an SMS must always be standard and include:
- Company name
- Order number
- Courier tracking link with the tracking ID
The company name is taken from the settings in the routing workspace.
Conditions for sending an SMS:
- The order contains one phone number in the format +1XXXXXXXXXX.
- 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 Cancelled.
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 customer with the same phone number. This means an SMS will be sent to the recipient for each order.
Start of the route
Property | Value |
---|---|
Notification type | shift_start |
Message text | Order <Company name> <order number> has been sent out for delivery. Status https://yandex.ru/courier/tracking/<tracking ID>. |
Sending time | Simultaneously for all orders on the route. |
Property | Value |
---|---|
Notification type | shift_start |
Message text | Order <Company name> <order number> has been sent out for delivery. Status https://yandex.ru/courier/tracking/<tracking ID>. |
Sending time | Simultaneously for all orders on the route. |
The conditions for sending an SMS depend on the courier's starting point:
The following conditions must all be met:
- The route's start time has passed (the
route_start
parameter), or the earliest time window starts 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.
The following conditions must be met:
- The route's start time has passed (the
route_start
parameter), or the earliest time window starts no later than in 5 hours. - The courier has launched the app and selected a route (started sending the route's coordinates).
Before the courier arrives
Property | Value |
---|---|
Notification type | nearby |
Message text | Order <Company name> <order number> will arrive in <Minutes before the arrival time> min. Status https://yandex.ru/courier/tracking/<tracking ID>. |
Sending time | N minutes before arrival at the order location (see SMS settings for companies). |
Property | Value |
---|---|
Notification type | nearby |
Message text | Order <Company name> <order number> will arrive in <Minutes before the arrival time> min. Status https://yandex.ru/courier/tracking/<tracking ID>. |
Sending time | N minutes before 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 arrived.
Notification creation time
The notification creation time depends on how the estimated time of arrival is calculated.
The Estimated Time of Arrival (ETA) is calculated by Track & Trace every few minutes based on incomplete and non-canceled orders on the route. The estimate is made based on the latest traffic and road conditions.
The ETA calculation method is determined by the company, but you can change it for a separate order in the eta_type
field. There are two ETA calculation methods available in Track & Trace: arrival_time
and delivery_time
.
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. Description N 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. Description N 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). |
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. Description N 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. Description N 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: from 12:00 PM to 2:00 PM. 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 AM. The client receives the nearby
notification at 9:30 AM. The order status changes to Delivered at 10:30 AM, 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: from 12:00 PM to 2:00 PM. 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, he will have to wait.
Let's say the courier's estimated time of arrival (ETA) is 10:00 AM. The client receives the nearby
notification at 11:30 AM. The order status changes to Delivered at 12:30 PM 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.
SMS settings
Set up SMS notifications in the interface: for companies or couriers.
For companies
SMS notifications are set up in the routing workspace interface: Settings → Company → SMS settings → Send SMS to customers.
The Send SMS to customers option is:
- Enabled: An SMS will be sent for the routes of all couriers regardless of the settings for individual couriers.
- Disabled: An SMS will only be sent for the routes of couriers with the send 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 companies | SMS for couriers | SMS sent for courier |
---|---|---|
Yes | Yes | Is sent |
Yes | No | Is sent |
No | Yes | Is sent |
No | No | Is not sent |
SMS for companies | SMS for couriers | SMS sent for courier |
---|---|---|
Yes | Yes | Is sent |
Yes | No | Is sent |
No | Yes | Is sent |
No | No | Is not sent |
Types of notifications are set by the options:
- Send SMS at the start of the route.
- Send SMS before arrival.
You can choose both options or only one. For example, if couriers' routes start too early, you can disable sending an SMS at the start of the route to avoid disturbing the recipient at an inconvenient time.
You can also specify the following in the company settings:
- The time window when to send an SMS before the estimated time of arrival (by default, 1800 seconds = 30 minutes).
- The time window when messages can be sent.
For couriers
SMS notifications for a specific courier 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 customers option at the top right 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.