Overview
This node manages warehouse transfer operations within the KiotViet system, allowing users to create, update, retrieve, list, and delete stock transfer records between branches. It is particularly useful for businesses that operate multiple branches or warehouses and need to track inventory movements accurately.
Common scenarios include:
- Creating a new transfer record when goods are moved from one branch to another.
- Updating existing transfer details such as quantities or descriptions.
- Retrieving specific transfer information by ID.
- Listing transfers with various filters like date ranges, status, or branch IDs.
- Deleting obsolete or incorrect transfer records.
Practical example: A retail chain wants to move 100 units of product A from Branch 1 to Branch 2. Using this node, they can create a transfer record specifying the sending and receiving branches, product details, and optionally mark it as a draft before finalizing.
Properties
| Name | Meaning |
|---|---|
| Chi Nhánh Gửi | ID of the branch sending the goods (required for create and update) |
| Chi Nhánh Nhận | ID of the branch receiving the goods (required for create and update) |
| Mã Phiếu Chuyển | Transfer code; if left empty, it will be generated automatically |
| Mô Tả | Description of the transfer record |
| Là Bản Nháp | Boolean flag indicating whether the transfer is saved as a draft |
| Chi Tiết Sản Phẩm | List of products included in the transfer, each with: |
| - ID Sản Phẩm | Product ID (required) |
| - Mã Sản Phẩm | Product code (required) |
| - Số Lượng Gửi | Quantity of product sent (required) |
| - Số Lượng Nhận | Quantity of product received (optional) |
| - Giá | Price of the product (required) |
Output
The node outputs JSON data representing the result of the performed operation:
- For create and update operations, it returns the created or updated transfer object including all relevant fields.
- For get operation, it returns the transfer object identified by the given ID.
- For getAll, it returns an array of transfer objects matching the specified filters and pagination options.
- For delete, it returns a success message confirming deletion.
The output JSON structure typically includes fields such as transfer IDs, branch IDs, product details, status, dates, and descriptions.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- The node depends on the KiotViet API service to perform transfer-related operations.
- Proper configuration of the API credential in n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Invalid or missing API credentials leading to authentication errors.
- Providing invalid branch or product IDs causing API rejections.
- Omitting required fields such as sending/receiving branch IDs or product details.
- Incorrect data types (e.g., strings instead of numbers) for numeric fields.
Error messages and resolutions:
"Thao tác "<operation>" không được hỗ trợ": Indicates an unsupported operation was requested; verify the operation parameter.- API errors related to authorization: Check that the API key credential is correctly set up and has sufficient permissions.
- Validation errors from the API about missing or invalid fields: Ensure all required properties are provided and correctly formatted.
- Network or connectivity errors: Verify network access to the KiotViet API endpoint.
Links and References
- KiotViet Official API Documentation
- n8n documentation on Creating Custom Nodes