Sapo Trường Tùy Chỉnh icon

Sapo Trường Tùy Chỉnh

Quản lý trường tùy chỉnh trên Sapo

Blog → Xóa Hàng Loạt

AI-generated

Overview

This node manages custom metafields on various Sapo resources, specifically supporting operations such as bulk deletion of metafields for a given resource. The "Xóa Hàng Loạt" (Bulk Delete) operation allows users to delete multiple metafields at once based on filtering criteria.

Common scenarios include cleaning up or removing multiple custom fields associated with a blog, product, order, or other resource types in Sapo, especially when those metafields are no longer needed or need to be refreshed.

For example, if you manage a blog and want to remove all metafields under a certain namespace or created before a specific date, this operation can efficiently perform that cleanup without deleting each metafield individually.

Properties

Name Meaning
ID Tài Nguyên The numeric ID of the resource (e.g., a specific blog) whose metafields will be affected.
Thông Tin Bổ Sung Additional filters to narrow down which metafields to bulk delete. Options include:
- Namespace: Filter metafields by their namespace string.
- Key: Filter metafields by their key string.
- Tạo Sau (Created After): Only include metafields created after this date/time.
- Tạo Trước (Created Before): Only include metafields created before this date/time.

Output

The output JSON contains the result of the bulk delete operation. It typically includes:

{
  "success": true
}

indicating whether the bulk deletion was successful.

If an error occurs and the node is set to continue on failure, the output JSON will contain an error field with the error message.

Dependencies

  • Requires an API authentication credential for Sapo to access and modify metafields.
  • Depends on the internal SapoApiBase class to interact with the Sapo API metafields endpoints.
  • No additional external services beyond Sapo's API are required.

Troubleshooting

  • Common Issues:

    • Providing an invalid or non-existent resource ID will cause the operation to fail.
    • Incorrect filter values in "Thông Tin Bổ Sung" may result in no metafields being matched or deleted.
    • Insufficient permissions or invalid API credentials will prevent successful deletion.
  • Error Messages:

    • Errors from the Sapo API (e.g., authorization errors, resource not found) will be surfaced as node errors.
    • If "Continue On Fail" is enabled, errors will appear in the output JSON under the error property.
  • Resolution Tips:

    • Verify the resource ID corresponds to an existing resource in your Sapo account.
    • Double-check filter parameters for correctness and expected format.
    • Ensure the API credential used has sufficient rights to delete metafields.

Links and References

Discussion