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
Xóa Hàng Loạt
AI-generatedOverview
This node manages custom metafields on various resource types within the Sapo platform, such as products, orders, customers, and more. It allows users to perform operations like bulk deleting metafields, counting them, creating new ones, updating existing ones, retrieving details, listing multiple metafields, deleting single metafields, and validating metafield values.
A common use case is when a user wants to clean up or organize metadata associated with a specific resource by removing multiple metafields at once ("Xóa Hàng Loạt" / Bulk Delete). For example, an e-commerce manager might bulk delete outdated inventory location tags from product metafields to maintain accurate stock information.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the resource (e.g., product, order) whose metafields are being managed. |
| Thông Tin Bổ Sung | Additional optional filters for operations like bulk delete, get many, or count. 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 date/time. | |
| - Tạo Trước (Created Before): Filter metafields created before this date/time. |
Output
The node outputs JSON data representing the result of the selected operation:
- For bulkDelete, it returns an object indicating success status, e.g.,
{ "success": true }. - For count, it returns an object with the count of metafields matching the criteria, e.g.,
{ "count": 42 }. - For get and getMany, it returns detailed metafield objects or arrays of metafield objects.
- For create and update, it returns the newly created or updated metafield object.
- For validate, it returns
{ "valid": true }if the validation passes. - In case of errors (if not continuing on fail), the node throws an error; otherwise, it outputs an error message in the JSON.
No binary data output is involved.
Dependencies
- Requires an API authentication credential for the Sapo platform.
- Depends on the internal
SapoApiBaseclass to interact with Sapo's metafield API endpoints. - No additional external services beyond Sapo's API are required.
Troubleshooting
- Common issues:
- Providing an invalid or missing resource ID will cause API errors.
- Using incorrect filter fields in "Thông Tin Bổ Sung" may result in no metafields found or unexpected results.
- Attempting to bulk delete without proper permissions or with invalid filters can fail silently or return errors.
- Error messages:
- Errors from the Sapo API are caught and either thrown or returned in the output JSON under an
errorfield. - Typical errors include invalid IDs, unauthorized access, or malformed request data.
- Errors from the Sapo API are caught and either thrown or returned in the output JSON under an
- Resolution tips:
- Ensure the resource ID corresponds to an existing resource.
- Verify that the API credentials have sufficient permissions.
- Use valid date formats for filtering by creation dates.
- When using bulk delete, double-check filter parameters to avoid accidental deletion.
Links and References
- Sapo API Documentation (general reference for metafield management)
- n8n documentation on creating custom nodes