CdpSegment Class

Create, delete, get, publish, and update Data 360 segments.

ConnectApi

These methods are for CdpSegment. All methods are static.

Create a segment.

55.0

No

public static ConnectApi.CdpSegmentOutput createSegment(ConnectApi.CdpSegmentInput input)

input

Type: ConnectApi.CdpSegmentInput

A ConnectApi.CdpSegmentInput class.

Type: ConnectApi.CdpSegmentOutput

Create a segment in a dataspace.

58.0

No

public static ConnectApi.CdpSegmentOutput createSegment(ConnectApi.CdpSegmentInput input, String dataspace)

input

Type: ConnectApi.CdpSegmentInput

A ConnectApi.CdpSegmentInput class.

dataspace

Type: String

Name of the dataspace in which to perform the action. The user must have permission to the specified dataspace. Specify default to use the default dataspace.

Type: ConnectApi.CdpSegmentOutput

Deactivate a segment by API name.

59.0

No

public static ConnectApi.CdpSegmentActionOutput deactivateSegmentByApiName(String segmentApiName)

segmentApiName

Type: String

API name of the segment.

Type: ConnectApi.CdpSegmentActionOutput

Deactivate a segment by ID.

59.0

No

public static ConnectApi.CdpSegmentActionOutput deactivateSegmentById(String segmentId)

segmentId

Type: String

ID of the segment.

Type: ConnectApi.CdpSegmentActionOutput

Delete a segment.

56.0

No

public static Void deleteSegment(String segmentApiName)

segmentApiName

Type: String

API name of the segment.

Type: Void

Publish a segment.

56.0

No

public static ConnectApi.CdpSegmentActionOutput executePublishAdhoc(String segmentId)

segmentId

Type: String

ID of the segment to publish.

Type: ConnectApi.CdpSegmentActionOutput

Get a segment by API name.

56.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegment(String segmentApiName)

segmentApiName

Type: String

API name of the segment.

Type: ConnectApi.CdpSegmentContainerOutput

Get a segment by ID.

65.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegmentById(String segmentId)

segmentId

Type: String

ID of the segment.

Type: ConnectApi.CdpSegmentContainerOutput

Get segments.

55.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegments()

Type: ConnectApi.CdpSegmentContainerOutput

Get an ordered batch of paginated segments.

56.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegmentsPaginated(Integer batchSize, Integer offset, String orderBy)

batchSize

Type: Integer

Number of segments to return at one time. Values are from 1 through 200. For example, specify 20 to return 20 segments.

offset

Type: Integer

Number of segments to skip before returning results. Specify 0 to skip no segments.

orderBy

Type: String

Sort order for the result set. Specify a field value followed by an optional sort order, ASC or DESC. For example, Name ASC sorts results by Name in ascending order, and MarketSegmentType DESC sorts results by MarketSegmentType in descending order. Omit ASC and DESC to return results in ascending order by default.

Type: ConnectApi.CdpSegmentContainerOutput

Get an ordered batch of paginated segments in a dataspace.

58.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegmentsPaginated(Integer batchSize, Integer offset, String orderBy, String dataspace)

batchSize

Type: Integer

Number of segments to return at one time. Values are from 1 through 200. For example, specify 20 to return 20 segments.

offset

Type: Integer

Number of segments to skip before returning results. Specify 0 to skip no segments.

orderBy

Type: String

Sort order for the result set. Specify a field value followed by an optional sort order, ASC or DESC. For example, Name ASC sorts results by Name in ascending order, and MarketSegmentType DESC sorts results by MarketSegmentType in descending order. Omit ASC and DESC to return results in ascending order by default.

dataspace

Type: String

Name of the dataspace in which to perform the action. The user must have permission to the specified dataspace. Specify default to use the default dataspace.

Type: ConnectApi.CdpSegmentContainerOutput

Get an ordered and filtered batch of paginated segments.

65.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegmentsFilteredPaginated(Integer batchSize, Integer offset, String orderBy, String filters)

batchSize

Type: Integer

Number of segments to return at one time. Values are from 1 through 200. For example, specify 20 to return 20 segments.

offset

Type: Integer

Number of segments to skip before returning results. Specify 0 to skip no segments.

orderBy

Type: String

Sort order for the result set. Specify a field value followed by an optional sort order, ASC or DESC. For example, Name ASC sorts results by Name in ascending order, and MarketSegmentType DESC sorts results by MarketSegmentType in descending order. Omit ASC and DESC to return results in ascending order by default.

filters

Type: String

Filter the result set to a more narrow scope based on segment attributes. Specify a maximum of 10 filters. Separate each filter by an AND logical operator.

These values are supported:

  • LastPublishedEndDateTime - Not present in the output type. Indicates the end date and time when the segment was last published. Use only the != operator with this value.
  • MarketSegmentType - Matches field segmentType.
  • Name - Matches field disaplyName.
  • SegmentOn - Matches field segmentOnApiName.
  • SegmentStatus - Matches field segmentStatus.

These operators are supported:

  • contains - Search operator for identifying strings or substrings within a field.
  • eq - Equality operator for identifying values that match exactly.
  • in - Comparison operator for determining whether a field matches one or more specified values.
  • != - Inequality operator for determining values that don’t match.

These are examples of filter parameter specifications:

  • Name != NULL AND Name In Seg 01,seg 02 AND Name contains seg AND Name eq seg 01
  • SegmentStatus != NULL AND SegmentStatus In Processing,Active AND SegmentStatus contains ive AND SegmentStatus eq active
  • MarketSegmentType != NULL AND MarketSegmentType In UI,Dbt AND MarketSegmentType contains i AND MarketSegmentType eq UI
  • SegmentOn != NULL AND SegmentOn In individual,account AND SegmentOn contains ual AND SegmentOn eq Account
  • SegmentOn != NULL AND SegmentOn In individual,account AND SegmentOn contains nt AND SegmentOn eq Account
  • LastPublishedEndDateTime != NULL

Type: ConnectApi.CdpSegmentContainerOutput

Get an ordered and filtered batch of paginated segments in a dataspace.

65.0

No

public static ConnectApi.CdpSegmentContainerOutput getSegmentsFilteredPaginated(Integer batchSize, Integer offset, String orderBy, String dataspace, String filters)

batchSize

Type: Integer

Number of segments to return at one time. Values are from 1 through 200. For example, specify 20 to return 20 segments.

offset

Type: Integer

Number of segments to skip before returning results. Specify 0 to skip no segments.

orderBy

Type: String

Sort order for the result set. Specify a field value followed by an optional sort order, ASC or DESC. For example, Name ASC sorts results by Name in ascending order, and MarketSegmentType DESC sorts results by MarketSegmentType in descending order. Omit ASC and DESC to return results in ascending order by default.

dataspace

Type: String

Name of the dataspace in which to perform the action. The user must have permission to the specified dataspace. Specify default to use the default dataspace.

filters

Type: String

Filter the result set to a more narrow scope based on segment attributes. Specify a maximum of 10 filters. Separate each filter by an AND logical operator.

These values are supported:

  • LastPublishedEndDateTime - Not present in the output type. Indicates the end date and time when the segment was last published. Use only the != operator with this value.
  • MarketSegmentType - Matches field segmentType.
  • Name - Matches field disaplyName.
  • SegmentOn - Matches field segmentOnApiName.
  • SegmentStatus - Matches field segmentStatus.

These operators are supported:

  • contains - Search operator for identifying strings or substrings within a field.
  • eq - Equality operator for identifying values that match exactly.
  • in - Comparison operator for determining whether a field matches one or more specified values.
  • != - Inequality operator for determining values that don't match.

These are examples of filter parameter specifications:

  • Name != NULL AND Name In Seg 01,seg 02 AND Name contains seg AND Name eq seg 01
  • SegmentStatus != NULL AND SegmentStatus In Processing,Active AND SegmentStatus contains ive AND SegmentStatus eq active
  • MarketSegmentType != NULL AND MarketSegmentType In UI,Dbt AND MarketSegmentType contains i AND MarketSegmentType eq UI
  • SegmentOn != NULL AND SegmentOn In individual,account AND SegmentOn contains ual AND SegmentOn eq Account
  • SegmentOn != NULL AND SegmentOn In individual,account AND SegmentOn contains nt AND SegmentOn eq Account
  • LastPublishedEndDateTime != NULL

Type: ConnectApi.CdpSegmentContainerOutput

Update a segment.

56.0

No

public static ConnectApi.CdpSegmentOutput updateSegment(String segmentApiName, ConnectApi.CdpSegmentInput input)

segmentApiName

Type: String

API name of the segment.

input

Type: ConnectApi.CdpSegmentInput

A ConnectApi.CdpSegmentInput class with the updates.

Type: ConnectApi.CdpSegmentOutput