Overview
This node integrates with the KiotViet platform to manage products. It allows users to create new products, retrieve product details by ID or code, list multiple products with filters, update existing products, delete products, and fetch inventory levels for products.
A common use case is automating product management workflows in e-commerce or retail systems that use KiotViet as their backend. For example, a user can automatically add new products from an external database, update pricing or stock information regularly, or synchronize inventory levels across multiple branches.
Specifically, the "Tạo Mới" (Create) operation enables creating a new product on KiotViet with detailed attributes such as category, pricing, inventory, and additional descriptive fields.
Properties
| Name | Meaning |
|---|---|
| Tên Sản Phẩm | The name of the product (required). |
| ID Danh Mục | The category ID to which the product belongs (required for creation). |
| Giá Gốc | The base price of the product (required for creation). |
| Giá Bán Lẻ | The retail price of the product (required for creation). |
| Trường Bổ Sung | Additional optional fields including: |
| - Mã Sản Phẩm | Product code identifier. |
| - Mô Tả | Description of the product. |
| - Đơn Vị | Unit of measurement for the product. |
| - Cho Phép Bán | Boolean indicating if the product is allowed to be sold. |
| - Mã Vạch | Barcode of the product (up to 16 characters). |
| - Tên Đầy Đủ | Full product name including attributes and unit. |
| - Có Thuộc Tính | Boolean indicating if the product has variants. |
| - Sản Phẩm Serial | Boolean indicating if the product is serialized. |
| - Thuộc Tính | Collection of attribute name-value pairs describing product properties. |
| - ID Hàng Hóa Cha | ID of the master product if this is a variant. |
| - ID Đơn Vị Cơ Bản | ID of the basic unit product; null if this is the basic unit. |
| - Giá Trị Quy Đổi | Conversion value between units. |
| - Tồn Kho | Inventory details per branch/warehouse including branch ID, name, stock on hand, and cost. |
| - Trọng Lượng | Weight of the product. |
| - Hình Ảnh | Collection of image URLs representing the product images. |
Output
The node outputs JSON data representing the result of the requested operation:
- For "create", it returns the newly created product object with all its properties.
- For "get" or "getByCode", it returns the product details.
- For "getAll", it returns a list of products matching the filter criteria.
- For "update", it returns the updated product object.
- For "delete", it returns a success confirmation object.
- For "getInventoryLevels", it returns inventory level information filtered by the specified parameters.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- Uses a shared KiotViet API helper class internally to perform HTTP requests.
- Node configuration must include valid credentials for KiotViet API access.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing invalid IDs or codes may result in "not found" errors.
- Incorrect data types for numeric fields (e.g., prices, IDs) may cause request failures.
- Exceeding limits or malformed filters when listing products could lead to partial or empty results.
Error messages:
- Errors returned from the KiotViet API are propagated with their message. Users should verify input parameters and credentials.
- Network or timeout errors indicate connectivity issues with the KiotViet service.
Resolution tips:
- Double-check required fields especially for creation (name, categoryId, basePrice, retailPrice).
- Ensure numeric fields are numbers, not strings.
- Validate that product IDs exist before attempting updates or deletes.
- Use the "continue on fail" option to handle individual item errors gracefully in batch operations.