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
Lấy Chi Tiết
AI-generatedOverview
This node manages custom metafields on various resource types within the Sapo platform. Metafields are additional data fields that can be attached to resources like products, orders, customers, blogs, and more, allowing users to extend the default data model with custom information.
Common scenarios for this node include:
- Retrieving detailed information about a specific metafield attached to a resource.
- Creating new metafields to store extra metadata.
- Updating or deleting existing metafields.
- Counting or listing metafields with optional filtering.
- Validating metafield values before applying them.
For example, a user might use this node to get the details of a metafield that stores warehouse location info for a product, or to create a new metafield that tracks customer preferences.
Properties
| Name | Meaning |
|---|---|
| Thao Tác (operation) | The action to perform: bulk delete, count, create, delete, get detail, list, update, validate. |
| Tài Nguyên (resource) | The type of resource the metafield belongs to: articles, blogs, collections, customers, orders, pages, products, variants. |
| ID Tài Nguyên (resourceId) | Numeric ID of the resource instance to which the metafield is attached. |
| ID Trường Tùy Chỉnh (metafieldId) | Numeric ID of the specific metafield (required for get, update, delete operations). |
| Trả Về Tất Cả (returnAll) | Boolean indicating whether to return all results when listing metafields or limit the number. |
| Giới Hạn (limit) | Maximum number of metafields to return when not returning all (used with getMany operation). |
| Thông Tin Bổ Sung (additionalFields) | Optional filters and parameters such as namespace, key, creation date range for listing, counting, or bulk deleting metafields. |
| Dữ Liệu Trường Tùy Chỉnh (data) | JSON object containing metafield data for create or update operations, including namespace, key, value, value_type, description. |
| Tùy Chọn Xác Thực (validationData) | JSON object used to validate a metafield value without saving it. |
Output
The node outputs an array with one item containing a json field representing the result of the operation:
- For get and getMany operations, the output contains the metafield(s) data retrieved from Sapo.
- For create and update, the output contains the created or updated metafield data.
- For delete and bulkDelete, the output indicates success status.
- For count, the output contains a count of matching metafields.
- For validate, the output confirms if the provided value is valid.
If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires an API credential for authenticating with the Sapo platform.
- Uses an internal helper class to interact with Sapo's metafield API endpoints.
- No other external dependencies detected.
Troubleshooting
Common issues:
- Providing invalid or missing resource IDs or metafield IDs will cause errors.
- Incorrectly formatted JSON in the
dataorvalidationDataproperties may lead to validation failures. - Attempting operations unsupported by the resource type or metafield may fail.
Error messages:
- Errors from the Sapo API (e.g., "Not Found", "Unauthorized") will be surfaced with their messages.
- Validation errors will indicate why a metafield value is invalid.
Resolutions:
- Ensure all required IDs and fields are correctly set.
- Validate JSON syntax before inputting into the node.
- Confirm API credentials have sufficient permissions.
Links and References
- Sapo Platform Documentation
- Metafields Concept Overview (Note: Shopify metafields concept is similar and may help understand usage)