Taskrouter expressions need the ability to invert conditions

aaron_cl ✭✭✭
edited July 15 in Taskrouter

Taskrouter expressions are a great concept that allow more dynamic routing not constrained to a traditional hierarchy, while also reducing the need for infrastructure. The idea is great: set up your routing rules and filters, and you're up and running.

The implementation however, omits features severely limiting its usefulness.

Inverting conditions

Example scenario:
I have a number of workers. Those from department A have @example.com emails, but those from department B use misc domains without any standard convention.

I can easily make a queue for department A like so:

email CONTAINS 'example.com'

However, making a queue for department B workers is currently impossible, as there's no way to invert the rule. These examples do NOT work:

NOT (email CONTAINS 'example.com')
!(email CONTAINS 'example.com')
email NOT CONTAINS 'example.com'


I feel like the omission of an invert operator is a gross oversight.
Is there any rhyme or reason over this omission? Would you agree Twilio needs to add this feature?


Sign In or Register to comment.