The problem: why does messaging order status by hand not last?
It does not last because messaging depends on someone remembering and someone being free. The days with the most orders are the days customers ask the most, and also the days staff have the least time. Late or unsent messages make customers call, message on several channels, and sometimes refuse delivery.
Zalo Notification Service (ZNS) lets businesses send messages from an approved template to a customer's phone number. The hard part is not the send API. It is getting the order status at the right time, with the right meaning, and sending only once.
Thinking leads the way: what data do you need, and how do you read it correctly?
Each ZNS template should be tied to one event with a clear meaning, not to "the order was just updated". The Quantri360 360 Standard Order brings the statuses of all platforms into one set of values, and webhooks push the matching events.
| Message template | 360 Standard Order event / status | Note |
|---|---|---|
| Order confirmation | order.created (Nhanh.vn) |
send once per order |
| Handed to the carrier | status = shipping |
include the tracking_code waybill number |
| Delivered, review invitation | order.delivered |
|
| Delivery failed, rescheduling | order.delivery_failed |
not treated as a returned order |
| Order cancelled | order.cancelled |
Four traps we have hit when sending for real:
- Repeated events. An order can change status many times, and
order.updatedarrives several times. Settracking_id= order ID + template name and keep a record of what was sent; webhooks also haveX-Q360-Delivery-Idfor dropping duplicate deliveries. - Phone numbers must be normalized. Zalo accepts
84987654321, not0987654321. 360 Standard Order returns numbers in E.164 format (+84…), which is also valid. Customer phone numbers on Shopee and TikTok Shop are usually partly masked, so they cannot be used for ZNS; only Nhanh.vn, website and store orders have full numbers. - Errors that should not be resent. Zalo returns HTTP 200 even on errors; only
error = 0means the message was sent. Codes -108 (wrong number), -118 (number has no Zalo), -141 (customer refused to receive), -132 (template not approved or discontinued), -1124 and -1121 never clear on their own. Retrying every 30 minutes only bloats the log to many times the real order count. Code -124 alone is a temporary token error; retry later. - Values exceeding the template length. Error -1121 is usually caused by long customer names, for example a POS name like "bán cho người tiêu dùng (anh A)" (sold to consumer, Mr. A) exceeding the 30-character parameter limit. Trim or clean the name before sending.
AI speeds it up: how long does setup take, and what are the steps?
If you already have a Zalo OA and an approved ZNS template, the connecting part takes about 30–45 minutes in n8n. ZNS template approval is Zalo's job and takes its own time.
- Sign up at Quantri360 Partner and turn on two-factor authentication. Connect the brand's Zalo OA and see the API group at ZNS on Partner.
- Connect an order source, for example Nhanh.vn.
- Choose how to receive status:
- Realtime webhook (part of Auto Data, which is temporarily closed and not accepting sign-ups; for brands using only the API product): create a Webhook URL destination pointing at n8n's Webhook node, and connect the "Đơn hàng đã xử lý" (Processed orders) type with realtime delivery. Each delivery carries an
X-Q360-Signaturesignature (HMAC-SHA256 overt.body); verify the signature and that the clock skew is no more than 5 minutes. - Scheduled (works today): n8n runs every 15–60 minutes, calling
POST /v1/nhanh/v3.0/order/listwithfilters.updatedAtFromandfilters.updatedAtToto get recently changed orders. This is original Nhanh.vn data, so you map Nhanh statuses to the message templates in the table above yourself.
- Realtime webhook (part of Auto Data, which is temporarily closed and not accepting sign-ups; for brands using only the API product): create a Webhook URL destination pointing at n8n's Webhook node, and connect the "Đơn hàng đã xử lý" (Processed orders) type with realtime delivery. Each delivery carries an
- Look up the template's parameters with the template info API, and check the daily quota with the quota API.
- Send the message through 360 (360 attaches the Zalo OA token for you):
curl -s -X POST "https://partner.quantri360.com/v1/zalo/zns/message/template" \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"phone":"84987654321","template_id":"<mã mẫu>","template_data":{"customer_name":"Lan","order_code":"DH1024"},"tracking_id":"DH1024-delivered"}'
Parameter names in template_data must match your template exactly. Sending fees are charged to the brand's Zalo account; for API usage fees through 360, see the pricing.
Use AI to review content and errors. Each week, export the send log (order ID, template, error code) to ChatGPT or Claude:
"This is last week's ZNS send log. Group by error code, and for each group state the likely cause and what to do. Mark the numbers that hit -141 or -118 so they go on the do-not-send list."
AI helps you read quickly; what gets sent to customers still follows the template Zalo approved.
Measurable results
These three metrics come from the send log and Zalo's responses themselves. Track them weekly during the first month.
- Message latency: the gap between the order changing status and Zalo receiving the message. Realtime webhooks are measured in seconds; a 15-minute schedule is under 15 minutes.
- Delivery rate: the number of
error = 0results over total calls, with permanent and temporary errors separated. - Duplicate messages: the number of
tracking_idvalues appearing more than once, with a target of 0.
One more business metric: the number of calls and messages asking about order status each week, counted at the call center or fanpage before and after turning this on. If you need a Nhanh.vn order table to cross-check, see Nhanh.vn in Google Sheets. To add automation for marketplaces, see Shopee with n8n.
Related APIs
- Send ZNS by template: sends a message to a phone number from an approved template, with the list of error codes that should not be resent.
- ZNS template list: the OA's templates and their approval status.
- ZNS template info: parameters and length limits for each template.
- ZNS quota: the number of messages still sendable today.
- order/list (Nhanh.vn): Nhanh.vn orders by update date, the status source for sending messages.
Read more: business process automation, the overview article for this topic.