Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Create smart_collection with published_scope: 'global' but smart_collection returned has 'web'

Create smart_collection with published_scope: 'global' but smart_collection returned has 'web'

crussell421
Shopify Partner
1 0 0

I am creating a smart_collection and setting the published_scope: 'global'.

The smart_collection is created but the returned smart_collection has 'web' as the published_scope.

Then when I look at the collection from admin, it shows a message:

'Unavailable on 2 Sales Channels'.

 

This is easily reproduced with curl. Just set published_scope to 'global' and post it.

The documentation on this seems very limited to say the least.

I attempted creating a { collection_listing: { collection_id: 279110418640 } }

where the collection_id is the id of the returned smart_collection above.

For that I get a Response code 403 (Forbidden).

 

1. Do I need to even make the collection_listings call? -or- should it be working by just setting the 

published_scope to 'global' of the smart_collection post request.

2. If I do need to make the collection_listings call, am I supposed to use a different token for the other sales channels (is that how we make them available per channel with a different access token?).

 

Reply 1 (1)

GrahamS
Shopify Staff (Retired)
193 37 56

Hey @crussell421 ,

 

At the moment, "Global" as a publication status should only publish to Online Store + POS. Web would be just Online Store, which may be returning if you don't have POS installed in the admin. Publishing to other Sales channels is only possible with the use of "write_publications" as a scope on your app, which for the moment is limited-approval scope. See: publishablePublish

 

As far as API goes, in lieu of having write_publications, apps will be able to publish products/collections to themselves (if they are a sales channel), Online Store, or POS, but not other app Sales Channels.

To learn more visit the Shopify Help Center or the Community Blog.