SuccessFactors Onboarding 1.0 allows one to search for documents, download one document from the search list and upload one document into the Document Center. To be able to download and upload documents in bulk, the system provides a back-end RESTful service that contains APIs that can be used for these processes.
This blog describes how to send documents using REST API calls to the Document Centre in the Onboarding 1.0 system.
The first stage in the process is to authenticate the API method. This method cleans up any previously active session to make it compatible with other authentication/SSO methods implemented in SuccessFactors Onboarding 1.0.
As in the below image, you must use the URL to your Onboarding 1.0 instance with the help of the Account Name, User Name and Password to establish a connection with the system. You may use either the GET operation or the POST operation to achieve this.
sample instance URL: https://onboardingURL/ONBPREM/api.ashx/authenticate?AccountName=ACCOUNT_NAME&UserName=”LOGIN”&Password=”PASSWORD”
Once you hit send, the system will respond with Status: 200 OK. This indicates that your request has successfully reached the system and that your credentials are accurate.
In the Cookies section of your response, the cookie “QASF_ONBPREM” contains the authentication token to set up user context in the browser. You will use this cookie in the process to send documents to the ONB1.0 Document Centre.
2. Uploading Documents
Now that you have successfully authenticated your user and received the authentication token, you can begin pushing documents to the Document Center.
It is important to note that each document has list of index fields. You can pass a search process on these index values from the front end to locate the required document. You must upload the index values for each document you wish to push to the Document Center. You must transfer the .pdf/.docx files along with a .csv file that describes their index values when uploading them into the system. Upload is performed by a separate request for each file.
The URL and the Parameters used for this process are indicated in the below image. The FileCount parameter contains the total number of files you wish to upload (excluding the .csv file containing the index values) and the RequestID parameter contains the randomly generated client request id/Guid.
sample instance URL: https://onboardingURL/ONBPREM/api.ashx/doccenter/upload?FileCount=FILE_COUNT&RequestId=REQUEST_ID
The Headers for this POST operation will include the Content-Type (application/json) and the authentication token (which you will save under Cookie).
Under Body, you must add the document/s you want to upload to the Document Center under form-data (in this case file is Cand_Details.docx). Please note that to upload a document from your system, you must choose the “File” option from the dropdown in the Key column. Similarly, you must upload your .csv file containing the index field values for all the document/s you wish to upload to the system.
To connect the documents you wish to upload to the Document Center with activity/employee, you must provide index field values in the .csv file as follows:
The first column contains the actual name of the document you wish to upload.
The second column contains the index field name whose value you want to provide.
The third column contains the title of that index field.
The fourth column is the value you want to provide for the index field.
The fifth column details the type of data the index field can take.
You may refer to this for the full list of index fields available for use: https://help.sap.com/viewer/414f717e99a0448cb4e00aef8214cf42/2105/en-US/88ec5aa93ee748359a1108ddfb303ccf.html
Once your Body has been created, send your call to upload the file.
A successful push will provide the following response from the ONB1.0 system:
In the front end system, you will be able to see the uploaded document as shown below:
This blog details the process to bulk upload documents into the Onboarding 1.0 Document Center using REST API. The entire process can be divided into 2 steps: Authentication and Document Upload.
Thanks for reading! Please do share your feedback/thoughts in the comment section; feel free to ask me any questions you might have about this process as well!