Are events only triggered from BackOffice actions?

I have an event handler that acts on the VariantPriceUpdated event.
It works fine if I change the price of a variant in the backoffice, but not if I change the price via code. I notice the same behaviour with e.g. VariantUpdated event.

Do events only fire on backoffice actions, or should they also fire if something happens via code?

Litium version: 6.1.1

The events is fired in all cases when the entity is updated, doesn’t matter if it is from back office or integration code.