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 OA features. Specifically, the "Lấy Danh Sách Đơn Hàng" (Get Order List) operation retrieves a list of orders from the Zalo OA store.

Common scenarios for this node include:

  • Fetching recent or historical order data for processing or reporting.
  • Filtering orders by status to manage order workflows.
  • Integrating Zalo OA order data into CRM or ERP systems.

Practical example:

  • A business wants to automatically pull the latest 10 confirmed orders from their Zalo OA store to update their internal order management system daily.

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, and timestamps.
  • Metadata about pagination like total count, offset, and limit.
  • Error information if the API call fails.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v2.0/oa/store/order/getlist (inferred from pattern; exact endpoint not explicitly shown but consistent with other store endpoints).
  • HTTP requests are made using Axios library.
  • Proper permissions must be granted to the access token to read order data.

Troubleshooting

  • Common issues:

    • Invalid or expired access token causing authentication errors.
    • Requesting too many orders at once exceeding API limits.
    • Incorrect offset or count parameters leading to empty results.
    • Network connectivity problems.
  • Error messages:

    • Errors returned from the API will appear in the output JSON under error fields.
    • Typical messages may indicate permission issues, invalid parameters, or server errors.
  • Resolutions:

    • Verify that the API credential is valid and has required scopes.
    • Use reasonable values for offset and count (e.g., count ≤ 50).
    • Check network connectivity and retry failed requests.
    • Review Zalo OA API documentation for any changes in endpoints or parameters.

Links and References


Note: The above summary is based on static analysis of the provided source code and property definitions without runtime execution.

Discussion