Newer Version Available
CdpSegment Class
Namespace
CdpSegment Methods
createSegment(input)
API Version
55.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentOutput createSegment(ConnectApi.CdpSegmentInput input)
Parameters
- input
- Type: ConnectApi.CdpSegmentInput
- A ConnectApi.CdpSegmentInput class.
Return Value
createSegment(input, dataspace)
API Version
58.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentOutput createSegment(ConnectApi.CdpSegmentInput input, String dataspace)
Parameters
- input
- Type: ConnectApi.CdpSegmentInput
- A ConnectApi.CdpSegmentInput class.
- dataspace
- Type: String
- Name of the dataspace in which to perform the action. User must have permission to this dataspace. Optional when bulk-listing segments. If unspecified, default is the default dataspace.
Return Value
deactivateSegmentByApiName(segmentApiName)
API Version
59.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentActionOutput deactivateSegmentByApiName(String segmentApiName)
Parameters
- segmentApiName
- Type: String
- API name of the segment.
Return Value
deactivateSegmentById(segmentId)
API Version
59.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentActionOutput deactivateSegmentById(String segmentId)
Parameters
- segmentId
- Type: String
- ID of the segment.
Return Value
deleteSegment(segmentApiName)
API Version
56.0
Requires Chatter
No
Signature
public static Void deleteSegment(String segmentApiName)
Parameters
- segmentApiName
- Type: String
- API name of the segment.
Return Value
Type: Void
executePublishAdhoc(segmentId)
API Version
56.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentActionOutput executePublishAdhoc(String segmentId)
Parameters
- segmentId
- Type: String
- ID of the segment to publish.
Return Value
getSegment(segmentApiName)
API Version
56.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegment(String segmentApiName)
Parameters
- segmentApiName
- Type: String
- API name of the segment.
Return Value
getSegmentMembers(limit, offset, orderBy, segmentApiName, filters, fields)
API Version
58.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentMemberOutput getSegmentMembers(Integer limit, Integer offset, String orderBy, String segmentApiName, String filters, List<String> fields)
Parameters
- limit
- Type: Integer
- Maximum number of rows to return from 1–1000. If unspecified, the default number of rows is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderBy
- Type: String
- Sort order for the result set, such as Name ASC or MarketSegmentType DESC. If unspecified, items are returned by ID in ascending order.
- segmentApiName
- Type: String
- API name of the segment.
- filters
- Type: String
- Filter the result set to a more narrow scope or specific type, such as [Delta_Type__C in('new') AND timestamp__C > '2023-04-02'].
- fields
- Type: List<String>
- Comma-separated list of up to 50 field names that you want to include in the result, for example, Id__c, Delta_Type__C. If unspecified, Id__c is returned.
Return Value
getSegments()
API Version
55.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegments()
Return Value
getSegmentsPaginated(batchSize, offset, orderBy)
API Version
56.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegmentsPaginated(Integer batchSize, Integer offset, String orderBy)
Parameters
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–200. If unspecified, the default value is 20.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderBy
- Type: String
- Sort order for the result set, such as Name ASC or MarketSegmentType DESC. If unspecified, items are returned by ID in ascending order.
Return Value
getSegmentsPaginated(batchSize, offset, orderBy, dataspace)
API Version
58.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegmentsPaginated(Integer batchSize, Integer offset, String orderBy, String dataspace)
Parameters
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–200. If unspecified, the default value is 20.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderBy
- Type: String
- Sort order for the result set, such as Name ASC or MarketSegmentType DESC. If unspecified, items are returned by ID in ascending order.
- dataspace
- Type: String
- Name of the dataspace in which to perform the action. User must have permission to this dataspace. Optional when bulk-listing segments. If unspecified, default is the default dataspace.
Return Value
updateSegment(segmentApiName, input)
API Version
56.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentOutput updateSegment(String segmentApiName, ConnectApi.CdpSegmentInput input)
Parameters
- segmentApiName
- Type: String
- API name of the segment.
- input
- Type: ConnectApi.CdpSegmentInput
- A ConnectApi.CdpSegmentInput class with the updates.