Hello,
I am trying to write a Flow which triggers on a Product variant inventory quantity being changed, the trigger works. The check if I am using is if options_item.position = 1 and options_item.name = color, that also works and tells me that color is is in the first position. Once I get it to work I would create two more check ifs for position 2 and 3, maybe there is a way to do all in one but I am a novice.
My issue is the Action step, specifically the code I need to grab the option name from position 1, or the position where options_item.name = color.
The above returns the following error for the product I am testing. Exception: Got error updating metafield: “Value must be a single line text string.” For value: “\n Orange\n\n 28mm\n\n\n”, Type: single_line_text_field
This leads me to believe I either need an if statement to only return the option value in position 1 or there some sort of other reference I am missing. Any help would be very appreciated! I intend to the same with the Google: Size Metafield.
Steve

