Save a segment
crm_save_segmentSave filters under a name, such as "customers renewing within 30 days" (a new name creates a segment, an existing one replaces its filters). Use it with the segment argument of crm_find_contacts, crm_find_companies, crm_find_deals and crm_export. Relative dates (today+30) are worked out each time. Costs $0.001 per call; nothing if it fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| sort | No | Default sort, e.g. "-amount". | |
| object | Yes | ||
| filters | Yes | Conditions that must all match, e.g. [{"field": "lifecycle_stage", "op": "eq", "value": "customer"}, {"field": "renewal_date", "op": "lte", "value": "today+30"}]. field: a standard field, "tag", or a custom field key (crm_list_fields lists them all). op: eq, ne, contains, starts_with, in (value is a list), gt, gte, lt, lte, is_empty, is_set. Dates take YYYY-MM-DD or today, today+N, today-N. |