Skip to Content

Introduction

It’s a common requirement to migrate employee photos from either legacy systems or SAP HCM to a SuccessFactors system. There are a couple ways to do it—bulk photo upload through a SF SFTP server or using the OData API.

The first option is the most common approach. You just prepare the employee photos in the JPEG format along with a CSV file that maps between SF username and photo file name. More details can be found in the note 2094242 – Photos: How to Upload and Edit Live Profile Photos.

And if you want to retrieve those employee photos back to the JPG files. You can also get it done by using Integration Center with the attachment option.

Anyway, assuming if you have another requirement to not only export employee photos, but also to construct a CSV file linking between employee ID and employee photo file, or generate more complex file name ouput. Then you have to find another option.

The integration tool that I can think of is SAP Cloud Integration. Because I think it’s quite simple with no coding required where I use the SCI to retrieve employee photo from SF (in the base64 format) and then convert it into a file with JPG format (and anything else…).

Prerequisites

  • Basic knowledge of SAP Cloud Integration (SCI) & SuccessFactors (SF)
  • Access to the SCI, SF, and SF SFTP instances

Configurations

(1) Retrieve Employee Photo from SuccessFactors using OData API

The Photo entity is used for retrieving employee photos. The following example I specify the user ID and photo type – 1 (Live Profile picture) for testing purpose.

Additional parameters can be found in the SAP SuccessFactors HCM Suite OData API: Reference Guide document.

The actual XML data you will get from this step will look like this. The photo field value contains the employee photo data in the Base64 format.


(2) Get Employee Photo data in Base64

Now I use Content Modifier to get user ID and photo in the message header.

Name: userId
Type: XPath
Data Type: java.lang.String
Value: /Photo/Photo/userId

Name: empPhoto
Type: XPath
Data Type: java.lang.String
Value: /Photo/Photo/photo

Then I only set photo data back to the subsequent step (because we don’t want the whole XML data, do we?) in the message body.


(3) Base64 Decoder

Basically this step is to convert the base64 data into binary data. There’s no parameter required in this step.


(4) Transfer employee photo file to SFTP server

The output file name is dynamically created based on the user ID we get from the earlier step.

Output Result

Conclusion

I believe there are many ways to mass export employee photos from a SuccessFactors system. But I hope my blog is helpful in one way or another.

 

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply