Zalo OA icon

Zalo OA

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

Overview

The node integrates with the Zalo Official Account (OA) API, enabling automation and management of various OA features such as messaging, user info, articles, products, categories, orders, tags, and media uploads. Specifically, the "Lấy Thông Tin Sản Phẩm" (Get Product Info) operation retrieves detailed information about a product in the OA store by its product ID.

This node is beneficial for businesses using Zalo OA to manage their online store, customer interactions, and content. For example, it can be used to fetch product details dynamically during order processing or inventory checks, automate sending messages to followers, or manage articles and categories programmatically.

Properties

Name Meaning
ID Sản Phẩm The unique identifier of the product whose detailed information you want to retrieve.

Note: This property is required for the "Lấy Thông Tin Sản Phẩm" operation under the "Zalo OA" resource.

Output

The node outputs a JSON object containing the response from the Zalo OA API for the requested operation. For the "Lấy Thông Tin Sản Phẩm" operation, the output JSON includes detailed product information such as:

  • Product ID
  • Name
  • Price
  • Description
  • Code
  • Category ID
  • Photos
  • Status
  • Other metadata returned by the API

If an error occurs, the output JSON will contain an error flag set to true, an error message, and possibly additional response data from the API to help diagnose the issue.

The node does not output binary data for this operation.

Dependencies

  • Requires an API authentication token credential for Zalo OA API access.
  • Uses the official Zalo OA API endpoints (base URL: https://openapi.zalo.me/v3.0/oa).
  • Requires proper permissions granted to the API token to access product information.
  • The node uses the axios library for HTTP requests.

Troubleshooting

  • Common Issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect or non-existent product ID causing the API to return errors.
    • Insufficient permissions on the OA app for accessing product details.
    • Network issues or API endpoint changes.
  • Error Messages:

    • "Error getting product info: <message>": Indicates failure in fetching product details. Check the product ID validity and API token permissions.
    • Response status codes and data are logged internally and included in the output JSON under response for debugging.
  • Resolution Tips:

    • Verify that the product ID exists and is correct.
    • Ensure the API token has the necessary scopes/permissions.
    • Confirm network connectivity and that the Zalo OA API service is operational.
    • Review the latest Zalo OA API documentation for any endpoint updates.

Links and References

Discussion