Sapo Kho Hàng icon

Sapo Kho Hàng

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

Lấy Chi Tiết

AI-generated

Overview

This node integrates with the Sapo inventory management system to perform various inventory-related operations. It is useful for managing stock levels, tracking inventory transfers between locations, and retrieving detailed information about products and warehouse locations within Sapo.

Common scenarios include:

  • Adjusting stock quantities after physical inventory counts or corrections.
  • Transferring stock between different warehouse locations.
  • Setting exact stock levels for products at specific locations.
  • Retrieving detailed product inventory data or transfer records.
  • Listing all warehouse locations managed in Sapo.

For example, a user can automate updating inventory quantities after receiving new stock or cancel a previously initiated stock transfer.

Properties

Name Meaning
Thao Tác (operation) The inventory operation to perform. Options: "Điều Chỉnh Số Lượng" (adjust quantity), "Hủy Chuyển Kho" (cancel transfer), "Lấy Chi Tiết" (get details), "Lấy Chi Tiết Kho" (get location details), "Lấy Danh Sách" (list inventory items), "Lấy Chi Tiết Chuyển Kho" (get transfer details), "Danh Sách Kho" (list locations), "Đặt Mức Tồn Kho" (set stock level), "Chuyển Kho" (transfer stock).
ID Sản Phẩm (productId) Numeric ID of the inventory item. Required for most operations like get, adjustQuantity, setLevel, transfer, getTransfer, cancelTransfer.
Hành Động (action) For "adjustQuantity" operation: type of adjustment. Options: "Đặt Giá Trị" (set), "Thêm" (add), "Bớt" (remove).
ID Kho (locationId) Numeric ID of the inventory location. Required for operations involving specific warehouse locations such as setLevel, transfer, getLocation.
ID Kho Đích (targetLocationId) Numeric ID of the target location for inventory transfer. Required for "transfer" operation.
ID Chuyển Kho (transferId) Numeric ID of the inventory transfer record. Required for "getTransfer" and "cancelTransfer" operations.
Số Lượng (quantity) Quantity to adjust, set, or transfer. Required for adjustQuantity, setLevel, and transfer operations.
Số Tham Chiếu (referenceNumber) Reference number for inventory transfer. Optional string used in "transfer" operation.
Trả Về Tất Cả (returnAll) Boolean flag for "getMany" operation indicating whether to return all results or limit them.
Giới Hạn (limit) Maximum number of results to return when "returnAll" is false in "getMany" operation. Minimum 1.
Thông Tin Bổ Sung (additionalFields) Additional optional filters for "getMany" operation, including filtering by location ID and update timestamps.
Ghi Chú (reason) Notes or reason for the inventory operation. Used in adjustQuantity, setLevel, and transfer operations.

Output

The node outputs an array with one element containing a json object representing the result of the selected operation:

  • For get and getMany operations, the output contains detailed inventory item data or lists of items.
  • For adjustQuantity, setLevel, and transfer, the output includes confirmation and details of the performed action.
  • For getTransfer and cancelTransfer, it returns details or status of the inventory transfer.
  • For listLocations and getLocation, it returns warehouse location data.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Sapo API.
  • Depends on the external Sapo inventory API service.
  • The node uses an internal helper class to interact with the Sapo API endpoints related to inventory.

Troubleshooting

  • Common issues:

    • Invalid or missing product ID or location ID parameters will cause errors.
    • Insufficient permissions or invalid API credentials may lead to authentication failures.
    • Attempting to transfer or adjust quantities beyond available stock might be rejected by the API.
    • Network connectivity problems can cause request timeouts or failures.
  • Error messages:

    • Errors from the API are caught and returned as error messages in the output if "Continue On Fail" is enabled.
    • Otherwise, the node throws an error with the message and stack trace.
    • Typical error messages include invalid parameter values, unauthorized access, or resource not found.
  • Resolution tips:

    • Verify that all required numeric IDs are correctly provided.
    • Ensure the API key credential is valid and has necessary permissions.
    • Check network connectivity and API endpoint availability.
    • Use the "reason" field to provide context for adjustments or transfers to aid auditing.

Links and References

Discussion