Actions36
- Zalo OA Actions
- Gửi Tin Nhắn Văn Bản
- Gửi Tin Nhắn Hình Ảnh
- Gửi Tin Nhắn File
- Gửi Tin Nhắn Danh Sách
- Lấy Thông Tin Người Theo Dõi
- Lấy Danh Sách Người Theo Dõi
- Cập Nhật Thông Tin Người Theo Dõi
- Lấy Danh Sách Cuộc Trò Chuyện Gần Đây
- Lấy Lịch Sử Hội Thoại
- Kiểm Tra Trạng Thái Tin Nhắn
- Upload Hình Ảnh
- Upload Hình Ảnh GIF
- Upload File
- Lấy Danh Sách Tag
- Gán Tag Cho Người Theo Dõi
- Xóa Tag
- Xóa Người Theo Dõi Khỏi Tag
- Cập Nhật Menu OA
- Tạo Bài Viết
- Cập Nhật Bài Viết
- Xóa Bài Viết
- Lấy Danh Sách Bài Viết
- Lấy Chi Tiết Bài Viết
- Chuẩn Bị Upload Video
- Xác Thực Video
- Tạo Sản Phẩm
- Cập Nhật Sản Phẩm
- Lấy Thông Tin Sản Phẩm
- Lấy Danh Sách Sản Phẩm
- Tạo Danh Mục
- Cập Nhật Danh Mục
- Lấy Danh Sách Danh Mục
- Tạo Đơn Hàng
- Cập Nhật Đơn Hàng
- Lấy Thông Tin Đơn Hàng
- Lấy Danh Sách Đơn Hàng
Overview
The node integrates with the Zalo Official Account (OA) API, enabling automation of various OA management tasks such as messaging users, managing followers, handling articles, products, categories, and orders. Specifically, the "Cập Nhật Đơn Hàng" (Update Order) operation allows updating the status of an existing order in the Zalo OA store system.
This node is beneficial for businesses using Zalo OA to manage customer interactions and e-commerce workflows. For example, after processing an order externally, you can update its status (e.g., from "pending" to "confirmed" or "delivered") directly via this node, keeping your Zalo OA store data synchronized.
Practical examples:
- Automatically mark orders as "Đã Giao Hàng" (Delivered) once shipment confirmation is received.
- Cancel orders and provide a reason if payment fails or stock is unavailable.
- Update order statuses in bulk based on external CRM or ERP system triggers.
Properties
| Name | Meaning |
|---|---|
| ID Đơn Hàng | The unique identifier of the order to update or view details for. |
| Trạng Thái Đơn Hàng | The new status of the order. Options: "Chờ Xác Nhận" (pending), "Đã Xác Nhận" (confirmed), "Đang Giao Hàng" (shipping), "Đã Giao Hàng" (delivered), "Đã Hủy" (canceled). |
| Lý Do | Reason for updating the order status (optional descriptive text). |
Output
The node outputs a JSON object representing the response from the Zalo OA API after attempting to update the order. This typically includes success confirmation or error details.
Example output structure (simplified):
{
"error": false,
"message": "Order updated successfully",
"data": {
"order_id": "123456",
"status": "confirmed",
"updated_at": "2024-06-01T12:00:00Z"
}
}
If an error occurs, the output JSON will contain:
{
"error": true,
"message": "Error message describing what went wrong",
"response": { /* raw API error response */ },
"suggestion": "Advice on how to fix the issue"
}
The node does not output binary data for this operation.
Dependencies
- Requires an active Zalo Official Account API access token credential configured in n8n.
- Uses the Zalo OA REST API endpoint at
https://openapi.zalo.me/v2.0/oa. - Depends on HTTP POST requests with JSON payloads authenticated by the access token.
- No additional external services are required beyond Zalo OA API.
Troubleshooting
Common Issues
- Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
- Incorrect order ID: Providing a non-existent or malformed order ID will cause errors.
- Insufficient permissions: The connected OA account must have appropriate permissions to update orders.
- Network or API downtime: Temporary connectivity issues or Zalo API outages may cause failures.
Error Messages and Resolutions
"Error updating order: <message>": Check that the order ID exists and the access token is valid.- API response errors with HTTP status codes like 401 or 403 indicate authentication or permission problems; reauthenticate or verify credentials.
- Validation errors about status values suggest using one of the allowed status options.
- If the node returns an error with a suggestion to check OA access permissions, ensure the OA app has granted all necessary scopes.
Links and References
- Zalo Official Account API Documentation
- Zalo OA Store Order Management API
- n8n documentation on Creating Custom Nodes
This summary focuses on the "Cập Nhật Đơn Hàng" operation within the Zalo OA resource, detailing its inputs, outputs, and usage context based on static analysis of the provided source code and property definitions.