Product Action: Set a product metafield value

The Set a Product Metafield Value Action in Arigato Automation for Shopify lets merchants assign values to metafields for products in their store. This can be particularly useful for storing additional information that doesn't fit into Shopify's standard product attributes.

Configuring the Action

Field Name Description
Metafield Selection Type Choose between entering a custom Namespace/Key or selecting a Metafield Definition from your store's existing Metafield Definitions.
Namespace Required if Metafield Selection Type is set to Namespace/Key. This is the namespace for the metafield. Example: inventory
Key Required if Metafield Selection Type is set to Namespace/Key. This is the key for the metafield. Example: location
Value Type Required. Select the appropriate data type for the Metafield's value. Options include text, number, boolean, etc. See below.
Value Enter the value you want to set for the metafield. The format of this value must match the selected Value Type.

Value Types

Value Type Description Example
Single Line Text Field A simple text input that should be used for single-line entries. This is a single line text
Multi Line Text Field Text input for paragraphs or multiple lines of text. This is
multiple lines
Integer A whole number value. 42
Decimal A number that includes a decimal point. 3.14
Date Uses the YYYY-MM-DD format. 2023-04-21
Date/Time Values must be in ISO 8601 format without a timezone. 2023-04-21T15:30:00
Boolean Takes either 'TRUE' or 'FALSE'. TRUE
Page Reference An ID starting with gid://shopify/ for a Shopify page. gid://shopify/Page/123456789
Product Reference An ID starting with gid://shopify/ for a Shopify product. gid://shopify/Product/987654321
Variant Reference An ID starting with gid://shopify/ for a Shopify product variant. gid://shopify/ProductVariant/12345678910
File Reference An ID starting with gid://shopify/ for a file uploaded to Shopify's Files section. gid://shopify/File/12345678910
URL A web address. https://www.example.com
Color A HEX color code value such as #000000 for black. #FF5733
Weight A weight value, which requires specifying a unit. Units: Kilograms
Weight Value: 5
Volume A volume value, which requires specifying a unit. Units: Liters
Volume Value: 2
Dimension A dimension value, which requires specifying a unit. Units: Centimeters
Dimension Value: 100
Rating A rating value, specified within a minimum and maximum scale. Rating scale minimum: 0
Rating scale maximum: 100
Rating Value: 85
JSON Value A JSON-formatted string, rendered in a script tag when output in themes. [{"k":"v1"},{"k":"v2"}]
Single Line Text Field (List) Allows adding and removing single-line text values from a list. Multiple values are separated with commas. Duplicates are ignored by default. Value 1, Value 2, Value 3
Integer (List) Allows adding and removing integer values from a list. Separate multiple values with commas. Duplicates are ignored by default. 1, 2, 3
Decimal (List) Allows adding and removing decimal values from a list. Separate multiple values with commas. Duplicates are ignored by default. 1.1, 2.2, 3.3
Date (List) Allows adding and removing date values (in YYYY-MM-DD format) from a list. Separate multiple values with commas. Duplicates are ignored by default. 2023-01-01, 2023-12-31
Date/Time (List) Allows adding and removing date/time values (in ISO 8601 format) from a list. Separate multiple values with commas. Duplicates are ignored by default. 2023-01-01T12:00:00, 2023-12-31T18:30:00
Page Reference (List) Allows adding and removing page reference values (with IDs starting with gid://shopify/) from a list. Separate multiple values with commas. Duplicates are ignored by default. gid://shopify/Page/123456789, gid://shopify/Page/987654321
Product Reference (List) Allows adding and removing product reference values (with IDs starting with gid://shopify/) from a list. Separate multiple values with commas. Duplicates are ignored by default. gid://shopify/Product/987654321, gid://shopify/Product/123456789
Variant Reference (List) Allows adding and removing variant reference values (with IDs starting with gid://shopify/) from a list. Separate multiple values with commas. Duplicates are ignored by default. gid://shopify/ProductVariant/12345678910, gid://shopify/ProductVariant/10987654321
File Reference (List) Allows adding and removing file reference values (with IDs starting with gid://shopify/) from a list. Separate multiple values with commas. Duplicates are ignored by default. gid://shopify/File/12345678910, gid://shopify/File/10987654321
URL (List) Allows adding and removing URL values from a list. Separate multiple values with commas. Duplicates are ignored by default. https://www.example1.com, https://www.example2.com
Color (List) Allows adding and removing color values (in HEX code) from a list. Separate multiple values with commas. Duplicates are ignored by default. #FF5733, #33FF57
Weight (List) Allows adding and removing weight values from a list. Specify units for each value. Separate multiple values with commas. Duplicates are ignored by default. 5 Kilograms, 10 Pounds
Volume (List) Allows adding and removing volume values from a list. Each value must be in the format of "quantity unit". Valid units: ml, cl, l, m3, us_fl_oz, us_pt, us_qt, us_gal, imp_fl_oz, imp_pt, imp_qt, imp_gal. Separate multiple values with commas. Duplicates are ignored by default. 1.5 us_gal, 10 ml
Dimension (List) Allows adding and removing dimension values from a list. Each value must be in the format of "quantity unit". Valid units: mm, cm, m, in, ft, yd. Separate multiple values with commas. Duplicates are ignored by default.
12 in, 120 mm
Legacy String Deprecated; Used for simple text strings. This is a legacy string
Legacy Integer Deprecated; Used for whole number values. 12345
Legacy JSON Deprecated; Used for data in JSON format. {"legacy_key":"legacy_value"}

Credit Cost

Using the Set a Product Metafield Value Action counts as a single action credit on Lite plans. There is no credit cost for Unlimited plan users.

Custom Actions

Including the Set a Product Metafield Value Action in Custom Actions is fully supported. Further information and examples can be found in the documentation.