Enable scheduled publishing
This tutorial explains how to integrate your channel app with scheduled product publishing. The use case is simple, but you'll learn how to find resources to build more complex use cases on your own.
After you've finished this tutorial, you'll know how to do the following:
Request access to scheduled publishing
Retrieve products that are scheduled to be published to a sales channel
Poll the GraphQL Admin API to know what products are about to be made available to the channel
Requirements
Anchor link to section titled "Requirements"- You've completed the Getting started tutorials.
Access scopes
Anchor link to section titled "Access scopes"- Your app requires the
read_product_listings
access scope.
Step 1: Request access to scheduled publishing
Anchor link to section titled "Step 1: Request access to scheduled publishing"- From the Partner Dashboard, go to Apps and then select your app from the list.
- From your app's overview screen, click Configuration.
- In the App settings section, on the Product Scheduled Publishing card, click Enable feature.
Step 2 (optional): Identify products that are scheduled for publication
Anchor link to section titled "Step 2 (optional): Identify products that are scheduled for publication"Request resourcePublicationOnCurrentPublication
on the GraphQL Admin API's Product object. A publishDate
in the future indicates that the product is scheduled to display on the channel at the specified datetime.
For example,
Step 3: Subscribe to webhooks
Anchor link to section titled "Step 3: Subscribe to webhooks"Shopify's SCHEDULED_PRODUCT_LISTINGS
webhooks notify channels when products are scheduled to be published.
The following is an example payload: