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 you use to build your app:
- Wix CLI: Handle events using event extensions. Event extensions use the JavaScript SDK.
- Wix Blocks: Handle events using Velo.
- Self-hosting: Implement webhooks using REST APIs or the Javascript SDK.
Find information about specific events in our API documentation as follows:
- JavaScript SDK: Webhook information is in the category of the corresponding submodule. For example, information about the
onCartCreated()
webhook is located under ecom > Cart.
- Velo: Event information is located in a sub-category named Events under the corresponding API category in the Events & Service Plugins section of the menu. For example, information about the
onCartCreated()
event is located under Events & Service Plugins > eCommerce > Events.
- REST: Webhook information is in the category of the corresponding service. For example, information about the Cart Created webhook is located under eCommerce > Cart.