ListSegments
Returns a list of available segments for a list.
Table-Specific Information
SELECT, INSERT, UPDATE, and DELETE are supported for ListSegments.
Select
The provider uses the Mailchimp API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| Id | = |
| Type | = |
| ListId | = |
| IncludeCleaned | = |
| IncludeUnsubscribed | = |
| IncludeTransactional | = |
| CreatedAt | =, <, >, <=, >= |
| UpdatedAt | =, <, >, <=, >= |
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 columns are required for INSERT operations.
INSERT INTO ListSegments (Name, ListId) VALUES ('myNewListSegment', 'myListId')
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The unique identifier for the segment. | |
| Name | String | False |
The name of the segment. | |
| MemberCount | Integer | True |
The number of active subscribers currently included in the segment. | |
| Type | String | True |
The type of segment: saved, static, or fuzzy. The allowed values are saved, static, fuzzy. | |
| CreatedAt | Datetime | True |
The time and date the segment was created. | |
| UpdatedAt | Datetime | True |
The time and date the segment was last updated. | |
| Options_Match | String | False |
The match type for segment conditions, either 'any' or 'all'. The allowed values are any, all. | |
| Options_Conditions | String | False |
An array of segment conditions. | |
| ListId [KEY] | String | False |
Lists.Id |
The Id of the list. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| EmailList | String |
A comma-separated list of email addresses to include in this list segment. |
| IncludeCleaned | Boolean |
Indicates whether to include cleaned members in the response. Valid only for SELECT. |
| IncludeTransactional | Boolean |
Indicates whether to include transactional members in the response. Valid only for SELECT. |
| IncludeUnsubscribed | Boolean |
Indicates whether to include unsubscribed members in the response. Valid only for SELECT. |