Not receiving all webhooks

Not receiving all webhooks

s-sana
Shopify Partner
10 1 1
I've created the embedded app in rails using shopify app gem.
Webhook registration is working fine but only one webhook is being received but there are other webhooks but can't receive it neither receiving any error. Am i missing something ? 
Is it like i've to make custom webhook controller to receive all the registered webhooks data, if yes then please guide.  
 
Shopify config file - 

ShopifyApp.configure do |config|
config.application_name = "Example app"
config.api_key = ENV['SHOPIFY_API_KEY']
config.secret = ENV['SHOPIFY_API_SECRET']
config.old_secret = ""
config.scope = "read_products, read_orders, write_orders, read_customers, read_inventory, write_inventory" 
config.embedded_app = true
config.after_authenticate_job = false
config.api_version = "2019-07"
config.session_repository = Shop
config.webhooks = [
{topic: 'order_transactions/create', address: 'https://example.com/webhooks/order_transactions_create', format: 'json'},
{topic: 'app_subscriptions/update', address: 'https://example.com/webhooks/app_subscriptions_update', format: 'json'},
{topic: 'app_purchases_one_time/update', address: 'https://example.com/webhooks/app_purchases_one_time_update', format: 'json'},
{topic: 'products/delete', address: 'https://example.com/webhooks/products_delete', format: 'json'},
{topic: 'products/update', address: 'https://example.com/webhooks/products_update', format: 'json'},
{topic: 'products/create', address: 'https://example.com/webhooks/products_create', format: 'json'},
{topic: 'refunds/create', address: 'https://example.com/webhooks/refunds_create', format: 'json'},
{topic: 'orders/cancelled', address: 'https://example.com/webhooks/orders_cancelled', format: 'json'},
{topic: 'customers/updated', address: 'https://example.com/webhooks/customers_updated', format: 'json'},
{topic: 'customers/create', address: 'https://example.com/webhooks/customers_create', format: 'json'},
{topic: 'orders/updated', address: 'https://example.com/webhooks/orders_updated', format: 'json'},
{topic: 'app/uninstalled', address: 'https://example.com/webhooks/app_uninstalled', format: 'json'},
{topic: 'orders/create', address: 'https://example.com/webhooks/orders_create', format: 'json'}
]
end

Any help is appreciated.

Thanking you in anticipation.

 

Replies 3 (3)

Alex
Shopify Staff
1561 81 342

Can I get a shop ID and for you to indicate to me which of the webhooks is the only one that is working? And have you verified that these webhooks were all in fact created?

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

s-sana
Shopify Partner
10 1 1

I've sent you the shop id and yes the webhooks are created and even i am receiving the transaction create webhook response but not others, I am not sure where i'm wrong.

 

Thank you

Alex
Shopify Staff
1561 81 342

Looking at the production database, I can see only two webhooks created on the shop ID provided which fit your URL structure. I assume you're using an unpaid version of NGROK. One of them was created in the shop admin, so probably nothing to do with your app, and the other is the order_transactions/create webhook you mentioned that you were receiving the webhooks for but not everything else.

 

So at the end of the day only one webhook is in fact being created. I'd be checking to see that the WebhooksManagerJob is performing the way you'd expect it to.

 

If this is ongoing, the public repository might be the best place to seek more specific help.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog