Today we’re introducing a new way to query Flows, allowing you to do much more advanced queries, including cross-flow querying and array checks.
For a long time, we’ve been asked by a large number of our community if there was a way to do more advanced queries on our Flows. We spent a lot of time looking at what would be needed and how to implement an elegant solution that was backward compatible. There was a good chance that any system we implemented wouldn’t work with our SDKs or could break existing projects. The solution we came up with was to use our existing URL structure but to add more flexibility to it. There are now a number of operators that can be used as part of the column, for example:
1 2 3 4 5 6 7 8 9 10 11
# Equals products?title=Real+Product # Does not equal products?title!=Example+Product # Greater than products?price>=49.99 # Less than products?price<=99.99
And of course, you can chain all of these methods into one query.
You can now also do “like” and “not like” queries to make searching on titles, slugs and descriptions much easier.
1 2 3 4 5
# Like products?title*=Chair # Not Like products?title!*=Sofa
As well as this we introduced the “in” clause to allow you to check if your column is in an array of items:
Using IDs isn’t always the nicest way to go about doing things so we wanted to make it easier. To do this we enabled cross-flow querying, meaning columns within a relationship can now be queried. You can now tie together search queries for attributes, custom options and more, all by using the dot separator.
Again everything can be chained into one complex query:
While these examples are all using products, they will work on any flow - including custom created flows.
These arguments are now available in version one of the API and we’re really excited to see what you guys do with these!