Hi,
I would like to store orders and their details in an external database to be used by an application which helps us with fulfilment. Reading around it is not obvious which is the best and recommend approach. Is anybody able to provide reference/readying materials on how to implement this?
Thanks!
After research it seems it might be possible via http-functions. Anyone with experience using these can advise whether it possible to access and publish orders with this functionality?
http-functions are meant for use with webhooks, or things that want to notify your site about something. It sounds like you want it the other way round: to populate an external database whenever an order is created.
It sounds like the backend store events might be closer to what you want: https://www.wix.com/velo/reference/wix-stores-backend/events
EDIT: A word of warning. The ‘Stores/Orders’ table is read-only, so you won’t be able to programmatically update any of its contents (even with the ‘suppressAuth’ option), so keeping Wix’ orders table and your external table in sync won’t be possible. #justWixThings
@alexmeuer Thank you! Do you know if there is a way to trigger the event for testing purposes. I can’t see a way to do that and it will be a long development cycle if I am waiting for an order each time?
With the http function if I could return a JSON response then I could just update via a cron job and test with ease?