Using conditions to filter and funnel notifications

Overview

Conditions are an extremely powerful tool which allow you to set up complex rules for your notifications and filter them so you only receive pertinent information, routed to the correct channels.

Each rule/condition is comprised of three pieces of data: field, comparison and value.

You also have the option to select whether all conditions must be true, or if only a single one has to be true for this notification to send. This lets you build complex logic with multiple conditions.

Fields

When you first add a condition, you will see a list of fields to choose from. This list will differ depending on which event you are creating a notification for. Select one of these fields for your condition.

If you don't see the field you're looking for in here, contact us via the in-app support and we might be able to add it for you!

Comparisons (operators)

The second dropdown option will let you choose the comparison (or operator) to use for your condition. These will vary based on the selected field, but allow you to begin to build the logic for your condition.

Value

The final option is where you can type or select the value you wish to use for your comparison. For example, if you chose "Customer First Name" as the field and "Contains" for your comparison, your value might be "Alexandra". This condition would then be filtering all orders and only sending this notification where that condition is true (where the customer's first name is Alexandra). All other orders that are placed, would be skipped by this condition.

Use Cases

Lets take a look at a few example use cases and how we can use conditions to filter our notifications:

VIP Customers

We can create a notification for only our VIP customers, and have them send to a specific channel so we know when those VIPs are placing orders:

  • Field: Customer Tags‍

    Comparison: Contains‍

    Value: VIP

Delivery vs Pickup

If you offer pickup at multiple locations, you might want to know which location the customer selected, and have the Slack notification go to a different channel based on this location. You can achieve this by creating multiple notifications, each with the relevant conditions. Using the "Shipping Method" field, you can check this to determine which location was selected, as it will either contain the delivery/shipping method name (e.g. Express or Local Delivery), or it will have the pickup location chosen (e.g. 15 King Street). So our conditions for each notification might look like:

Notification 1:

  • Field: Shipping Method‍

    Comparison: Contains‍

    Value: 15 King Street

Notification 2:

  • Field: Shipping Method‍

    Comparison: Contains‍

    Value: 24 Albert Rd

Now we have two notifications, each one can point to a different channel, and both will only send if the corresponding pick-up location has been chosen.

Large POS Orders

Perhaps we want to be notified specifically of Point-of-sale orders that are over $100 for a particular currency - here's how we could set up our notification using multiple conditions to achieve this logic:

  • Field 1: Source Name‍

    Comparison 1: Contains‍

    Value 1: pos


  • Field 2: Total Price‍

    Comparison 2: Greater than‍

    Value 2: 100


  • Field 3: Currency‍

    Comparison 3: Contains‍

    Value 3: AUD‍

    Send when: All conditions are met

Final thoughts

These are just a few examples of how you can use conditions to build complex logic for your notifications. Feel free to play around with the different condition options and find ways you can utilize their powerful functionality for your business.

If you're unsure about any parts of this process, or don't know how to set up the logic you're wanting, please reach out to us and we can help set up conditions for you!