Not receiving events for all the subscribed webhook events, using Google Pub Sub

Solved
raheelriax
New Member
2 1 2

I am using Google Pub Sub to receive shopify webhook data. I've make webhook subscription for total of 9 Topics, using GraphQL Mutation (pubSubWebhookSubscriptionCreate) which is available in new API version 2021-07. Shopify official docs can be read here.

The followings are the Topics that I am subscribing to and the Scopes to which I've access.

 

 

const topics = [ ShopifyWebhookSubscriptionTopicEnum.COLLECTION_LISTINGS_ADD,
 ShopifyWebhookSubscriptionTopicEnum.COLLECTION_LISTINGS_UPDATE,
 ShopifyWebhookSubscriptionTopicEnum.COLLECTION_LISTINGS_REMOVE,
 ShopifyWebhookSubscriptionTopicEnum.PRODUCT_LISTINGS_ADD,
 ShopifyWebhookSubscriptionTopicEnum.PRODUCT_LISTINGS_UPDATE,
 ShopifyWebhookSubscriptionTopicEnum.PRODUCT_LISTINGS_REMOVE,
 ShopifyWebhookSubscriptionTopicEnum.LOCATIONS_CREATE,
 ShopifyWebhookSubscriptionTopicEnum.LOCATIONS_UPDATE,
 ShopifyWebhookSubscriptionTopicEnum.LOCATIONS_DELETE,
]

const scopes = [
read_products,
read_product_listings,
read_customers,
read_orders,
read_draft_orders,
read_inventory,
read_locations,
read_checkouts,
read_discounts,
write_products,
write_customers,
write_orders,
write_order_edits,
write_draft_orders,
write_inventory,
write_fulfillments,
write_assigned_fulfillment_orders,
write_merchant_managed_fulfillment_orders
]

 

 

 

 

The Shopify returns a successful response for each of them, but I am not able to receive events for all of those topics only some of them worked each time. Sometimes I receive data for

Listing Add and Location Create and sometimes I receive data only for Location Create, Update and Delete.

I am not able to receive webhook data for all of the subscribed events. Can anyone point out what could be the issue here.

raheelriax
New Member
2 1 2

This is an accepted solution.

Figured out, that the issue was with the topics I was subscribing to updating them worked for me!

 

COLLECTIONS_CREATE,
COLLECTIONS_UPDATE,
COLLECTIONS_DELETE,
PRODUCTS_CREATE,
PRODUCTS_UPDATE,
PRODUCTS_DELETE,
LOCATIONS_CREATE,
LOCATIONS_UPDATE,
LOCATIONS_DELETE