Sapo Thực Hiện Đơn Hàng icon

Sapo Thực Hiện Đơn Hàng

Quản lý thực hiện đơn hàng trên Sapo

Overview

This node manages order fulfillments on the Sapo platform, specifically allowing users to create, retrieve, update, cancel fulfillments, and manage fulfillment events. It is useful for automating order shipment tracking and status updates within workflows that integrate with Sapo e-commerce systems.

A common scenario includes creating a new fulfillment for an order when it ships, updating tracking information as the package moves, and logging events such as status changes or location updates. For example, after shipping an order, you can use this node to create a fulfillment event indicating the package has left the warehouse, helping keep customers informed automatically.

Properties

Name Meaning
ID Thực Hiện The numeric ID of the fulfillment to operate on (required for most operations except creation).
Dữ Liệu Sự Kiện JSON object containing data to create a new fulfillment event, e.g., status, message, location.

The node supports multiple operations; for the "Tạo Sự Kiện" (Create Event) operation, the key input properties are:

  • ID Thực Hiện: The fulfillment ID to which the event will be added.
  • Dữ Liệu Sự Kiện: A JSON object describing the event details, such as:
    • status: Status of the fulfillment event (e.g., "in_transit").
    • message: A descriptive message about the event.
    • location: Location related to the event.

Example of Dữ Liệu Sự Kiện JSON:

{
  "status": "in_transit",
  "message": "Package has left the facility",
  "location": "Distribution Center"
}

Output

The node outputs an array with one item containing a json property. This json contains the response from the Sapo API related to the fulfillment event creation. Typically, this includes details of the newly created event or confirmation of success.

For the "Tạo Sự Kiện" operation, the output JSON structure corresponds to the created fulfillment event's data returned by the API, which may include fields like event ID, status, message, timestamp, and location.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Sapo API via an API authentication credential configured in n8n.
  • Depends on the internal SapoApiBase class to handle API requests related to fulfillments.
  • The node expects proper permissions to create fulfillment events on the specified order and fulfillment IDs.

Troubleshooting

  • Common issues:

    • Invalid or missing fulfillment ID: Ensure the fulfillmentId is correctly provided and exists.
    • Malformed JSON in the Dữ Liệu Sự Kiện field: Validate JSON syntax before execution.
    • API authentication errors: Verify that the API key or token credential is valid and has necessary permissions.
    • Network or connectivity problems with the Sapo API endpoint.
  • Error messages:

    • Errors returned from the API will be surfaced with their message. If the node is set to continue on fail, errors appear in the output JSON under an error property.
    • Common error descriptions include invalid parameters, unauthorized access, or resource not found.

To resolve errors, check input values, confirm API credentials, and review API documentation for required fields and formats.

Links and References

Discussion