Workflow target filter expression evaluation is broken

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, is broken to the point that it's only usable in the most simple cases:
Optional properties
Example scenario:
If a worker transfers a chat back into the queue, dont route the chat directly back to them.
The documentation states:
If the document does not contain the requested key, it resolves to NULL
based on this, I should be able to easily address this by setting a property on the task to be transferred containing the agentSid to be ignored. Then creating a rule in the filter target like so:
worker.sid != task.ignoreAgentSid
Indeed, this works correctly for transferred chats:
However, on new incoming chats that don't contain the property ignoreAgentSid
, the statement is never evaluated as true. This is indisputably broken.
In my testing I found a disparity between evaluating taskQueue rules, and workflow filter target expressions. Task Queue rules largely follow the documentation and can easily be tested just by viewing what workers match the current expression.
Works as expected, matching all workers (within task queue expression):
sid != null
works as expected, matching all workers (evaluating non-existing properties):
foo == bar
Twilio's inaction
I've contacted twilio support regarding this issue previously. Other than a vague "we'll look into it", communication has been radio silence.
Does anyone know if they're abandoning the concept of the expressions in routing? While I do get that you can defer to a webhook to define routing, that's more infrastructure to maintain, and is not nearly as accessible to non-coders. I would wish that what they already provided would work as claimed.
Comments
-
Hi @aaron_cl,
Sorry to hear that you had a bad support experience. This looks like need closer look to investigate it in detail. Will you mind filling another ticket so we can take a look? Feel free to include the ticket ID so that I can pass it internally. Thank you!
-
Thanks @ssengupta! I've re-submitted a ticket (basically what I've posted here). #6552637
-
Looks like Justin has reached out. Feel free to revert back on the thread if you have additional question. Keep your feedback coming!
-
Hi, we have absolutely the same problem as mentioned in the topic. Could you please give inside why checking on null in "Worker expression" does not work and how this problem can be solved?
-
I've still not heard anything back from twilio on this issue. Twilio really needs a public issue tracker so we can get a better idea of where their priorities are.
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups