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:Either UserID or SyncKey must be specified. This means specify at least one is mandatory.


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

Create Course Link 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:

  1. Input matches the schema below.

  2. User must exist.

  3. User must not be external. Check the flag (external_user_id and external_customer_id for user created AICC).

  4. User must not be deleted.

  5. Specified file should be valid image.

  6. Uploaded image should be at least 192x192px.


Error statuses:

  1. User with specified UserId/UserSyncKey is not valid.

  2. User with specified UserId/UserSyncKey is external.

  3. User with specified UserId/UserSyncKey is deleted.

  4. File not found ({fileId})

  5. Person not found ({userId/userSyncKey})

  6. File does not have a valid image format ({fileId})

  7. Image is too small ({fileId}) (should be at least 192x192px)