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

Khách Hàng → Lấy Chi Tiết

AI-generated

Overview

This node manages custom metafields on various Sapo resources, including customers, products, orders, and more. It allows users to create, retrieve, update, delete, count, validate, and bulk delete metafields associated with a specific resource item.

For the Khách Hàng (Customer) resource with the Lấy Chi Tiết (Get Detail) operation, the node fetches detailed information about a specific custom metafield attached to a particular customer by their resource ID and metafield ID.

Common scenarios:

  • Retrieving additional metadata stored for a customer, such as loyalty program details or preferences.
  • Managing custom fields that extend the default customer data in Sapo.
  • Integrating external systems that rely on these custom metafields for enriched customer profiles.

Practical example:
You want to get the value of a custom metafield that stores a customer's preferred shipping method. By specifying the customer ID and the metafield ID, this node will return the detailed metafield data.

Properties

Name Meaning
ID Tài Nguyên The unique numeric identifier of the resource item (e.g., customer ID). Required.
ID Trường Tùy Chỉnh The unique numeric identifier of the custom metafield to retrieve. Required for "get" operation.

Output

The node outputs an array with one element containing a json object representing the metafield details. The structure typically includes:

  • id: The metafield's unique identifier.
  • namespace: The namespace grouping the metafield.
  • key: The key name of the metafield.
  • value: The stored value of the metafield.
  • value_type: The type of the value (e.g., string, integer).
  • description: A description of what the metafield represents.
  • owner_type: The resource type owning the metafield (e.g., "customer").
  • owner_id: The ID of the resource item.

If the operation is successful, the output JSON contains the metafield data; if an error occurs and "continue on fail" is enabled, the output will contain an error field with the message.

Dependencies

  • Requires an API credential for authenticating with the Sapo platform.
  • Depends on the internal SapoApiBase class to interact with Sapo's metafield API endpoints.
  • The node expects the resource type and IDs to be valid and existing in the Sapo system.

Troubleshooting

  • Common issues:

    • Providing invalid or non-existent resource or metafield IDs will cause errors.
    • Missing or incorrect API credentials will prevent successful API calls.
    • Network connectivity problems can lead to timeouts or failures.
  • Error messages:

    • Errors from the API are caught and returned as messages in the output if "continue on fail" is enabled.
    • Typical errors include "Resource not found," "Invalid metafield ID," or authentication failures.
  • Resolution tips:

    • Verify that the resource ID corresponds to an existing customer.
    • Confirm the metafield ID exists for that customer.
    • Ensure the API credential is correctly configured and has necessary permissions.
    • Check network connectivity and retry if transient errors occur.

Links and References

Discussion