Skip to Content

I have been part of SAP Cloud HCM Integration team since I joined SAP in 2014. After working on couple of integrations between SAP Successfactors and third party vendors, I started working on Integration Center. I have been part of Integration Center development team since the project started and have seen Integration Center grow from a proof of concept to a Go-To tool for lot of customers and partners for most integration needs of Successfactors. The blog talks about Attachment Import feature of Integration Center and provides a step-by-step guide to solve some of the use cases involving Attachments in Successfactors.

Integration Center

The Integration Center enables HR business analysts to build, run, schedule and monitor simple integrations. Integration Center helps building integrations quickly and easily through a guided workflow.

 

Importing Attachments to SuccessFactors

Introduction

With b1708 release, Integration Center started supporting import of attachments as a Beta feature. There are certain entities in SuccessFactors which hold attachment data. You can use integration center inbound feature to import attachments to such entities.

Pre-requisites

  1. Integration Center is enabled in the SuccessFactors instance
  2. Basic knowledge of how to use Integration Center

Use case 1 (Uploading profile pictures of the users)

There are a set of users created in SuccessFactors system. An admin has photos which need to be uploaded in the system as profile pictures of the users.

Steps

  1. Preparing a CSV file containing master data

    Prepare a CSV file which contains data to be imported. For uploading photos of the users, the file should contain user id of the users and name of the file to be uploaded as profile picture for the user. In the CSV file, the first row is treated as header. Following is a snapshot of sample data:

  2. Uploading files to SFTP server

    The CSV file prepared in Step1 should be uploaded in a folder on SFTP server. Also the corresponding image files should uploaded in the same SFTP folder. For the above sample data, along with the CSV file, cgrant_photo.png, markhoff.jpg and john.png should be uploaded on the SFTP server.

  3. Creating integration with Integration Center

    1. Login to SuccessFactors application and Navigate to Integration Center
    2. Create a new CSV inbound integration with starting entity ==> Photo
    3. Navigate to Configure Fields tab and upload the sample CSV file prepared in Step1
    4. Define mapping between source fields and target fields
      • photoType  <– Default value (1)
        • photo type 1 refers to  master copy of user profile photo
      • userId         <– Column 1 (UserId)
      • photo          <– Column 2 (Photo)
        • This field is of type Edm.Binary. This is the field which holds the file content. While defining mapping, this field should be mapped to name of the image file to be uploaded.
      • photoName <– Column 2 (Photo)
        • This field holds name of the photo file.
  4. Navigate to Source Settings tab and specify SFTP details.
    • Enter server address and credentials and folder location of the SFTP server where the CSV file and photos are uploaded in Step2
    • Enter name of the CSV file (without file extension) in the File Name Prefix field
    • Chose file extension as csv
    • Specify Processing Folder where the files should be moved post-processing
  5. Save the integration and click on Run Now to test the integration
  • Verify the integration

    Once the integration has run you can go to user profiles and verify that the photos are uploaded

 

 

Use Case 2 (Uploading resume and other documents to Job Application)

The admin needs to upload a set of Job Applications in the SuccessFactors system. The job applications have corresponding resumes and cover letters which should also be uploaded in the system.

The steps to implement this use case are similar to the steps explained for previous use case. A CSVfile containing job application data along with file names of resume and cover letters need to be prepared. The CSV file, cover letters and resumes should be uploaded on an SFTP server.

For this use case we need to select Job Application as starting entity and define mappings for cover letter and resume.

Additional details

  1. Deep Write
    • The inbound integration with Integration Center also supports deep writes. So, you can create an integration with Job Application as main entity and define mapping for cover letter, resume and other associations. Because of this feature, single integration can upload Job Applications, upload resumes and cover letters and associate them with corresponding Job Application records.
  2. Defining Mapping
    • Since we are starting with Job Application as main entity, to define mappings for Cover letter and Resume, expand the node with Cover Letter ( or Resume ) and define mapping for fields under it.
        • Cover Letter > fileContent <– CSV column holding name of the cover letter
        • Cover Letter > fileName    <– CSV column holding name of the cover letter
        • Cover Letter > module      <– Default value (RECRUITING )
        • Resume > fileContent       <– CSV column holding name of the resume
        • Resume > fileName          <– CSV column holding name of the resume
        • Resume > module            <– Default value (RECRUITING ) ( Note: Please refer to API documentation for Attachment to find out valid module values.)

Once the mapping is defined, specify the Source Settings, save and test the integration. On running the integration we should be able to see the job application created in the system along with Cover letter and Resume.

Attachments being one of the most important entity in SuccessFactors data model, this Integration Center feature can help simplify lot of Integration use cases around Attachments. The blog provides steps to solve some of those use cases. You can follow similar steps and solve many such integration use cases 🙂

 

References

Integration Center Guide

Attachment API Documentation

Photo API Documentation

Job Application API Documentation

 

To report this post you need to login first.

7 Comments

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

  1. Mohammed Ferozkhan

    Great blog,

    And just thought to add one point for the both integration you need UTF-8 format CSV file.

    In the second point you have mentioned the FILE NAME, can you give reference like what is the source of the file.

    As in the Photo entity we have used SFTP where we can keep the CSV FILE + Photos in folder from which we can extract and run integration.

    If you explain the source of file name in attachment entity that will truly amazing.

    Hope to see the response soon.

    Regards,

    Khan

     

    (0) 
    1. Twinkle Shah Post author

      Thanks for pointing out about the UTF-8 format.

      Regarding source of file name:

      The CSV file needs to have one column which holds name of the file which is to be uploaded for the corresponding record.

      In the Photo example, the integration will look for a file with name cgrant_photo.png in the SFTP folder and upload it as a photo for user cgrant in the BizX. Similarly, file with name markhoff.jpg will be uploaded in the BizX system for user mhoff.

      So, along with uploading files (photos in this case) to the SFTP server, the file names should be added to the CSV file to the corresponding rows.

      Hope this helps.

      Do write back if there are any further queries.

       

      Regards,

      Twinkle

       

      (1) 
      1. Mohammed Ferozkhan

        Hi Twinkle,

        Thanks for the information, am trying to attach one document in custom API. Here are following up the 3 fields that you have said and those fields that are directed in document on attachment api.

        But its still not getting upserted am attaching the mapping screen shot kindly suggest on the same.

        Regards,

        Ferozkhan

         

        (0) 
  2. Siddartha HS

    Great Blog, thanks for sharing this one.

    I have some doubts, What is max size for both import file.

    Is there any limitation for size of the file?

     

    Thanks

    Sid

    (0) 
  3. Christian Czakaj

    Dear community,

    uploading a photo/attachment is also possible via OData API and imho the easiest way compared to sFTP. As a customer using sFTP is not really easy. Most of the companies are able to use/serve webservices and due to this … uploading a photo via OData for SuccessFactors can be achieved via:

    1. RBP access to: Admin access to OData and e.g. Employee data for editing the profile picture
    2. Determine your OData Endpoint: https://apps.support.sap.com/sap/support/knowledge/public/en/2215682
      E.g. in DC12 this would be: https://api12preview.sapsf.eu/odata/v2/upsert?$format=json
    3. Encode photo into base65-string (e.g. via ABAP or other tools)
    4. Send a POST (incl. three headers: authorization / accept json / content-type json)
      Raw Request for updating two profile pictures:

      [
      { 
       "__metadata": {
                     "uri": "Photo(photoType=1,userId='00001234')",
                     "type": "SFOData.Photo"
      },
                     "photoType" : 1,
                     "userId": "00001234",
                     "photoName" : null,
                     "photo": "BASE64_ENCODING_STRING" 
      },
      { 
       "__metadata": {
                     "uri": "Photo(photoType=1,userId='00001244')",
                     "type": "SFOData.Photo"
      },
                     "photoType" : 1,
                     "userId": "00001244",
                     "photoName" : null,
                     "photo": "BASE64_ENCODING_STRING" 
      }
      ]​

     

    Best regards,

    Chris

    (1) 
    1. Mohammed Ferozkhan

      Hi Chris,

       

      I have used this method for Bio Metric integration’s, here the requirement that am looking as uploading the documents that generated from a 3rd party payroll system and downloaded into SFTP server.

      From there it have to get uploaded to a custom portlet, where there is field with data type as ATTACHMENT.

      After that End User are able to look into the attached PDF’s and will download if needed.

      Here converting the the doc and then updating the service is bit lengthy process.

      if you can check and suggest of ATTACHMENT entity that will be great help.

      Appreciate your help, looking forward for your reply.

      Regards,

      Feroz khan

      (0) 

Leave a Reply