| Description | Query Social Media User Profile |
| Name | RequestForSocialMediaUserProfileIn |
| Namespace | http://sap.com/xi/A1S/Global |
| Process Component Description | Business Partner Data Management |
| Process Component Name | BusinessPartnerDataManagement |
| Process Component Namespace | http://sap.com/xi/AP/FO/BusinessPartner/Global |
| Deploymnent Unit Description | Foundation |
| Endpoint Activation | By Scoping of Process Component | Operations |
| Release Status | Deprecated |
An interface to query social media user profiles created based on messages originating in an external social media provider
The web service interface Request For Social Media User Profile In is used by external systems to query user profiles acquired from social media sites like Facebook and Twitter.
This web service interface includes the following operation: Find By Elements.
This web service is synchronous and mass enabled. Requesting large amounts of data can cause communication timeout. The web service consumer is responsible for ensuring requests are of a reasonable size for mass operations.
The structure of the request message consists of the following:
Selection Parameters
Process Conditions
Requested Elements
The following selection parameters of the web service are mainly exposed as select options or ranges:
Inclusion/exclusion code
Interval boundary type code
Lower boundary value
Upper boundary value
InclusionExclusionCode
The inclusion/exclusion code specifies the inclusion or exclusion of a set into a result set.
| Code | Description |
|---|---|
| E | Excluding |
| I | Including |
IntervalBoundaryTypeCode
The interval boundary type code is used to describe intervals by their boundaries. Depending on the operator, the lower boundary value or both boundary values are relevant.
| Code | Name | Description | Values |
|---|---|---|---|
| 1 | Equal to | Single value | = X |
| 2 | Between (excluding upper boundary) | Interval with closed lower and open upper boundary | [X, Y) |
| 3 | Between | Interval with open lower and open upper boundary | (X, Y) |
| 4 | Between (excluding both boundaries) | Interval with open lower and open upper boundary | (X, Y) |
| 5 | Between (excluding lower boundary) | Interval with open lower and closed upper boundary | (X, Y] |
| 6 | Less than | Interval with unlimited lower and open upper boundary | < X |
| 7 | Less than or equal to | Interval with unlimited lower and closed upper boundary | <= X |
| 8 | Greater than | Interval with open lower and unlimited upper boundary | > X |
| 9 | Greater than or equal to | Interval with closed lower and unlimited upper boundary | >= X |
The processing conditions specify how to process the web service query, specifically, the maximum number of hits to be returned.
This web service supports the following process condition elements for request messages:
| Element | Description |
|---|---|
| QueryHitsMaximumNumberValue | Maximum number of hits to be returned by an inquiry |
| QueryHitsUnlimitedIndicator | Indicates that the maximum number of hits to be returned by an inquiry is unlimited |
| LastReturnedObjectID | Identifies the last object returned by a previous inquiry |
| If QueryHitsUnlimitedIndicator = true, then QueryHitsMaximumNumberValue must not be filled. |
Requested elements enable the web service consumer, an external system, to reduce the size of query response messages and thereby reduce transmission and response times and avoid timeouts.
Requested elements can contain optional transmission request codes for controlling the transmission of corresponding query response node elements.
The transmission request codes are modeled as .xml attributes following the syntax: <element name>TransmissionRequestCode.
The prefix <element name> is equivalent to the name of the node element in the response message to which the transmission request code applies.
| Transmission Request Code | Name | Description |
|---|---|---|
| 1 | Complete Structure | The node element and all its elements, its child node elements and all their elements will be returned |
| 2 | Complete Node | The node element and all its elements will be returned |
| 3 | Node with Key Elements | The node element and its key elements will be returned (not supported by all web service interfaces) |
| 4 | Excluded Node | The node element and its child node elements will not be returned |
As the transmission request code is optional, if no transmission request code is modeled or provided by the web service consumer, then the following rules apply:
If no transmission request code is provided at all, then the response message contains all data.
If the transmission request code of the parent node element is 1, then the child node elements for which no transmission request codes are specified are defaulted to 1 as well.
If the transmission request code of the parent node element is 2 or 3, then its child node elements for which no transmission request codes are specified are defaulted to 4.
If the transmission request code of the parent node element is 4, then its child node elements are not returned anyway.
The structure of the query response message consists of three parts:
A business document-specific part containing the returned business documents
Processing conditions
Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request
Process Conditions
This web service contains the following process condition elements for response messages:
| Element | Description |
|---|---|
| ReturnedQueryHitsNumberValue | The number of hits returned by an inquiry |
| MoreHitsAvailableIndicator | Indicates that there are more than ReturnedQueryHitsNumberValue hits matching the selection criteria |
| LastReturnedObjectID | Identifies the last object returned by this inquiry |
| Processing conditions can be used for pagination of query results. However, it is crucial not to change the query selection parameters from request to request, as otherwise the query result might change. |
You can find general information about Web services, their structure and consumption in the Web Services documentation.
This web service can be used to achieve chat as channel for customer support.
Example of a Chat Scenario
During the chat session, an agent can look up the customer’s social media profile information.
The following request message can be used:
<n0:SocialMediaUserProfileRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <SocialMediaUserProfileSelectionByElements> <SelectionBySocialMediaUserProfileID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundarySocialMediaUserProfileID >66</LowerBoundarySocialMediaUserProfileID> </SelectionBySocialMediaUserProfileID> </SocialMediaUserProfileSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>98</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions> <RequestedElements SocialMediaUserProfileTransmissionRequestCode="1"> <SocialMediaUserProfile UserInfoTransmissionRequestCode="1"/> </RequestedElements> </n0:SocialMediaUserProfileRequest_sync>
The following is the response message:
<nm:SocialMediaUserProfileResponse_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:AN4:/1SAI/TAECA6BC83B6F7B3EE226AD:804"> <SocialMediaUserProfile> <ID>66</ID> <UUID>00000000-0001-1ee1-9d88-6ed4385ec497</UUID> <SocialMediaUserCategoryCode>01</SocialMediaUserCategoryCode> <UserInformation> <SocialMediaUserAccountID>100003139629010</SocialMediaUserAccountID> <SocialMediaChannelCode>001</SocialMediaChannelCode> <FamilyName>User</FamilyName> <GivenName>Facebook</GivenName> <SocialMediaUserImageURI>https://graph.facebook.com/100003139629010/picture</SocialMediaUserImageURI> </UserInformation> <CustomerID>1000371</CustomerID> <CustomerName>User</CustomerName> </SocialMediaUserProfile> <ProcessingConditions> <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator> <LastReturnedObjectID>0000000000011EE19D886ED4385EC497</LastReturnedObjectID> </ProcessingConditions> <Log/> </nm:SocialMediaUserProfileResponse_sync>
| Description | Find social media user profiles |
| Name | FindByElements |
| Synchronous | yes |
| Release Status | Deprecated |
To find customer social media profile data by element.
The operation Find By Elements processes the requests from external systems and returns the social media profiles matching the given query criteria.
It includes the following nodes:
The request message of the operation contains the node, SocialMediaUserProfileSelectionByElements, which groups all possible selection parameters.
Social Media User Profile Selection By Elements
| Selection Parameter | Description |
|---|---|
| SelectionBySocialMediaUserProfileID | Selection by social media user profile ID |
| SelectionBySocialMediaUserProfileName | Selection by social media user screen name (a user's screen name may be different for each social media Web site they use) |
| SelectionBySocialMediaUserProfileLastName | Selection by social media user last name (surname) |
| SelectionBySocialMediaUserProfileGivenName | Selection by social media user first (given) name |
| SelectionBySocialMediaUserProfileEmailURI | Selection by the uniform resource identifier for a social media user account in an electronic mail system |
| SelectionByCustomerPartyIdentifierTypeCode | Selection by customer party ID type code (exmple: Code Value = 001; Description = Employee ID) |
| SelectionByCustomerBusinessPartnerId | Selection by customer business partner ID |
The response contains the list of found social media users, log items and processing conditions.
Social Media User Profile
This node contains all found social media users, including their account data according to the RequestedElements provided in the query request.
This node contains the following elements and one child node, User Information (described below).
| Element Name | Description |
|---|---|
| ID | Social media user profile ID |
| UUID | Universally unique identifier of the social media user profile |
| SocialMediaUserCategoryCode | A coded representation of the category of social media user |
| Category Code List: 01 = Standard User; 02 = Page | |
| InteractionContentParticipantSentimentTypeCode | A coded representation of the sentiment of the message creator |
| Sentiment Type Codes: 01 = Strong Positive; 02 = Weak Positive; 03 = Neutral; 04 = Weak Negative; 05 = Strong Negative | |
| ExternalImportanceScoreNumberValue | A value that is the external number value assigned to a social media user based on the user's social influence, that is, the number of friends or followers the user has |
| AggregratedImportanceScoreNumberValue | A value that is the aggregated score of the external importance score of a social media user and the internal importance score of the customer related to that social media user |
| UserInformation | Social media user information derived from a specific social media channel (like Facebook or Twitter) |
| ChangeStateID | An identifier for a change state |
| The change state identifier is provided when calling a modifying operation. The system does not perform the operation if the state of the business object instance in the database has changed since the change state identifier was computed. By specifying the change state identifier, the client is enabled to implement optimisic locking. | |
| ObjectNodeSenderTechnicalID | A technical node identifier of an object or object node |
| These elements allow the service consumer to relate elements in the confirmation with the originating parts. In addition, they allow the service consumer to relate log messages with the originating parts in the client application. | |
| ContactPartyID | Identifier of contact party |
| ContactPartyName | Name of contact party |
| CustomerID | Identifier of a customer |
| CustomerName | Name of a customer |
User Information
This node contains the following elements:
| Element Name | Description |
|---|---|
| SocialMediaUserAccountID | An identifier for a social media user's system account; typically a generated numeric value |
| GenderCode | A coded representation of the gender of a social media user |
| Gender Code List: 0 = Gender not known; 1 = Male; 2 = Female | |
| SocialMediaChannelCode | A coded representation of a social media channel |
| Channel Code List: 001 = Facebook; 002 = Twitter | |
| FamilyName | The last name (surname) of the social media user |
| GivenName | The first (given) name of a social media user |
| EmailURI | The uniform resource identifier for an account in an electronic mail system |
| SocialMediaUserName | The screen name of the social media user (a user's screen name may be different for each social media Web site they use) |
| SocialMediaUserImageURI | unique digital address, represented by the unified resource identifier, where a social media user's image can be accessed |
| objectNodeSenderTechnicalID | A technical node identifier of an object or object node |
Show full documentation