ListSegments
Provides information on available audience segments, including criteria and segment type.
Table Specific Information
SELECT, INSERT, UPDATE, and DELETE are supported for ListSegments.
Select
The add-in will use the Mailchimp API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client-side within the add-in.
- Id supports the '=' operator.
- Type supports the '=' operator.
- ListId supports the '=' operator.
- IncludeCleaned supports the '=' operator.
- IncludeUnsubscribed supports the '=' operator.
- IncludeTransactional supports the '=' operator.
- CreatedAt supports the '=,<,>,<=,>=' operator.
- UpdatedAt supports the '=,<,>,<=,>=' operator.
SELECT * FROM ListSegments WHERE ListId = '5152' and Id = '4458' SELECT * FROM ListSegments WHERE Type = 'saved' SELECT * FROM ListSegments WHERE IncludeCleaned = true SELECT * FROM ListSegments WHERE IncludeTransactional = true SELECT * FROM ListSegments WHERE IncludeUnsubscribed = true SELECT * FROM ListSegments WHERE UpdatedAt = '2024-02-07 00:00:37.0' SELECT * FROM ListSegments WHERE UpdatedAt >= '2024-02-07 00:00:37.0' SELECT * FROM ListSegments WHERE UpdatedAt <= '2024-02-07 00:00:37.0' SELECT * FROM ListSegments WHERE UpdatedAt > '2024-02-07 00:00:37.0' SELECT * FROM ListSegments WHERE UpdatedAt < '2024-02-07 00:00:37.0'
Insert
The Name and ListID are required for INSERTs.
INSERT INTO ListSegments (Name, ListID) VALUES ('myNewListSegment', 'myListID')
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
The unique identifier of the segment within the audience. |
| Name | String | False |
The display name assigned to the segment, used for identifying it in the Mailchimp audience dashboard. |
| MemberCount | Integer | True |
The number of active subscribers currently included in this segment. |
| Type | String | True |
The type of segment, which can be 'saved' (predefined), 'static' (manually defined), or 'fuzzy' (rule-based or dynamic). |
| CreatedAt | Datetime | True |
The date and time when the segment was originally created. |
| UpdatedAt | Datetime | True |
The date and time when the segment was last modified. |
| Options_Match | String | False |
Specifies how conditions are matched when building the segment: 'any' to include subscribers meeting at least one condition, or 'all' to include only those meeting every condition. |
| Options_Conditions | String | False |
A JSON array describing the individual conditions that define which subscribers belong to the segment, such as tags, activity, or custom fields. |
| ListId [KEY] | String | False |
The unique identifier of the Mailchimp audience (list) that this segment belongs to. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| EmailList | String |
A comma-separated list of subscriber email addresses to include when filtering results for this segment. |
| IncludeCleaned | Boolean |
If the value is 'true', cleaned (bounced) contacts are included in the response. It is valid only for SELECT operations. |
| IncludeTransactional | Boolean |
If the value is 'true', transactional contacts (such as one-time buyers) are included in the response. It is valid only for SELECT operations. |
| IncludeUnsubscribed | Boolean |
If the value is 'true', unsubscribed contacts are included in the response. It is valid only for SELECT operations. |