Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I need to add an order note with the barcode (UPC) of certain products within the order that contain a certain tag. So if a product in an order has the tag "In Stock at A" and does not have the tag "In Stock at B" I want an order note added with the barcode of that product.
I have found the "Update order note" action as well as the barcode variable but I can't figure out how to filter which barcodes are pushed through.
Any help would be greatly appreciated.
@PaleBlueDot wrote:I need to add an order note with the barcode (UPC) of certain products within the order that contain a certain tag. So if a product in an order has the tag "In Stock at A" and does not have the tag "In Stock at B" I want an order note added with the barcode of that product.
I have found the "Update order note" action as well as the barcode variable but I can't figure out how to filter which barcodes are pushed through.
Any help would be greatly appreciated.
Hello!
To add an order note with the barcode of products tagged "In Stock at A" and not "In Stock at B," you can filter products to identify the ones with the desired tags, extract their barcodes, and then update the order note with these barcodes. Use a script to filter products with the tag "In Stock at A" and without "In Stock at B," extract their barcodes, and join them into a single string. Finally, use the "Update order note" action to add this string to the order note. Adjust the script to suit your specific platform and programming language needs.
@Erika383Rivera wrote:
@PaleBlueDot wrote:I need to add an order note with the barcode (UPC) of certain products within the order that contain a certain tag. So if a product in an order has the tag "In Stock at A" and does not have the tag "In Stock at B" I want an order note added with the barcode of that product.
I have found the "Update order note" action as well as the barcode My iTero variable but I can't figure out how to filter which barcodes are pushed through.
Any help would be greatly appreciated.Hello!
To add an order note with the barcode of products tagged "In Stock at A" and not "In Stock at B," you can filter products to identify the ones with the desired tags, extract their barcodes, and then update the order note with these barcodes. Use a script to filter products with the tag "In Stock at A" and without "In Stock at B," extract their barcodes, and join them into a single string. Finally, use the "Update order note" action to add this string to the order note. Adjust the script to suit your specific platform and programming language needs.
Did that prove to be useful for you?
Hello! First of all thanks for the response. This seems like it would work but could you explain in a little more details how I go about making the script to filter products with certain tags?
If you mean that you are not sure how to add the tags conditions, it would look like:
If at least one of order / lineItems
If at least one of lineItems_item / product / tags
is equal to "Stock at A"
To add the second condition to check that it doesn't have the other tag, you need to "Add criteria" for that same line item (very important) and then choose:
None of lineItem_item / product / tags
is equal to "In Stock at B"
I believe that is what I am doing. Attached is what I have so far but it doesn't seem to be working.
I need it to filter out all line items from the order that are tagged with In Stock at All Media Supply but are not tagged with In Stock at Pale Blue Dot Records. Then I need all those product UPCs added to the order notes.
I feel like I'm close but it isn't working.
In that condition you are checking if a single tag is both that first value AND not the second value. Since when the first it true, the second will always be true, this effectively ignores the second condition.
You want to add a condition to the same line item. It should say "None of product / tags is equal to ...." . You are currently instead using "Does not include", which again is checking just a single tag, so if any tag doesn't have that include that value it will be true (basically always).
Ok that makes sense. I just changed it, did I get it right this time?
Now my only issue is it doesn't seem to be updating the order note with the filter values.
You are missing the second part of the condition to check the other tag, but that's the general idea.
It's checking If at at least one of the line items doesn't have the product tag .
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025