Actions2
Overview
This node integrates with the KiotViet platform to manage supplier data. It allows users to either retrieve a single supplier by its ID or fetch a list of suppliers with optional filtering and pagination. This is useful in scenarios where you need to synchronize supplier information, display supplier details, or automate workflows involving supplier management.
Practical examples:
- Fetching detailed information about a specific supplier to update records in another system.
- Retrieving a filtered list of active suppliers for reporting or inventory planning.
- Automating supplier data synchronization between KiotViet and other business tools.
Properties
| Name | Meaning |
|---|---|
| Thao Tác (operation) | The operation to perform: - Lấy Theo ID (get): Retrieve a supplier by its ID - Lấy Danh Sách (getAll): Retrieve a list of suppliers |
| ID Nhà Cung Cấp (supplierId) | The unique identifier of the supplier to retrieve. Required when operation is "Lấy Theo ID". |
| Lấy Toàn Bộ (returnAll) | Whether to return all suppliers or limit the number of results. Only for "Lấy Danh Sách" operation. |
| Giới Hạn (limit) | Maximum number of suppliers to return when not returning all. Only for "Lấy Danh Sách" operation. |
| Bộ Lọc (filters) | Filters to apply when retrieving the supplier list, including: - Từ Khóa Tìm Kiếm (searchTerm): Search by supplier name or code - Trạng Thái (status): Filter by supplier status ("Đang Hoạt Động" or "Ngừng Hoạt Động") |
Output
The node outputs an array of JSON objects representing supplier data retrieved from KiotViet.
- For the "Lấy Theo ID" operation, the output is a single supplier object with detailed fields as provided by the KiotViet API.
- For the "Lấy Danh Sách" operation, the output is an array of supplier objects matching the filters and limits specified.
- If an error occurs and "Continue On Fail" is enabled, the output will include an object with an
errorfield describing the issue.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- Uses the KiotViet API client implemented in the shared module to interact with supplier endpoints.
- No additional environment variables are needed beyond the API authentication setup.
Troubleshooting
Common issues:
- Invalid or missing supplier ID when using the "Lấy Theo ID" operation will cause errors.
- Network or authentication failures with the KiotViet API can prevent data retrieval.
- Using filters incorrectly (e.g., invalid status values) may result in empty responses or errors.
Error messages:
- Errors returned from the KiotViet API will be surfaced in the node's output if "Continue On Fail" is enabled.
- Typical error messages include "Supplier not found" for invalid IDs or authentication errors indicating invalid credentials.
Resolutions:
- Verify that the supplier ID exists and is correctly entered.
- Ensure the API key credential is valid and has necessary permissions.
- Check network connectivity and API endpoint availability.
- Use valid filter values as per the property definitions.