84 Social Media Services, Version 3.0

This chapter provides the information necessary to send messages contained in version 3.0 of the Social Media 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/v3_0/SocialMediaServices?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 3.0 of the Social Media Services API.

addOrUpdateCustomerProfile

string addOrUpdateCustomerProfile(     CustomerProfileRequestType customerSocialProfile,     string securityUserId,     string updateUserId)     throws RelateProcessingException
Variable Required? Description

customerSocialProfile

[required]

Social profile for the customer.

securityUserId

[required]

ID of the Customer Engagement user performing the action.

updateUserId

[optional]

ID of the POS user performing the action.

The addOrUpdateCustomerProfile method adds a new social profile for a customer, or updates an existing social profile.

This method returns a string element.

Note:

The securityUserId provided within this message must be assigned the proper Security Group permission for this operation to be performed successfully.

addOrUpdateRetailerProfile

string addOrUpdateRetailerProfile(       RetailerProfileRequestType retailerSocialProfile,       string userId)     throws RelateProcessingException
Variable Required? Description

retailerSocialProfile

[required]

The retailer’s social profile.

userId

[required]

ID of the Customer Engagement user performing the action.

The addOrUpdateRetailerProfile method adds a new social profile for the retailer, or updates an existing social profile.

This method returns a string element.

registerSocialMediaApplication

string registerSocialMediaApplication(                 SocialMediaRequestType socialMedia,                 string userId)     throws RelateProcessingException
Variable Required? Description

socialMedia

[required

Social media application to register.

userId

[required]

ID of the user registering the application.

The registerSocialMediaApplication method adds, updates, or deletes the retailer's social media application registration.

This method returns a string element.

retrieveCustomerSocialActivity

SocialActivityReturnType retrieveCustomerSocialActivity(CustomerSocialActivityRequestType socialActivitySearch,string securityUserId)     throws RelateProcessingException
Variable Required? Description

socialActivitySearch

[required

Criteria for the social activity search.

securityUserId

[required]

ID of the user performing the action.

The retrieveCustomerSocialActivity method retrieves the social activity that matches specified search criteria.

This method returns a SocialActivityReturnType element.

Note:

The securityUserId provided within this message must be assigned the proper Security Group permission for this operation to be performed successfully.

Classes

This section presents the classes used in Version 3.0 of the Social Media Services API.

AlternateKeyType

See Introduction.

CustomerProfileRequestType

The CustomerProfileRequestType class contains the following elements:

Type Element Description

string

customerID

ID of the customer.

AlternateKeyType[]

alternateKey

Array of alternate keys for the customer.

string

cardNumber

ID number for a card associated with the customer.

string

email

Primary email for the customer.

string

socialMediaType

Type of social media for the social profile.

string

profileName

Name of the customer’s social profile.

string

accessToken

Access token assigned by the social network to the customer’s social profile.

string

accessTokenSecret

Customer’s social profile access token secret.

date

accessTokenExpiredDate

Date on which the access token expires.

The CustomerProfileRequestType class contains the following attribute:

Type Element Description

SocialMediaActionType

action

Action being performed on the customer’s social profile.

CustomerSocialActivityContainerReturnType

The CustomerSocialActivityContainerReturnType class contains the following element:

Type Element Description

SocialActivityType[]

SocialActivity

Array of social activity items.

CustomerSocialActivityRequestType

The CustomerSocialActivityRequestType class contains the following elements:

Type Element Description

string

customerID

ID of the customer.

AlternateKeyType[]

alternateKey

Array of alternate keys for the customer.

string

cardNumber

ID number for a card associated with the customer.

string

email

Primary email for the customer.

string

socialMediaType

Type of social media on which to perform the social activity search.

date

fromDate

Date at which to start searching for social activity.

string

keyword

Keyword set being searched for.

RelateProcessingException

See Introduction.

RetailerProfileRequestType

The RetailerProfileRequestType class contains the following elements:

Type Element Description

string

socialMediaType

Type of social media account.

string

profileName

Name of the retailer’s social profile.

string

accessToken

Access token assigned by the social network to the retailer’s social profile.

string

accessTokenSecret

Retailer's social profile access token secret.

date

accessTokenExpiredDate

Date on which the access token expires.

The RetailerProfileRequestType class contains the following attribute:

Type Element Description

SocialMediaActionType

action

Action being performed on the retailer’s social profile.

SocialActivityReturnType

The SocialActivityReturnType class contains the following elements:

Type Element Description

string

CustomerID

ID of the customer.

CustomerSocialActivityContainerReturnType

SocialActivities

Social activity.

string

SecurityPrivilege

Security privilege for the social activity results.

boolean

MaskData

Indicates whether the social activity results should be masked from the user who performed the request.

SocialActivityType

The SocialActivityType class contains the following elements:

Type Element Description

string

profileName

Name of the social profile.

string

socialMediaType

Type of social media.

string

activityType

Type of social activity.

date

activityDate

Date of the social activity.

string

messageText

Text of the social media post.

SocialMediaRequestType

The SocialMediaRequestType class contains the following elements:

Type Element Description

SocialMediaActionType

socialMediaType

Type of social media.

string

applicationKey

Access key to the application.

string

applicationSecret

Secret ot the application’s access key.

The SocialMediaRequestType class contains the following attribute:

Type Element Description

SocialMediaActionType

action

Action being performed on the social media application.