I’m building a dashboard integration that should listen to three types of Feed events:
- New order
- Canceled order
- Invoiced order
Additionally, the orders should only be from:
- salesChannel 1
- salesChannel 2
I was previously using the Feed integration with FromWorkflows instead of FromOrders configuration. However, since now I need to filter salesChannels in addition to statuses, I had to move to the FromOrders method.
The problem: while using FromWorkflows I was able to filter new orders through the order-created
status. Now, using FromOrders, no events with that status seem to show on the Feed.
This is my current Feed configuration:
{
"filter": {
"expression": "(((status = \"order-created\") or (status = \"invoiced\") or (status = \"canceled\")) and ((salesChannel = \"1\") or (salesChannel = \"2\")))",
"disableSingleFire": false,
"type": "FromOrders"
},
"queue": {
"visibilityTimeoutInSeconds": 240,
"messageRetentionPeriodInSeconds": 604800
},
"quantity": 16,
"approximateAgeOfOldestMessageInSeconds": 2147483647.0
}
Is there something wrong with it?
How should I change the expression
in order to achieve the desired outcome?