Articles in this section

Migrate your Shopify metafield from value type to type

Release notes , metafields types , developer changelog

Shopify released a new commerce-oriented type system for metafields. The new type field replaces the existing valueType field, which was deprecated in Shopify version 2021-07 and is no longer supported for versions above 2022-01.

Please follow the steps below to convert existing export and import mapping configurations to the new type field.

Note

This migration does not apply to the Shopify Integration App.

Convert exports

Change the existing mapping configurations for these APIs.

Export API

Operation

Metafield

Retrieves a list of metafields that belong to a resource

Retrieves a single metafield from a resource by its ID

Get metafields that belong to a product

Get a single product metafield

Customers : Customer

Retrieves a list of metafields that belong to a customer

Orders : Order

Retrieves a list of metafields that belong to a specific order

Products : Product

Retrieves a list of metafields that belong to a product

Products : Product Variant

Retrieves a list of metafields that belong to a product variant

Products : Product Image

Retrieves a list of metafields that belong to a product image

Online store : Article

Retrieves a list of metafields that belong to an article

Online store : Blog

Retrieves a list of metafields that belong to a blog

Products : CustomCollection

Retrieves a list of metafields that belong to a CustomCollection and SmartCollection

Orders : DraftOrder

Retrieves a list of metafields that belong to a draft order

Store properties : Shop

Retrieves a list of metafields that belong to a shop

  1. In your account, navigate to Resources → Exports.

  2. Search for Shopify to filter your exports.

  3. Identify any export APIs in the column above with matching operations.

    1. Notice

      A Get Shopify orders export and a Retrieves a list of metafields that belong to a specific order.

4448935219227-Export_with_metadata.png
  • Exit the export screen and click Actions → Used by.

4448960022171-Used_by.png
  • Click the flow that uses your export.

4448950476443-used_by_flow.png
  • Open the mappings section and find the value_type mappings on the Source record field for the export endpoints.

4494082968347-value_type_to_type_mapping_.png
  • Modify the mapping from value_type to type.

4494088468507-vt_2_type_correct.png
  1. Preview the export to ensure that the results are appropriate in comparison to your previous export.

  2. Save & close your mapping and flow.

  • OPTIONAL: If any of your exports are using Retrieves a list of metafields that belong to a resource under the metafield API, open the export.

4448936494363-list_of_resources.png
  • Launch Configure search parameters and reconfigure the parameters by deselecting value_type and providing a value for the type parameter.

4448945809947-value_type_to_type_export.png
  • Save your parameters and your export. Preview the export to ensure that the results are appropriate in comparison to your previous export.

Convert imports

Change the existing mapping configurations for these APIs.

Import API

Operation

Metafield

Creates a new metafield for a resource

Updates a metafield

Create or Update metafield

Create a new metafield for a product

Update a metafield for a product

Create or Update metafield for a product

Customers : Customer

Creates a customer

Updates a customer

Create or Update customer

Orders : Order

Create or Update order

Creates an order

Updates an order

Products : Product

Creates a new product

Updates a product

Create or Update product

Products : Product Variant

Creates a new product variant

Modify an existing product variant

Create or Update product

Online Store : Article

Creates an article for a blog

Updates an article

Create or Update Article

Online Store : Blog

Create a new blog

Update a blog

Create or Update

Products : CustomCollection

Creates a custom collection

Updates an existing custom collection

Create or Update custom collection

Orders : DraftOrder

Creates a draft order

Updates a draft order

Create or Update draft order

Online Store : Page

Create a new page

Updates a page

Create or Update page

  1. In your account, navigate to Resources → Imports.

  2. Search for Shopify to filter your imports.

  3. Click on imports that match the Import API column and find any matching operations.

    1. Notice

      Products : Product import and Create or update product operation.

  • Exit the import screen and click Actions → Used by.

4448978075803-import_used_by.png
  • Click the flow that uses your import.

4448950254363-used_by_import_list.png
  1. Open the mappings section and find metafield mappings on the Destination record field. For example:

    1. metafield.value_type

    2. metafields[*].value_type

    3. customer.metafields[*].value_type

    4. order.metafields[*].value_type

  2. Modify the mappings to:

    1. metafield.type

    2. metafields[*].type

    3. customer.metafields[*].type

    4. order.metafields[*].type

  1. Preview the import mapping to ensure that the results are appropriate in comparison to your previous import.

  2. Save & close your mapping and flow.

New Type values and their Value type equivalents:

Type (new)

Value type (deprecated)

Single_line_text_field

string

multi_line_text_field

string

page_reference

string

product_reference

string

variant_reference

string

file_reference

string

number_integer

integer

number_decimal

string

date

string

date_time

string

url

string

json

json_string

boolean

boolean

color

string

weight

json_string

volume

json_string

dimension

json_string

rating

json_string