Actions72
- Bài Viết Actions
- Blog Actions
- Bộ Sưu Tập Actions
- Khách Hàng Actions
- Đơn Hàng Actions
- Trang Actions
- Sản Phẩm Actions
- Biến Thể Sản Phẩm Actions
Đơn Hàng → Xóa Hàng Loạt
AI-generatedOverview
This node manages custom metafields on various resources within the Sapo platform, specifically supporting operations like creating, retrieving, updating, deleting, counting, validating, and bulk deleting metafields. For the "Đơn Hàng" (Orders) resource with the "Xóa Hàng Loạt" (Bulk Delete) operation, it allows users to delete multiple metafields associated with a specific order in one action.
Common scenarios include cleaning up or removing obsolete custom fields from orders in bulk based on filters such as namespace, key, or creation date ranges. This is useful for maintaining data hygiene or resetting custom metadata after certain business processes.
Example use case: A user wants to remove all custom metafields related to a deprecated feature from a particular order by specifying filters like namespace or key to target only relevant metafields.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the order resource whose metafields are targeted for bulk deletion. |
| Thông Tin Bổ Sung | Additional optional filters to narrow down which metafields to bulk delete. Includes: |
| - Namespace: Filter metafields by their namespace string. | |
| - Key: Filter metafields by their key string. | |
| - Tạo Sau (Created After): Filter metafields created after this datetime. | |
| - Tạo Trước (Created Before): Filter metafields created before this datetime. |
Output
The output JSON contains the result of the bulk delete operation. It typically includes information about the success status or details of the deleted metafields. The exact structure depends on the underlying API response but generally confirms whether the bulk deletion was successful.
Example output:
{
"success": true
}
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Sapo API via an API authentication credential.
- The node depends on the
SapoApiBaseclass to interact with the metafields endpoint. - Proper configuration of the API credentials in n8n is necessary for authentication and authorization.
Troubleshooting
Common issues:
- Providing an invalid or non-existent order ID will cause errors or no metafields to be found/deleted.
- Incorrect filter values in additional fields may result in zero metafields being matched.
- Network or authentication failures with the Sapo API can cause request errors.
Error messages:
- Errors thrown by the node will include the message from the Sapo API or internal validation errors.
- If the node is set to continue on fail, errors will appear in the output JSON under an
errorfield. - To resolve errors, verify the order ID exists, check filter correctness, and ensure API credentials are valid.
Links and References
- Sapo API Documentation (general reference for metafield management)
- n8n documentation on creating custom nodes for further customization guidance