Event filters are configured in your account's Mechanic settings, and each one has two parts:

  • A name – can be anything you like
  • A template – a Liquid template that renders either true or false 

When an event is received, Mechanic begins by running any event filters that are present on your account. (Order is not guaranteed.) Mechanic renders each event filter template, providing the event and shop variables. If an event filter's result equals false, Mechanic halts processing of that event entirely. Otherwise, processing continues normally.

An event that wasn't processed will look something like this, in the Mechanic frontend:

This feature is useful if your account is experiencing (or will experience) a large volume of events that (a) don't need to be processed, (b) would slow down your account if they were processed (learn more about concurrency), and (c) can be programmatically identified.

You can add, update, and remove event filters at any time. Any changes go into effect immediately.

Did this answer your question?