Create metafield definition

The Create metafield definition action creates a metafield definition based on the provided information.

Fields

The Create metafield definition action contains the following fields.

Fields used in the Create metafield definition action.
FieldDescription
NameRequired. The name of the metafield definition.
DescriptionThe description for the metafield definition.
NamespaceRequired. The container for a group of metafields to associate the metafield definition with.
KeyRequired. The unique identifier for the metafield definition within its namespace.
Resource typeRequired. The resource type that the metafield definition is attached to.
Data typeRequired. The type of data that the metafield stores.

Triggers

The Create metafield definition action 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 namespace custom and the key industry is created when a new company is created and such a metafield definition does not exist.

API details

To learn more, review the metafieldDefinitionCreate mutation.

Templates

Create and initialize shop metafields

Use shop metafields with Flow by creating definitions and initializing the metafield with the value(s) you need. View template

Send B2B order invoice to multiple email addresses

Send invoices for B2B orders to multiple email addresses. This will use the email addresses saved as Metafields in a company location, if they exist, or this will first create three Metafields: extra_invoice_recipient.email1, .email2, .email3. View template

Can’t find the answers you’re looking for? We’re here to help.