Hi,
How can i setup a condition that lets me check if a product is online on specific sales channels?
Hi,
How can i setup a condition that lets me check if a product is online on specific sales channels?
It did not work at all…
Another guess?
It should just be a super simple condition: “Check if product is published to sales channel: (Online store)”
The “easy” field requires an argument, which is something that Flow doesn’t support yet, but is building. It would be product.publishedOnPublication<publication_id>.
Flow is working on allowing arguments for some fields, but is focused on metafields currently.
I think the workaround above is the way, but not sure what’s not working for you.
Here’s data I see for my test shop, which should help you build a condition
"data": {
"product": {
"id": "gid://shopify/Product/8006388645910",
"resourcePublications": {
"nodes": [
{
"publication": {
"id": "gid://shopify/Publication/62653235222",
"name": "Point of Sale"
},
"isPublished": true
},
made the workaround, but it seems like it is not registering “Online Store” as sales channel quite correct.
Maybe you know what i do wrong here?
you aren’t using the fields I showed above.
Sorry i used the other guys sollution, i think i am quite close here, but maybe you can see what is not correct.
i want it to make the “Condition” true, if sales channel: Online store, is not actiavted
I seem to have the sollution if it is just “online store” that is not published but others are.
But i need something that also can trigger, if no sales channels is online.
Maybe just check product.publicationsCount or product.availablePublicationCount = 0
Don’t know if this’ll help you any but it’s what I’m using. It triggers whenever any stock is added/removed, if stock has went to 0 id unpublishs from all channels, if stock is over 0 it checks how many channels its publish on and if it’s 6 it does nothing and if less than 6 it publishs it everywhere.
Our channels are 6 becuse of Online Store =1, Shop =1, Google & Youtbe =2 and Facebook & Instagram =2, yous may be different.
Thanks man, i think this is what comes closest to a functional sollution, compared to all the other stuff.
No worries mate, hope it helped. I should of mentioned that the method above means that when you add stock and hit save it lists straight away so you need to make sure your listings are correct before adding stock, this works for us but may not be perfect for others.