Triggers
Triggers are a way the extension can execute logic based on the events that take place with the extension, such as extension installed, extension enabled, extension disabled etc.,. When such events occur with the extension, the trigger associated with the event will be triggered, and it will execute the logic associated with it. In order to create a trigger, first you need to create a function, where the logic that the developer needs to execute will be present. When a trigger is added to an already published extension, a new draft of the extension will be created.
The list of events for which triggers can be created is as follows:
Events | Description |
---|---|
extension_installed | This event will be triggered when the extension is installed and Zapp External Client Service is authorized. |
extension_uninstalled | This event will be triggered when the extension is uninstalled. |
extension_enabled | This event will be triggered when the extension is enabled. |
extension_disabled | This event will be triggered when the extension is disabled. |
extension_updated | This event will be trigged for multiple events
Note:When the config params are updated, two events: one for old config value deletion and another for new config value addition will be triggered |
extension_upgraded | This event will be triggered when the extensions is upgraded to the latest version. |