Change a segment
Rename a segment, describe it, set its status vocabulary (statuses, at most eight, each a key, a label and one of four tones), or rewrite its saved filter. The definition is **replaced whole**, not merged — send the one you want the segment to have, and {} to clear the filter and leave only the people somebody added by hand. A definition that actually changed re-walks the membership in this call, so people enter and leave as a result of it; on a community too large to walk inline the segment is marked instead and segment.refresh does it, which is what evaluatedAt being absent afterwards means. Explicit membership is untouched either way: a filter that stops matching somebody a person put there does not remove them.
Parameters
The same filter tree as preview_segment and search_members. Use either filter or definition, not both.
Append one status atomically, keeping the existing vocabulary and automatic filters. Mutually exclusive with statuses.
Set automatically when this member filter matches, first matching status wins. A person-held status is preserved. Cannot reference this segment directly or indirectly.
What a write names: lower case letters, digits, - and _, e.g. contacted.
What a person reads, e.g. "Contacted".
The colour, from the theme’s four: accent (new, act on it), healthy (done, going well), danger (blocked, lost), muted (parked).
Pin or unpin on Home. At most six segments.
The segment to change, by name or id.
Rename it. Its id and its history are kept.
What it is for.
The saved filter, **replaced whole** rather than merged — send the definition you want the segment to have. {} clears it, which leaves a segment whose members are only the ones somebody added. A definition that actually changed re-walks the membership, so people enter and leave as a result of this call.
The filter language (ADR 0025): a tree over the fields list_segment_fields returns. This is the one to use; the five keys below are what a segment could be saved with before the language existed and are still accepted.
Free text over name, handle, company and email.
Only members with an identity on this source.
Only members whose golden record names this company.
Only members seen at or after this instant.
Only members carrying at least one of these tags.
The status vocabulary, replaced whole; [] clears it. Statuses already set on people are kept.
Set automatically when this member filter matches, first matching status wins. A person-held status is preserved. Cannot reference this segment directly or indirectly.
What a write names: lower case letters, digits, - and _, e.g. contacted.
What a person reads, e.g. "Contacted".
The colour, from the theme’s four: accent (new, act on it), healthy (done, going well), danger (blocked, lost), muted (parked).
CLI flags
Pin to Home (at most six segments)
Remove from Home
Rename it; the id and the history are kept
What the segment is for
Replace the saved filter whole; it is never merged
Leave only the people somebody added by hand
Replace the status vocabulary whole: a list of {key, label, tone, filter?} (filter assigns this status automatically); [] clears it