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

Bộ Sưu Tập → Xóa

AI-generated

Overview

This node manages custom metafields on various resource types within the Sapo platform. Metafields are additional metadata fields that can be attached to resources such as collections, products, customers, orders, and more. The node supports operations like creating, retrieving, updating, deleting single or multiple metafields, counting metafields, and validating metafield values.

A common use case is enriching existing resources with extra structured data without modifying the core resource schema. For example, adding a warehouse location to a product or tagging a collection with a custom attribute.

Specifically for the Bộ Sưu Tập (collections) resource and the Xóa (delete) operation, this node deletes a specified metafield from a given collection by its ID.

Properties

Name Meaning
ID Tài Nguyên The numeric ID of the collection resource from which the metafield will be deleted.
ID Trường Tùy Chỉnh The numeric ID of the metafield to delete from the specified collection.

Output

The output JSON contains a single field:

  • success: A boolean indicating whether the deletion was successful (true).

Example output:

{
  "success": true
}

No binary data is produced by this operation.

Dependencies

  • Requires an active connection to the Sapo API via an API key credential configured in n8n.
  • Uses the internal SapoApiBase helper class to interact with the Sapo metafields API endpoints.
  • The node expects the resource type and IDs to be valid and existing in the connected Sapo store.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent collection ID or metafield ID will cause errors.
    • Missing or incorrect API credentials will prevent any API calls.
    • Attempting to delete a metafield that does not belong to the specified collection will fail.
  • Error messages:

    • Errors returned from the Sapo API will be surfaced with their message. For example, "Metafield not found" indicates the metafield ID is invalid.
    • Authentication errors indicate missing or invalid API credentials.
  • Resolution tips:

    • Verify the collection and metafield IDs exist in your Sapo store before running the node.
    • Ensure the API key credential is correctly set up and has sufficient permissions.
    • Use the "Get" operation first to confirm the metafield details before attempting deletion.

Links and References

Discussion