Support Forums

Question about triggering the build process when data is added or modified in the backend


My question relates to the Jamstack process particularly to the step when the data upon which pages are generated changes.

Say two products are added and one is modified in an ecommerce application backend. The API reflects the changes.

But then, what is the best practice to rebuild the pages? In other words how can the netlify be notified and rebuild the pages and the app?

Thanks in advance

In Git-based approach, a commit triggers a build. But you could use build hooks Build hooks | Netlify Docs that would do what you need.

Just make sure that your build command is fetching the latest data from API during each build and the rest won’t be a problem.

You could also use Netlify API for this, but that’s just a longer route for the above.

1 Like