Segment
Stored in the segments collection. createdAt and updatedAt are maintained automatically.
Returned by GET /segment, POST /segment, GET /segment/:id, PUT /segment/:id, GET /segment/execute.
| Field | Type | Notes |
|---|---|---|
name | string | required |
description | string | |
company | ObjectId -> Company | |
filterType | string | default AND · one of AND, OR |
filters | object[] | default [] |
filters.conditionType | string | default AND · one of AND, OR |
filters.conditions | object[] | default [] |
filters.conditions.fieldId | string | required |
filters.conditions.fieldType | string | |
filters.conditions.dependencySelections | any | default {} |
filters.conditions.operator | string | required · one of is, is not, contains, starts with, has all, has any, does not have, greater than and 8 more |
filters.conditions.operators | string[] | default [] |
filters.conditions.value | any | |
filters.conditions.sourceFieldId | string | |
filters.conditions.nestedPath | string[] | default [] |
filters.conditions.isNestedCustomField | boolean | |
filters.conditions.parentCollectionType | string | |
filters.conditions.pathLabel | string | |
filters.conditions.type | string | |
filters.conditions.panel | string | default contact · one of contact, lead, productService |
cachedCount | number | default 0 |
lastRefreshed | date | |
isActive | boolean | default true |
type | string | default contact · one of contact, lead, product, service |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
_id | ObjectId | default "6a95712f932657988a91c0d3" |
createdAt | date | set once |
updatedAt | date |