How to Integrate SuccessFactors LMS module Using Oracle Integration Cloud

Introduction:

Web Services are used to access application data outside of the application UI. There are two types of LMS Web Services:

  • SOAP/WSDL (AXIS): These were the old LMS Web Services used in old implementations and deprecated in 2018.
  • ODATA (RESTful API): OData is used to define best practices that are required to build and consume RESTful APIs.

To learn more about these OData API please go through this link

ODATA allowing reading related data with a “join”. This means you can query a Job Application, and its related Job Requisition and Attachment in a single query.

ODATA LMS API:

This is the newer Web Services. LMS instance Calls are made with a user id and has the user’s context, or the admin id and has the admin’s context.  As we can use a user’s context, customers can more easily create a custom portals in Customer side.

Instead of a password you need to get a secret key from System Admin -> Configuration -> OAuth Token Server. 

We use this key to get a token that we use to validation our session while making REST Api calls.

Steps to generate Token in Postman:

  1. To get the Secret “Client Secret” Login to the SAP SuccessFactors Learning administration environment for your tenant and go to System Admin->Configuration->OAuth Token Server.

Note: This is generated on the LMS Administration side as per this screenshot, note that once this is regenerated, the previous secret client is deprecated

  • Click Generate a new Client Secret. SAP SuccessFactors Learning generates a client secret, a client secret has value, and a public key. 
  • Copy the values on the page. 
  • Encode the client id with the secret key to base64. 
    1. The format is clientId:secretKey, below is the sample values.

partlms0157:376d497f9622dcfb2aace9cfca4a4895890e004971543e033f57d7955c96677vxxxx7777xxxxxx7xxxx7xxx7xxx7xxx77xxx

  • Use your base64 encoded secret key to create a token request.
    • Use below URL for to generate token.

https://xxx.successfactors.com/learning/oauth-api/rest/v1/token

  • Method is POST 
  • Add a parameter to the request
    • Name: Authorization 
    • Value: Basic base64 encoded key

use body as below.

{

“grant_type”:”client_credentials”,

 “scope”:{ “userId”:”userid”,

 “companyId”:”companied”,

 “userType”:”admin”,

“resourceType”:”learning_public_api”

 }}

e. click on  send, you can see the response as shown in below screen shot.

Now you get the token to call the LMS webservices API, use this key as security Authentication while creating Rest adapter in OIC.

You can generate the Token using Rest adapter also in OIC, for now I have taken from Postman.

f. The session will last 1800 seconds or 30 minutes. Then you will need to request a new token. 

Steps to test one of the services (LMS ODATA SEARCH STUDENT) :

1. You will need the token from the previous steps in all your requests.

2. Create Rest adapter connection in OIC.

a. For Configure Connectivity define as below

Connection Type: REST API Base URI

Connection URL: https://XXX.successfactors.com

b. For Configure Security.

  • i. Select Security Policy: API Key Based Authorization
  • API Key: Token generated in previous Step.
  • API Key Usage: -H Authorization: Bearer ${api-key}
  • Test the connection, save and close.

Create Integration in OIC using above created Rest adapter:

a. Create Scheduled Orchestration integration in OIC.

b. Dang and drop Rest Adapter created in previous step into the flow.

c. Configure as below.

i. Use Resource URI

/learning/odatav4/searchStudent/v1/Students

Method: GET

Enable “Configure this end point to receive the response”.

d. Click ‘Next’.

e. Select response payload format ‘JSON Sample’

Inline Schema: use below

{

    “@odata.context”: “$metadata#Students”,

    “@odata.metadataEtag”: “W/\”b8c4f028-f76b-4849-bf1e-06413bfb7d6d\””,

    “value”: [

        {

            “studentID”: “nabbas”,

            “personGUID”: null,

            “personExternalID”: “nabbas”,

            “empStatID”: “”,

            “empTypID”: “”,

            “regularTempID”: “”,

            “fulltime”: “Yes”,

            “jobLocID”: “Cape Town (9000-1000)”,

            “jobPosID”: “71000011”,

            “domainID”: “10001”,

            “orgID”: “Compensation and Benefits US (50150007)”,

            “compID”: null,            “lastName”: “Abbas”,

“firstName”: “Nicasio”,

            “middleName”: null,

            “notActive”: “no”,

            “addr”: “”,

            “city”: “”,

            “state”: “”,

            “postal”: “”,

            “cntry”: “ZA”,

            “superField”: “”,

            “hireDate”: 1388534400000,

            “termDate”: null,

            “emailAddr”: “Nicasio.Abbas@bestrun.com”,

            “hasAccess”: “Yes”,

            “selfReg”: “N”,

            “locked”: “No”,

            “regionID”: “Corporate Services (CORP_SVCS)”,

            “roleID”: “LEARNING_USER”,

            “profileStatus”: “ACTIVE”,

            “accountID”: null,

            “posNumID”: “”,

            “nativeDeeplinkUser”: “No”,

            “criteria”: null,

            “totalCount”: null

        }

    ]

}

f. click Next.

g. click Done.

h. Final flow looks like below.

i. Save and close the integration. Activate Integration and Submit the integration.

If you want to fetch the output File into some FTP location, you can use FTP adapter below the Rest adapter or you can Import the output data into any other application.

4. Using Filter Criteria in LMS API’s.

You can fetch the data using filter criteria also.

Example: 

  1. https://xxx.successfactors.com/learning/odatav4/searchStudent/v1/Students?$filter=criteria/learnerID%20eq%20%27nabbas%27

It will fetch the data which the learnerID= ‘nabbas’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s