Recipient SMS
Zoopit can text the recipient when something happens to an order. You set it up once per project; after that every order your system creates is covered.
| What | Status |
|---|---|
SMS when an order is booked (orders.reserved) | Live |
SMS when an order is delivered (orders.delivered) | Live |
| Sent from Zoopit's SMS provider and sender | Live |
SMS when the order is put on a route (orders.routed), for example a route the driver builds by scanning at the shop | Live |
| Using your own SMS gateway (for example your existing provider account) and sender name | Coming |
| A log of sent messages, and a test send | Coming |
How it fits together
Three objects in the Notifications API (https://notifications-api.cloud.zoopit.no), all
belonging to your project:
| Object | Decides |
|---|---|
| Channel | Where the message goes. Its to is a template that picks the recipient's phone number from the order. |
| Template | What the message says. |
| Subscription | When: ties a channel and a template to an event, and switches it on or off. |
The full API walkthrough, with request bodies, is on the Notifications reference. Dispatchers can also set this up in the dashboard under notifications.
Make sure the recipient is on the order
SMS templates read the recipient from the order's delivery.oneOf, not from its tasks. Send
the recipient in both, as in the create example.
An order without delivery.oneOf[0].location.phone_number gets no SMS — the message is skipped,
without an error.
Events
| Event | Sent when |
|---|---|
orders.reserved | An order is created as RESERVED (the default when your system creates it), or is changed to RESERVED |
orders.delivered | The delivery is completed (task_status becomes DELIVERY_COMPLETED), normally by the driver |
orders.routed | A route is saved that moves the order into ROUTED, for example a driver scanning orders and creating the route in the Go app. Not sent when an already-routed order moves to another route |
orders.reserved fires as your system creates the order. If the booking confirmation should
go out later, create the order as CREATED and change it to RESERVED when the message should
be sent.
Template variables
| Variable | Is |
|---|---|
{{delivery.name}} | Recipient name |
{{delivery.phone_number}} | Recipient phone number — use this as the channel's to |
{{delivery.street_address}}, {{delivery.zip_code}}, {{delivery.city}} | Delivery address |
{{pickup.name}} | Pickup name, for example the shop |
{{pickup.phone_number}} | Pickup phone number |
{{order.id}} | Zoopit's order id, for building a tracking link |
{{order.reference_id}} | Your order number |
delivery and pickup are the first place in delivery.oneOf / pickup.oneOf. The long form,
{{order.delivery.oneOf.[0].location.phone_number}}, also works.
A variable that does not exist renders as nothing, with no error. Check every variable against a real order before you switch a subscription on.
Message length
A standard SMS holds 160 characters, or 153 per part once it is split into several. æ,
ø and å count as one character each, like any letter.
One character outside the standard set — a curly apostrophe ’, a curly quote “, an em
dash — or an emoji — switches the whole message to a different encoding with 70
characters, or 67 per part. A 150-character message with one ’ in it costs three parts
instead of one. Use straight quotes ' and ", and a plain hyphen -.
Count with the longest values your variables can expand to — a long recipient name, your longest order number, the full tracking link. A shorter link (for example your own short domain) saves characters on every message.
Before you switch it on
- Create the subscription with
"enabled": false. - Create a test order with your own phone number as the recipient.
- Enable the subscription, then create one more test order and check the message.
- Check the length of the finished message.
Every send is real and goes to the number on the order.