Copy Product Category to Metafield

Solved

Copy Product Category to Metafield

Glow_Up_Fits
Excursionist
35 5 3

I'm trying to update a metafield called Category (single line text) with the item taxonomy node name ("Pants", "T-Shirts", etc.) I thought the flow in the screenshot below would do this but I get the following error:

 

 

Got error updating metafield: "Value must be a single line text string." For value: "\n Activewear Pants\n\n Athletic Shoes\n\n Backpacks\n\n Baseball Caps\n\n Beach Towels\n\n Blouses\n\n Bodysuits\n\n Boots\n\n Bras\n\n Bucket Bags\n\n Cardigans\n\n Cargo Pants\n\n Classic Bikinis\n\n Clothing Tops\n\n Clutch Bags\n\n Coats & Jackets\n\n Coin Purses\n\n Cosmetic & Toiletry Bags\n\n Cover Ups\n\n Cowboy Hats\n\n Cross Body Bags\n\n Denim Shorts\n\n Dresses\n\n Duffel Bags\n\n Fanny Packs\n\n Fedoras\n\n Flats\n\n Handbags\n\n Hats\n\n Heels\n\n Hoodies\n\n Jeans\n\n Joggers\n\n Joggers\n\n Kimonos\n\n Leggings\n\n Leggings\n\n Loungewear\n\n Nightgowns\n\n One-Piece Swimsuits\n\n One-Pieces\n\n Outfit Sets\n\n Pajamas\n\n Pants\n\n Polos\n\n Robes\n\n Sandals\n\n Satchel Bags\n\n Shirts\n\n Shoes\n\n Shorts\n\n Shorts\n\n Shoulder Bags\n\n Skirts\n\n Skorts\n\n Slippers\n\n Sneakers\n\n Sun Hats\n\n Sweaters\n\n Sweatpants\n\n Sweatshirts\n\n Swimwear\n\n T-Shirts\n\n Tank Tops\n\n Tote Bags\n\n Tunics\n\n Wallets\n", Type: single_line_text_field

 

chicboutique_0-1721677468659.png

Appreciate an insights re: how to make this work . Thanks.

Accepted Solution (1)

Glow_Up_Fits
Excursionist
35 5 3

This is an accepted solution.

Forget it. I was selecting the wrong field value for product category. The one I needed was under "Deprecated" and it said to use an option called "category", but that wasn't on the list. 

View solution in original post

Reply 1 (1)

Glow_Up_Fits
Excursionist
35 5 3

This is an accepted solution.

Forget it. I was selecting the wrong field value for product category. The one I needed was under "Deprecated" and it said to use an option called "category", but that wasn't on the list.