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. The user must have permission to the specified dataspace. Specify default to use 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
getSegmentById(segmentId)
API Version
65.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegmentById(String segmentId)
Parameters
- segmentId
- Type: String
- ID of the segment.
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 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.
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 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.
Return Value
getSegmentsFilteredPaginated(batchSize, offset, orderBy, filters)
API Version
65.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegmentsFilteredPaginated(Integer batchSize, Integer offset, String orderBy, String filters)
Parameters
- 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
Return Value
getSegmentsFilteredPaginated(batchSize, offset, orderBy, dataspace, filters)
API Version
65.0
Requires Chatter
No
Signature
public static ConnectApi.CdpSegmentContainerOutput getSegmentsFilteredPaginated(Integer batchSize, Integer offset, String orderBy, String dataspace, String filters)
Parameters
- 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
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.