About Backend Events

Many Velo APIs include events that trigger when the required conditions are met. Unlike in the frontend, where event handlers are defined in the page code, for backend events, handlers are defined in the events.js backend file.

For example, you might have backend event handlers that trigger when:

  • An invoice is paid.
  • A file has been uploaded to the Media Manager.
  • A form is submitted by a site visitor.

Backend events are only triggered for published sites and don't work in preview mode.

Supported IDEs

You can define backend event handlers using:

Testing and Debugging

To test an event handler in preview mode, use functional testing. Functional testing saves you time and effort when building your own system for triggering and testing your backend functions, by allowing you to quickly test backend functions directly in the code editor.

See step-by-step instructions on how to test your backend code.

Velo Package Backend Events

Velo packages are code libraries built with Velo that allow you to add specific functionality to your site, saving you the time you would have spent coding the functionality on your own.

Some Velo packages include backend events, which are contained in their own events.js files. So if you add a Velo package that includes backend events, you might end up with multiple events.js files in several locations.

See Also

Was this helpful?
Yes
No