Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello Everyone,
if we are creating any new product published on Online store, getting "published_at": null, value,
Here is the latest example
{ "id": 4540030025809, "title": "published product creation", "body_html": "test", "created_at": "2020-03-30T12:17:05+05:30", "handle": "published-product-creation", "updated_at": "2020-03-30T12:17:05+05:30", "published_at": null, "template_suffix": "", "published_scope": "web", "admin_graphql_api_id": "gid://shopify/Product/4540030025809", }
"published_at": "2020-03-30T12:16:05+05:30",
Just after product creation, when checking json data #product-id.json, it's showing proper response as it needs to be"id": 4540036612177, "title": "test", "body_html": "", "vendor": "Dev Store", "product_type": "Canned cat food", "created_at": "2020-03-30T12:46:07+05:30", "handle": "test-10", "updated_at": "2020-03-30T12:16:09+05:30", "published_at": "2020-03-30T12:16:03+05:30", "template_suffix": "", "published_scope": "web", "tags": "",
Solved! Go to the solution
This is an accepted solution.
Hi @akshuklait and @neha4here ,
The reason why "published_at" is null in the payload of the "product/create" webhook notification is simply because that product has not been published yet.
You can easily confirm this yourself if you subscribe to both the "product/create" and "product/update" webhook topics. When you create a new product, you will get a new webhook notification for the product creation event where the "published_at" field will be null. Then, about 5 seconds later, you will get a new notification for a product update event where the same product that was newly created now has a non-null "published_at" value. The "published_at" value will typically be set to a value that is less than the created_at value, to ensure the product will be published as soon as possible.
To learn more visit the Shopify Help Center or the Community Blog.
Hi,
I am facing the same problem. When getting the product's status from Shopify, not getting the value for published_at key. It seems a problem in the Shopify webhook.
Please help.
This is an accepted solution.
Hi @akshuklait and @neha4here ,
The reason why "published_at" is null in the payload of the "product/create" webhook notification is simply because that product has not been published yet.
You can easily confirm this yourself if you subscribe to both the "product/create" and "product/update" webhook topics. When you create a new product, you will get a new webhook notification for the product creation event where the "published_at" field will be null. Then, about 5 seconds later, you will get a new notification for a product update event where the same product that was newly created now has a non-null "published_at" value. The "published_at" value will typically be set to a value that is less than the created_at value, to ensure the product will be published as soon as possible.
To learn more visit the Shopify Help Center or the Community Blog.