Webhook theme/update doesn't fire on theme edit

Conversify
New Member
3 0 0

Hi!

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')?

 

SmartSearch App in development - Launching april 2019 - conversify.com
0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 191

Hey there, 

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!

0 Likes
Guillaume_GARCI
Shopify Partner
4 0 5

Hi,

Any update on this?
Thx

Product Owner - Joone (https://www.joone.fr)
0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 191

Hey Guillaume, 

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. 

0 Likes
Easy_GDPR
New Member
7 0 0

Hi,

We are also looking for this feature. Would be glad if you could provide a new webhook for any theme changes.

Best,

Szabolcs

0 Likes
KarlOffenberger
Shopify Partner
1867 182 777

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?

  • If it's for tracking file changes in order to sync files / versions based on dates - yikes, super unreliable (webhooks are unreliable by definition, tracking file versions by dates is plain wrong)
  • If it's for tracking file changes in order sync up some theme schema settings with your app, then I'd argue the app isn't designed well (not saying the standalone application, just the Shopify app bit)

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?

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Easy_GDPR
New Member
7 0 0

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.

0 Likes
KarlOffenberger
Shopify Partner
1867 182 777

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.

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Emerson_Code_Ad
Shopify Partner
2 0 3

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).

Ari9
Excursionist
17 1 1

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.

Thanks!

0 Likes