Entity Segment
Entity Segment lets you define named, reusable segments — saved selections of entities of any content entity type, described by a tree of conditions. A segment names a target entity type (via its segment type), resolves to the set of entities matching its conditions, and can be reused across your site by other modules, Views, Token, JSON:API, and more.
Documentation
- Resolving segments (consumers) — the small, stable contract for modules that want to read a segment's audience.
- Writing a Segment plugin — how to add your own condition plugin that selects entities.
Companion projects
The entity_segment_crm project builds first-class Contact segments on top of
this base engine; the bundled entity_segment_user and entity_segment_group
submodules add User segments and Group-owned segments respectively.