79 Segment Services, Version 1.0
This chapter provides the information necessary to send messages contained in version 1.0 of the Segment Services API. Information can be obtained using the Web Service Description Language (WSDL) in conjunction with a Simple Object Access Protocol (SOAP), XML Schema, and various methods contained in the classes of the API to provide the web service described above.
The URL for the WSDL is:
https://<servername>:<portNumber>/ws/v1_0/SegmentServices?wsdl
where <servername
> is the name or address of the server. For a cloud installation, the default port number is 443.
The information presented below describes the methods and classes.
The format of the method and any arguments is shown along with an explanation of what the method does and any other information that is necessary to use the method properly. If an argument is shown in dark blue, it is a class and the class name is a link to a description of the class and its attributes.
The class section shows the attributes of the classes along with an explanation of each attribute and when necessary, when they are used.
Note:
Authentication is required. See Introduction for information on creating and implementing an authentication key.
Methods
This section presents the methods used in Version 1.0 of the Segment Services API.
addCustomerToSegment
string[] addCustomerToSegment( string[] customerIds, long segmentId, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[optional] |
Array of customer IDs. |
|
[required] |
ID of the segment. |
The addCustomerToSegment
method adds a customer to an existing segment.
This method returns an array of string elements.
createManualSegment
long createManualSegment( string segmentName, string description, boolean privateFlag, string userId, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[required] |
Name of the segment. |
|
[required] |
Description of the segment. |
|
[required] |
Indicates whether the segment is private ( |
|
[required] |
ID of the user creating the segment. |
The createManualSegment
method creates a new segment that will contain individually selected customers. These customers are added using the addCustomerToSegment method and removed using the removeCustomerFromSegment method.
This method returns a long value.
getCustomersOfSegment
wsPageOfSegmentCustomers getCustomersOfSegment( long segmentId, string[] optionalAssociateIds, int startIndex, int pageSize, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[required] |
ID of the segment. |
|
[optional] |
Array of IDs for associates to whom the customers are assigned. |
|
[required] |
Start index of the customer list. |
|
[required] |
Maximum number of records per page. |
The getCustomersOfSegment
method retrieves a set of customers belonging to a segment, beginning with customer number startIndex
and containing pageSize
customers.
This method returns a wsPageOfSegmentCustomers element.
getMyManualSegments
wsSegmentSummary[] getMyManualSegments( string relateUserId, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[optional] |
ID of user making request. |
The getMyManualSegments
retrieves the manual segments for a user.
This method returns an array of wsSegmentSummary elements.
getSegments
wsSegmentSummary[] getSegments( string relateUserId, boolean ignoreNonListSegments, dateTime optionalNewerThanLastRunDate, segmentViewType optionalSegmentViewType, long optionalSegmentId, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[optional] |
ID of user making request. |
|
[required] |
Indicates whether to only return segments containing a list of customers ( |
|
[optional] |
Indicates whether to only return segments newer than the entered date. |
|
[optional] |
Type of segment ( |
|
[optional] |
ID of segment. |
The getSegments
method returns an array of segments matching the entered search criteria.
This method returns an array of wsSegmentSummary elements.
removeCustomerFromSegment
void removeCustomerFromSegment( string[] customerIds, string segmentId, throws RelateProcessingException
Variable | Required? | Description |
---|---|---|
|
[optional] |
ID of the customer. |
|
[optional] |
ID of the segment. |
The removeCustomerFromSegment
method removes a customer from a manual segment.
This method has no return value.
Classes
This section presents the classes used in Version 1.0 of the Segment Services API.
wsCustTiny
The wsCustTiny
class contains the following elements:
Type | Element | Description |
---|---|---|
string |
associateId |
ID of associate (if any) assigned to the customer. |
string |
custId |
ID of the customer. |
string |
firstName |
Customer first name. |
string |
lastName |
Customer last name. |
wsPageOfSegmentCustomers
The wsPageOfSegmentCustomers
class contains the following elements:
Type | Element | Description |
---|---|---|
customers |
The customers in the page. |
|
boolean |
morePages |
Indicates whether there are more pages in the results. |
long |
pageSize |
Number of customers on the page. |
long |
startIndex |
Sequence number indicating the order of the first customer in the page results. |
wsSegmentSummary
The wsSegmentSummaryWithAttribute
class contains the following elements:
Type | Element | Description |
---|---|---|
string |
createdByUserId |
ID of the user who created the segment. |
long |
custCount |
Number of customers in the segment. |
string |
description |
Description of the segment. |
boolean |
isListSegment |
Indicates whether the segment is a list segment. |
boolean |
isManualSegment |
Indicates whether the segment is a manual segment. |
dateTime |
lastRunDate |
The last time the segment was run. |
string |
name |
Name of the segment. |
long |
segmentId |
ID of the segment. |
segmentQueryType |
Type of query used to create the segment. |
|
segmentViewType |
Type of view used for the segment. |