Sapo Kho Hàng icon

Sapo Kho Hàng

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

Điều Chỉnh Số Lượng

AI-generated

Overview

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

The "Điều Chỉnh Số Lượng" (Adjust Quantity) operation allows users to modify the quantity of a specific product in inventory by setting it to a new value, adding to it, or removing from it. This is beneficial in scenarios such as correcting stock discrepancies, recording stock usage, or updating inventory after receiving new shipments.

Practical examples:

  • Setting the stock level of a product to a precise number after a physical count.
  • Adding received goods to the current stock quantity.
  • Removing damaged or lost items from inventory.

Properties

Name Meaning
ID Sản Phẩm The unique numeric identifier of the inventory item (product).
Hành Động The action to perform on the quantity: "Đặt Giá Trị" (set), "Thêm" (add), or "Bớt" (remove).
Số Lượng The quantity amount to adjust or transfer.
Ghi Chú Optional notes or reasons explaining the inventory adjustment.

Output

The node outputs a JSON object containing the result of the performed inventory operation. The structure varies depending on the operation but generally includes details about the updated inventory state or confirmation of the requested action.

For the "Điều Chỉnh Số Lượng" operation, the output JSON typically contains the updated inventory data reflecting the adjusted quantity for the specified product.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Sapo API via an API key credential configured in n8n.
  • Depends on the internal SapoApiBase class to communicate with the Sapo inventory endpoints.
  • No additional external services are required beyond the Sapo API.

Troubleshooting

  • Common issues:

    • Invalid or missing product ID can cause errors; ensure the product exists in Sapo.
    • Incorrect location IDs when adjusting quantities may lead to failures.
    • Insufficient permissions or invalid API credentials will prevent successful API calls.
  • Error messages:

    • Errors returned from the Sapo API are captured and presented in the node's output if "Continue On Fail" is enabled.
    • Typical error messages include authorization failures, invalid parameters, or network issues.
  • Resolution tips:

    • Verify that all required fields (productId, quantity, locationId where applicable) are correctly set.
    • Confirm API credentials are valid and have necessary permissions.
    • Use the "Ghi Chú" field to document reasons for adjustments to aid auditing.

Links and References

Discussion