メインコンテンツへスキップ

コホート

何をするか、何であるかで定義された人々の集合: すべてのコホートは名前と定義であり、定義は書かれたとおりに読める条項です。このイベントを何日以内に何回行った、またはこの属性がこの値を持つ。空の定義は誰も選びません。それは設計です。

The cohorts screen in the Live environment
The cohorts screen, Live environment.
The cohorts screen in the Live environment, dark theme
The cohorts screen, Live environment.

The library

Each card is one cohort: its name, whether it is active, how many people it currently selects and how fresh that answer is. A cohort whose clauses count behaviour over history is swept on a schedule and says when it was last evaluated, or that it never has been; one defined purely by current attributes is live and carries no timestamp, because a timestamp would imply a staleness it does not have. The toolbar narrows by search, kind and state, and deleting asks first, warning that analyses filtered by the cohort stop being filtered by it.

The definition editor

A cohort opened to its definition
A definition open under its card.
A cohort opened to its definition, dark theme
A definition open under its card.

Opening a card unfolds its definition in place: behavioural clauses (did an event at least so many times within so many days, with the project's own event names suggested) and state clauses (an attribute compared to a value). A cohort is named first and defined after, and an empty definition selects nobody rather than everybody, which the open row says in as many words. Opening a second card does not close the first, so two definitions can be compared side by side without losing edits.

Where cohorts are used

A cohort scopes a question in the Analytics workbench, targets a campaign in the Inbox, and gates workflow triggers on the Workflows screen. The same set of people, wherever the set is needed.

Where this meets the API

The concept behind the screen is the People and cohorts pillar; the people being selected are the People directory. On the wire: the library is the cohorts query and editing is createCohort, updateCohort, setCohortActive and deleteCohort (GraphQL reference).