Create metafield definition

TheCreate metafield definitionaction creates a metafield definition based on the provided information.

On this page

Fields

TheCreate metafield definitionaction contains the following fields.

Fields used in the Create metafield definition action.
Field Description
Name 要求的事情uired. The name of the metafield definition.
Description The description for the metafield definition.
Namespace 要求的事情uired. The container for a group of metafields to associate the metafield definition with.
Key 要求的事情uired. The unique identifier for the metafield definition within its namespace.
Resource type 要求的事情uired. The resource type that the metafield definition is attached to.
数据类型 要求的事情uired. The type of data that the metafield stores.

Triggers

TheCreate metafield definitionaction can be used with all triggers.

Example

Example of a workflow that creates a metafield definition when a specific condition is met

In this example workflow, a company metafield definition with the namespacecustomand the keyindustryis created when a new company is created and such a metafield definition does not exist.

API details

To learn more, review themetafieldDefinitionCreatemutation.

Shopify准备OB欧宝娱乐APP开始销售?Try it free