Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sriprasadsbhat
Active Contributor

Introduction:


As a part of beginner series in earlier blogs we discussed basics of SuccessFactors Learning Management System.Continuation to same will be covering below two topics to complete beginner series of SFSF Learning Management System.

  • How to get SFSF LMS data from SAP Cloud Platform Integration.

  • Reports


Refer below for the other blogs as a part of SuccessFactors Integration series.

SuccessFactors Integrations Beginners Guide- Part 1

How to connect SuccessFactors LMS with SAP Cloud Platform Integration:


Will discuss two scenarios one to QUERY data from SFSF LMS and one to POST data into SFSF LMS

Create Credentials in SAP Cloud Platform Integration:


Login into SAP CPI and navigate to Monitor--> Manage Security Artifact to create credential of type OAuth2 Client Credentials.


Enter All the required details.


Step 1:

Provide Name and select type as Client Credentials

Step 2:

Provide Client ID and Client Secret generated ( refer previous blog post on how to generate it )

Give Token Service URL specific to your Customer LMS  tenant.
https://XXXX-stage.plateau.com/learning/oauth-api/rest/v1/token

Add Scope as below and make sure you replace userId and Company Id as per your customer LMS tenant ( refer previous blog post on how to create User ID )
{
"userId":"INT_LMS_ADMIN_USER",
"companyId":"XXXX",
"userType":"admin",
"resourceType":"learning_public_api"
}

Once you have updated deploy it.

Scenario 1 - Querying Data from SuccessFactors LMS:


Login into SAP CPI and create basic Iflow including below components.


Step 1:

Add request-reply from pallet and configure the channel as shown below


1#:

Add SuccessFactors -OData V4 adapter.

2#:

Enter address and Credential Name ( created earlier ).In my case URL is something like below which pulls Enrollment Details for Scheduled Learning.
https://XXXX-stage.plateau.com/learning/odatav4/public/admin/scheduledoffering-service/v1/

3#:

Click on the processing tab and enter Entity for querying the details with filter condition.In my case below are the details.
EnrollmentListings

$filter=criteria/scheduleID eq 1

Then we are good to go with deployment.Once you run your IFlow you will get below response.
<EnrollmentListings>
<EnrollmentListing>
<withdrawPending/>
<lastName>XXXXX</lastName>
<shippingCity/>
<cancelDate/>
<addUser/>
<orderItemID>21</orderItemID>
<criteria/>
<origin/>
<shippingPhoneNo/>
<shippingFaxNo/>
<totalCount/>
<lastUpdateTimestamp>1592716306083</lastUpdateTimestamp>
<middleInitial>YYYY</middleInitial>
<shippingCountry/>
<enrollSeatID>21</enrollSeatID>
<shippingEmailAddress/>
<ticketSequence/>
<comments/>
<shippingPostal/>
<paymentOrderTicketNo/>
<enrollDate>1592716302000</enrollDate>
<studentID>101010101</studentID>
<firstName>YYYY</firstName>
<shippingAddress/>
<shippingState/>
<lastUpdateUser>adminab</lastUpdateUser>
<enrollStatID>ENROLL</enrollStatID>
<enrollSlotID/>
<scheduleID>1</scheduleID>
</EnrollmentListing>
</EnrollmentListings>

Scenario 2 - Posting data into SuccessFactors LMS


Create an IFlow very similar to above one to post the data.


Step 1: 

Add content modifier and set the below content into body.
<Enrollments>
<Enrollment>
<enrollments>
<element>
<scheduleID>23</scheduleID>
<studentID>adminab</studentID>
<enrollmentStatusID>ENROLL</enrollmentStatusID>
<notifyUser>true</notifyUser>
<comments>User is enrolled</comments>
<notifyInstructor>true</notifyInstructor>
<notifySupervisor>true</notifySupervisor>
<notifyContacts>true</notifyContacts>
</element>
</enrollments>
</Enrollment>
</Enrollments>

Now the interesting part is how to form the above message content.Usually with SuccessFactors OData -V2 we will be able to get the schema once perform model operation.In case of SuccessFactors OData -V4 we dont have that luxury.Will try to explain with one use case or API.


I have two windows left one is manually formed input XML and right side is Metadata of the API which explains everything.Based on your entity form the payload using above relationship.

  1. Entity Set Name

  2. EntityType Name

  3. Entity Type Property Name

  4. Fields which are part of Complex Type.


Step 2:

Add request-reply from pallet and configure the channel as shown below


1#:

Add SuccessFactors -OData V4 adapter.

2#:

Enter address and Credential Name ( created earlier ).In my case URL is something like below which post Enrollment into Scheduled Learning.
https://XXX-stage.plateau.com/learning/odatav4/public/admin/scheduledoffering-service/v1/

3#:

Click on the processing tab and enter Entity for posting Enrollment.In my case below are the details.
Enrollments

once you are done with above configuration click on deploy to receive the response from SFSF LMS.
<Enrollments>
<Enrollment>
<enrollments>
<element>
<scheduleID>23</scheduleID>
<studentID>adminab</studentID>
<enrollmentStatusID>ENROLL</enrollmentStatusID>
<notifyUser>true</notifyUser>
<notifyInstructor>true</notifyInstructor>
<notifySupervisor>true</notifySupervisor>
<notifyContacts>true</notifyContacts>
<comments>User is enrolled</comments>
<errorMessage/>
<warningMessage/>
<warningOverride/>
</element>
</enrollments>
</Enrollment>
</Enrollments>

Login into SuccessFactors and you should be able to see the new user enrolled into scheduled training.


So we are good to go with integration!

Reports:


If you want to extract the data from SuccessFactors LMS reports are the best option where you can export the data in multiple formats.

Designing reports requires Eclipse based tooling called Plateau Report Designer.Initially thought of putting how to guide on reports for integration consultants but saw very good step by step guide on reports by kandadi so will share the same to avoid multiple blogs on same topic.

Plateau Report Designer - Detailed overview

Plateau Report Designer - Detailed overview

How to install designer and where to get the tool:

Please refer the below KBA which provide compiled plug and play ( as installation requires choosing right JVM and you might need to go back to System Configurations ) version of designer tool where you just need to connect your LMS instance dataset.

Plateau Report Designer- Set Up And Troubleshooting Guide

How to consume these files in SAP CPI:

You have option to schedule these reports and generate file as CSV into SFTP or FTP .Then you can read this by creating simple iflow to read the file from the same location.

Conclusion:


Hope it's helpful for beginners to understand SuccessFactors LMS from Integration perspective.

 
6 Comments