Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Overview

This node integrates with the Zalo Official Account (OA) API, enabling users to interact programmatically with various features of their Zalo OA. Specifically, the "Lấy Danh Sách Đơn Hàng" (Get Order List) operation retrieves a list of orders from the Zalo OA store.

Typical use cases include:

  • Fetching recent or filtered order data for processing in workflows.
  • Automating order management tasks such as reporting or syncing orders with other systems.
  • Filtering orders by status to handle different stages of order fulfillment.

For example, a business could use this node to automatically retrieve all "Đang Giao Hàng" (shipping) orders every hour and update their internal logistics system.

Properties

Name Meaning
Vị Trí Bắt Đầu (offset) The starting position (offset) in the order list from which to begin fetching orders.
Số Lượng (count) The number of orders to retrieve in one request.
Trạng Thái Đơn Hàng (status) Filter orders by their status. Options: Tất Cả (all), Chờ Xác Nhận (pending), Đã Xác Nhận (confirmed), Đang Giao Hàng (shipping), Đã Giao Hàng (delivered), Đã Hủy (canceled).

Output

The output is a JSON object containing the response from the Zalo OA API's order list endpoint. This typically includes:

  • An array of order objects with details such as order ID, user info, items, status, shipping details, totals, etc.
  • Metadata about pagination or total counts may also be included depending on the API response.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token credential for Zalo OA (access token).
  • Uses the official Zalo OA API endpoint at https://openapi.zalo.me/v3.0/oa.
  • The node uses the HTTP client library axios for making requests.
  • Proper permissions must be granted to the access token to read order information.

Troubleshooting

  • Common issues:

    • Invalid or expired access token causing authentication errors.
    • Insufficient permissions on the Zalo OA app to access order data.
    • Requesting too many orders at once exceeding API limits.
    • Network connectivity issues preventing API calls.
  • Error messages:

    • Errors returned from the API will be included in the output JSON under an error flag and message.
    • Typical error messages might indicate invalid parameters, permission denied, or rate limiting.
  • Resolutions:

    • Verify that the access token is valid and has not expired.
    • Ensure the Zalo OA app has the necessary scopes enabled for order management.
    • Adjust the count parameter to a smaller number if hitting limits.
    • Check network connectivity and proxy settings if applicable.

Links and References

Discussion