Configure and set up Metafield
Configure and set up Metafield in Dev Center
You need to define the Metafield Definitions In Developer Portal first.
- Go to Developer Portal > My Apps > Manage > Metafields, click "Edit" to configure Metafields Definition for the desired resource type.
- Click "Create"
- Fill in the following fields:
- Namespace: It defaults set as your app id and you do not need to edit it.
- Name: Enter a name for this Metafield to help you identify it in the Developer Portal.
- Key: This is the second part of the Metafield, representing the specific attribute. For example, "color."
The combination of Namespace + Key forms the complete Metafield, such as "product.color." - Description: Provide a brief description of this Metafield. This description will appear in the corresponding Metafield settings field in the Developer Portal. You can include details about what values should be entered for this Metafield.
- Content Type: Choose the type of content this Metafield will store in the admin panel, such as text, JSON, URL, number, or Boolean. For instance, if you are defining a Metafield related to "weight," the content type can be set to "number."
After creating the Metafield definition, you could create Metafield value for that resource by Open API
Configure Metafields Webhook
As a developers, your App may also want to monitor the changes of metafields definition or value if merchants make some changes on EC admin. Both merchant side & app metafields can register corresponding webhook to listen to the event. Please refer to the following link
Updated 6 months ago