Right now I am trying to use the Wix automations to send data to a webhook when a customer makes a purchase. But the data is incomplete. It does not include any information about the product they ordered, such as size and colour.
Is there anyway I can code a webhook into my webpage using Velo for when a customer makes a purchase (using any payment method)?
Right now I’m looking at using an events.js file on the back end and the wix-stores-backend events. I’ll see if it works as expected.
the backend events are not triggering. I’ve tried several of them. such as onCartCreated( ) and onProductUpdated( ). I’ve included console logs and nothing is showing up in the site monitor.
I am using live version of site, not a preview.
onCartCreated( ) is working now. I think I saw some other posts about the backend not working properly.
Does wix not notify it’s users of errors like this? Would be a problem in our supply chain when this happens again and we will need to know.
The backend events do not work in preview mode if you are doing the same.
If that is not the case, then maybe add a console log in each step in your code and check the site monitoring tool to see if there is any error.
You can definitely get more data from wix stores data using the new order event from the backend (https://www.wix.com/velo/reference/wix-stores-backend/events/onneworder