From your back-end
Sometimes, Segment filters are complicated and closely tied to your business. Forest allows you to code how the Segment is computed. For instance, you might implement a Segment on theproducts collection to allow admin users to see the bestsellers at a glance.
Example
In the following example, we are making queries using the Forest Query Interface.As Forest does not impose any restriction on the handler, you are free to call external APIs or query your database directly instead.
ConditionTree.