Update.Person.ProfilePicture
This method will create person profile picture.
Action
This type of message will create person profile picture from specified temp file. (Temp file can be created by FileService)
A UserId or UserSyncKey needs to be specified for which person profile picture is created.
Input Parameters
Name | Description | Type | M/O |
|---|---|---|---|
Message Type | Type of Message | Text. "Update.Person.ProfilePicture" | M |
SiteId | Site where action will be executed | Int | O |
VendorId | VendorId which will be associated with created content | Text | O |
UserID | UserID of the creator. | Integer | O/M |
UserSyncKey | User SyncKeyID of the creator. | Text | O/M |
FileId | Temp file Id | Text | M |
Notes:
Scenario
In order to create a person profile pictures, a user needs to add a message with type corresponding to action Update.Person.ProfilePicture.
Result of that message processing can be acquired using GetMessageResult method with message identifier as an input parameter.
Schema
<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:message-schema" elementFormDefault="qualified" targetNamespace="urn:message-schema"> <xs:element name="Message" type="MessageType" /> <xs:complexType name="MessageType"> <xs:sequence> <xs:element name="SiteId" minOccurs="0" maxOccurs="1" type="xs:int" /> <xs:element name="VendorId" minOccurs="0" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="36"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="ProfilePictures" type="ProfilePicturesType" minOccurs="1" maxOccurs="1" /> </xs:sequence> </xs:complexType> <xs:complexType name="ProfilePicturesType"> <xs:sequence> <xs:element name="ProfilePicture" type="ProfilePictureType" minOccurs="1" maxOccurs="100"/> </xs:sequence> </xs:complexType> <xs:complexType name="ProfilePictureType"> <xs:sequence> <xs:choice minOccurs="1" maxOccurs="1"> <xs:element name="UserId" type="xs:integer" /> <xs:element name="UserSyncKey" type="xs:string" /> </xs:choice> <xs:element name="FileId" minOccurs="1" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="36"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType></xs:schema>Message content example
<Message xmlns="urn:message-schema"> <ProfilePictures> <ProfilePicture> <UserId>UserId1</UserId> <FileId>FileGuid1</FileId> </ProfilePicture> <ProfilePicture> <UserId>UserId2</UserId> <FileId>FileGuid2</FileId> </ProfilePicture> </ProfilePictures></Message>Validation Rules
Before message is processed the MigrationProcessor will validate the message content and state of objects referred in it. These are validation rules:
- Input matches the schema below.
- User must exist.
- User must not be external. Check the flag (external_user_id and external_customer_id for user created AICC).
- User must not be deleted.
- Specified file should be valid image.
- Uploaded image should be at least 192x192px.
- User with specified UserId/UserSyncKey is not valid.
- User with specified UserId/UserSyncKey is external.
- User with specified UserId/UserSyncKey is deleted.
- File not found ({fileId})
- Person not found ({userId/userSyncKey})
- File does not have a valid image format ({fileId})
- Image is too small ({fileId}) (should be at least 192x192px)