Skip to main content

Create new event action

This action requires the "create event action" permission.

To add a new event action, navigate to the "Add new action" form, by pressing the "+" button in the top right corner above the table.

output.gif

Event actions should (at current time) only be added by administrators with access to the code base, asdue ato class names withand their full pathpaths arebeing mandatory when creating a new event actionactions. and thatThat information is only available to developers.

image.png

OnThe creation form consists of several fields, required for creation of a new event action:

  • Name:
    • The name of an event actions should be simple and descriptive, making it easy to figure out an event action's function from name alone (eg. Send email to user when new order is created).

With the form,name onceset, allthe aevent name,that triggers the event action and the action that is performed by the event action need to be defined.

image.png

  • Event full class namesname:
    • A full path (namespace and requiredclass argumentsname) haveof beenthe entered,Event class that needs to be triggered to perform the event action (eg. App\Containers\Product\Events\ProductsStockUpdatedEvent).
  • Action full class name:
    • A full path (namespace and class name) of the Action class that will run once the Event is triggered. (eg. App\Containers\Mail\EventActions\SendEmailAction).

With the name, event and action defined, the three top switches shouldcan be toggled on/off.

image.png

  • Enabled:
    •  An event action can be either activatedactive or not. DeactivatedInactive event actions will never run.
  • Fail in error: 
    • When this option is toggled on, any error that appears when running the event action, will cause the action to stop and report an error. If notify optionswitch is toggled on, the erroraction will be emailedperformed toas thenormal, developmentbut team.will stop immediately on encountering an error.
  • Notify on error:
    • When this optionswitch is toggled on, whenever the event action runs and encounters an error, an email is sent to the development team to inform them of a failure when performing the event action.