Newer Version Available

This content describes an older version of this product. View Latest

CdpSegment Class

Create, delete, get, publish, and update Data Cloud segments. Get segment members.

Namespace

ConnectApi

CdpSegment Methods

These methods are for CdpSegment. All methods are static.

createSegment(input)

Create a segment.

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

Type: ConnectApi.CdpSegmentOutput

createSegment(input, dataspace)

Create a segment in a 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

Type: ConnectApi.CdpSegmentOutput

deactivateSegmentByApiName(segmentApiName)

Deactivate a segment by API name.

API Version

59.0

Requires Chatter

No

Signature

public static ConnectApi.CdpSegmentActionOutput deactivateSegmentByApiName(String segmentApiName)

Parameters

segmentApiName
Type: String
API name of the segment.

deactivateSegmentById(segmentId)

Deactivate a segment by ID.

API Version

59.0

Requires Chatter

No

Signature

public static ConnectApi.CdpSegmentActionOutput deactivateSegmentById(String segmentId)

Parameters

segmentId
Type: String
ID of the segment.

deleteSegment(segmentApiName)

Delete a segment.

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)

Publish a segment.

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.

getSegment(segmentApiName)

Get a segment.

API Version

56.0

Requires Chatter

No

Signature

public static ConnectApi.CdpSegmentContainerOutput getSegment(String segmentApiName)

Parameters

segmentApiName
Type: String
API name of the segment.

getSegmentMembers(limit, offset, orderBy, segmentApiName, filters, fields)

Get segment members.

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 11000. 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.

getSegments()

Get segments.

API Version

55.0

Requires Chatter

No

Signature

public static ConnectApi.CdpSegmentContainerOutput getSegments()

getSegmentsPaginated(batchSize, offset, orderBy)

Get an ordered batch of segments.

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.

getSegmentsPaginated(batchSize, offset, orderBy, dataspace)

Get paginated segments in a 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.

updateSegment(segmentApiName, input)

Update a segment.

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.

Return Value

Type: ConnectApi.CdpSegmentOutput