[GraphQL] ProductCreate avaiability

Solved
Shopify Partner
8 0 0

Hi

I'm new in graphql and in shopify, so excuse me for my noobish question :). I've a private app that create dinamically many product in store catalog, it work great, it create product with correct proprierties but created product are not avaiable for selling in any channel(location?)......why?

Thank you all

0 Likes

Success.

Shopify Partner
1843 170 537

Hello and welcome!

 

When you created the products, have you set a publishOn date? If you want them immediately published, set it to the current dateime or a past datetime. You can check if the published date is set - or also check from admin whether you can see the products are available on your Online Store publication.

 

Hope this helps!

I turn coffee in to code - since 1998
0 Likes
Highlighted
Shopify Partner
8 0 0

Hello, thank you very much for your speedy reply :).

But I have seen in the documentation at this url (https://help.shopify.com/en/api/graphql-admin-api/reference/input-object/productinput) that "Publish_On" has been declared obsolete and we must use PublishablePublish mutation. PublishablePublish, however, is very difficult to use :D and requires two graphql calls.

 

 

0 Likes

Success.

Shopify Partner
1843 170 537

The thing with the entire publishable* mutations is that they're scoped to an access scope that we cannot set. Not sure if this is a bug, accidental or intentional omission or whether I am just plain blind and missing something obvious here, but I have only been successful using publishablePublishToCurrentChannel which publishes the product to my app, not the web store i.e. useless if I want the product to be on the web store. Setting publishOn works fine and you get your product published to the store.

 

Just my observations of what works and what not.

I turn coffee in to code - since 1998
1 Like
Shopify Partner
8 0 0

Clear thank you Karl (we have same name .... Carlo in Italian) ....It would be agreeable if someone of Shopify's Staff give us a response 

0 Likes
Shopify Partner
1843 170 537

Di nenti ;-)

I turn coffee in to code - since 1998
1 Like