Segments
Last updated
Was this helpful?
Last updated
Was this helpful?
A Segment is a subset of a collection: it's a saved filter of your collection.
Segments are designed for those who want to systematically visualize data according to specific sets of filters. It allows you to save your filter configuration so you don’t have to compute the same actions every day.
Segments can be configured from the interface, without the need to write any code.
This is documented in the User Guide ↗.
Sometimes, segment filters are complicated and closely tied to your business. Forest Admin allows you to code how the segment is computed.
For instance, in our Live Demo example ↗, we’ve implemented a Segment on the collection products
to allow admin users to see the bestsellers at a glance.
The only requirement when implementing a segment from your agent is to return a valid ConditionTree
(see Understanding Filters).