We are working for the past couple of months on a new Shopify App that is build on our existing product SmartSearch (happy to give a preview to anyone who's interested btw!).
Basically we enhance your search with machine learning, autocomplete, filters, business rules etc to drive more conversions (search is a very important driver!). Our app takes over your default search with our results. The style (colors, fonts etc) of these results are adapted to your shop. On install we can read those by looking at your current main theme and copy some values.
We subscribe to the webhook 'theme/update' but this only fires on adding a complete new design (eg theme switch). If you change colors, fonts etc we don't get a webhook post to our backend. (try to change a color in for example the 'debut' theme and check if the webhook is fired)
I would expect that 'theme/update' would fire on all update events in a theme.
Sure, we can 'fix' this by either polling the theme endpoint every minute/hour/... or make a explicit button in our app to 'sync' the design with our app (we chose the latter for now).
Is there a way that we can get small(er) theme updates through a webhook (preferably 'theme/update')?
The best way to keep up on theme updates at the moment is by polling for changes at certain time intervals (or when someone clicks a button and tells you to do it), though I can personally agree this is probably not the most ideal.
I've brought this up with our engineers here, I'm just waiting to see if this is a matter that we can all agree on or not. If I hear back with some news to pass along I'll try to keep you posted!
No updates as of yet. Though the issue has been raised with our developers, it doesn't come up often and our priorites are currently in other areas. I think it's more likely that you'll see a separate webhook topic for this in the future if anything, but it isn't something currently being worked on.
I'd ask why you need this kind of webhook?
I'd also add that the theme/update topic wouldn't be the right one for asset changes. I'd expect theme/update to fire only when theme related fields or meta info change.
Assets to not have any kind of webhooks and I am not sure why we'd need them?
In general, for asset change tracking I'd even vote against webhooks just to avoid the mess app vendors would make from abusing this for auto-updating / syncing / preventing user changes / I am sure they'd come up with many more "creative" uses.
Jyst some thoughts - still curious why we'd need the asset update topic on webhooks?
Thanks Karl for your insights 🙂
I copy the page.liquid, and create a seperate liquid which includes the original content of page.liquid, plus additional lines. As I cannot include whole liquid files, only templates, I think I cannot do this other way.
And I would like to track modifications of the original page.liquid file, and update our copy liquid when modified. Yes, I can poll for modifications on this file, but it's not convenient.
Still not sure why you need to poll or detect changes when the changes occur. Would it not be enough to copy page.liquid, create a SHA hash, store in some version / lock file, apply changes and re-create SHA hash upon successful update on remote.
Now each time you have an update to push, you download the page.liquid, compare hash to last known hash. If they aren't equal use diff to resolve and apply your changes - if it fails, you can still resolve manually.
It's basically a similar or same process used by Themekit. But that's also assuming you are okay to resolve when you are ready to make changes, not vice versa, resolve when user has made changes to the page.liquid.
I'd also try to keep the "app changes" to page.liquid to a minimum and use snippet / includes i.e. 1 liners if possible because that would make the entire conflict resolution a whole lot easier when users do change something.
Just a few thoughts though I am sure your use case may be very different and those webhook topics might actually benefit you.
Sorry to bump the old thread, but an effective reason to detect changes is when there is multiple people working on the site that aren't developers but still need to edit pages, install apps, etc. As such, a single activity pane where I can see entries like "John edited theme.layout at [Time]" or "Karl edited Theme Settings > Cart settings at [Time]" would be very useful for staying up to date on all the changes being made in the production store.
What you described is basically the hard way of doing it, where as a web hook would save you the time of implementing the solution you suggest. (And I do agree with you on the dangers this may pose as well).
Hello in 2020.
I need this feature as I want to create a server-side renderer app so I can develop my themes in React.
Is there any update on this? Does this webhook straight up not work? If so why is it even there?
Would love to see an update on this.
It's 10x or 100x easier to be told something has been changed than to have to poll at some interval.
In addition, polling could be less complete, less accurate. Let's say you're polling every 5 mins. If I update the same liquid file three times in that 5 mins you won't see the three updates, only the last one.
Not to sound snarky but if there's going to be theme webhooks, I don't know why you wouldn't want to know about theme file updates 🙂 There are plenty of uses.
Is there any movement on this at all?
We've been using the assets API and related. A webhook that fires on theme file update is essential to our progress. What would it take to get this on the roadmap?
Hello from 2022! It looks like this still isn't possible - is anyone aware of a way to be notified when a user saves any update to their shopify theme other than polling?
It seems there has still been no progress on this after 6 years?
I am wondering what the themes/update webhook does at all at this time if editing the theme files does not fire it.
The documentation at https://shopify.dev/docs/api/admin-rest/2023-04/resources/webhook says:
> Occurs whenever a theme is updated. Does not occur when theme files are updated.
What does that even mean? This is just abysmal documentation.
Why add a webhook that does nothing?
I don't find any info on this. Can someone explain?