Events are triggered when specific conditions on your app or a user’s site are met. You can write code that runs when an event occurs.
For example, an event might be triggered when an eCommerce order is canceled. You can implement logic that sends an email to the site visitor when the event is triggered.
How you handle events depends on which frameworks and APIs you use to build your app:
- In Wix Blocks, you can handle events using Velo.
- When self-hosting, you can implement webhooks over REST.
- If you're using the Wix CLI, you can work with events using event extensions.
Find information about specific events in our API documentation as follows:
- Wix Blocks: In the Velo API reference, event information is located in a category named Events under the top-level API category in the menu. For example, information about the
onCartCreated()
event is located under wix-ecom-backend > Events.
- REST: In the Wix REST API reference, webhook information is in the category of the corresponding service. For example, information about the Cart Created webhook is located under eCommerce > Cart.
- JavaScript SDK: In the Wix JavaScript SDK reference documentation, webhook information is in the category of the corresponding submodule. For example, information about the
onCartCreated()
webhook is located under ecom > Cart.