App reviews, troubleshooting, and recommendations
I am creating an app in ruby on rails for shopify stores and in that app I want to sync shopify products, I have done that for now using webhooks on product creation event.
But Is there any other way other than webhooks to sync shopify products to Ruby on Rails application? as I don't want my customers to do any manual setting for this.
Hi,
Just create a cron task that will go through all the products every hour and do the sync.
With cron, real time synching will not happen.
Just one more thing, can we create webhooks in shopify stores at the time of installation of app via api and thus merchants won't require to do that manually?
I tried creating webhooks using APIs only so that there will not be any manual work for merchants but I can't see webhooks got created in shopify stores.
I am using shopify oauth (https://github.com/Shopify/omniauth-shopify-oauth2) for authentication, not sure if I am doing anything wrong.
Below is my omniauth.rb file in intializers.
Rails.application.config.middleware.use OmniAuth::Builder do
provider :shopify,
Rails.application.credentials.dig(:shopify_oauth, :client_id),
Rails.application.credentials.dig(:shopify_oauth, :client_secret),
scope: 'read_products,write_products,read_orders,write_orders',
embedded_app: true,
webhooks: [
{
topic: 'products/update',
address: 'https://mydomain/webhooks',
format: 'json'
}
],
setup: ->(env) {
request = Rack::Request.new(env)
site = if request.params['shop']
"https://#{request.params['shop']}"
else
''
end
env['omniauth.strategy'].options[:client_options][:site] = site
}
end
Yes, you can create webhooks when merchant install your app. Have a look at the references here
I tried creating webhooks using APIs at the time of installation but even after that I can not see any webhooks got created on shopify store.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025