Sapo Kho Hàng icon

Sapo Kho Hàng

Quản lý kho hàng trên Sapo

Hủy Chuyển Kho

AI-generated

Overview

This node manages inventory operations on the Sapo platform, a system for warehouse and stock management. It supports various actions such as adjusting product quantities, transferring stock between locations, setting inventory levels, retrieving detailed information about products or transfers, and canceling stock transfers.

Common scenarios include:

  • Updating stock counts after receiving new shipments or sales.
  • Moving inventory from one warehouse location to another.
  • Checking current stock levels or transfer statuses.
  • Canceling erroneous or unwanted stock transfers.

For example, a user can use this node to cancel a previously initiated stock transfer by specifying the product ID and the transfer ID, effectively reversing the transfer operation.

Properties

Name Meaning
Thao Tác (operation) The inventory operation to perform. Options: "Điều Chỉnh Số Lượng" (adjustQuantity), "Hủy Chuyển Kho" (cancelTransfer), "Lấy Chi Tiết" (get), "Lấy Chi Tiết Kho" (getLocation), "Lấy Danh Sách" (getMany), "Lấy Chi Tiết Chuyển Kho" (getTransfer), "Danh Sách Kho" (listLocations), "Đặt Mức Tồn Kho" (setLevel), "Chuyển Kho" (transfer).
ID Sản Phẩm (productId) Numeric ID of the inventory item. Required for most operations including canceling transfers.
ID Chuyển Kho (transferId) Numeric ID of the inventory transfer. Required for operations related to specific transfers like cancelTransfer and getTransfer.
Hành Động (action) For adjusting quantity: specifies whether to set, add, or remove stock. Options: "Đặt Giá Trị" (set), "Thêm" (add), "Bớt" (remove).
ID Kho (locationId) Numeric ID of the inventory location (warehouse). Required for operations involving specific locations.
ID Kho Đích (targetLocationId) Numeric ID of the target location for inventory transfer. Required for transfer operations.
Số Lượng (quantity) Quantity to adjust, set, or transfer. Required for relevant operations.
Số Tham Chiếu (referenceNumber) Reference number for inventory transfer, useful for tracking. Optional.
Trả Về Tất Cả (returnAll) Boolean flag indicating whether to return all results or limit them when listing multiple items.
Giới Hạn (limit) Maximum number of results to return when not returning all.
Thông Tin Bổ Sung (additionalFields) Additional optional filters such as location ID or update date ranges when listing inventories.
Ghi Chú (reason) Notes or reasons for the inventory operation, e.g., why quantity was adjusted or transfer made.

Output

The node outputs an array with a single item containing a json field. This JSON object varies depending on the operation performed:

  • For retrieval operations (get, getMany, getTransfer, getLocation, listLocations), it contains detailed data about products, transfers, or locations.
  • For modification operations (adjustQuantity, setLevel, transfer, cancelTransfer), it returns confirmation details or the updated state of the inventory or transfer.
  • In case of errors, if the node is configured to continue on failure, the output JSON will contain an error field with the error message.

The node does not output binary data.

Dependencies

  • Requires an API credential for authenticating with the Sapo platform's API.
  • Depends on the internal SapoApiBase class to handle API requests related to inventory.
  • No additional external services are required beyond the Sapo API access.

Troubleshooting

  • Common issues:
    • Providing invalid or missing product IDs or transfer IDs will cause API errors.
    • Incorrect location IDs may result in failed transfers or adjustments.
    • Insufficient permissions or invalid API credentials will prevent successful API calls.
  • Error messages:
    • Errors returned from the Sapo API are surfaced as node errors with descriptive messages.
    • If "Continue On Fail" is enabled, errors appear in the output JSON under the error key.
  • Resolution tips:
    • Verify that all required numeric IDs are correct and correspond to existing entities in Sapo.
    • Ensure the API credential used has sufficient permissions.
    • Use the "reason" property to provide context for adjustments or transfers to aid auditing.

Links and References

Discussion