Create SAP Mobility Custom App easily for SuccessFactors – Part 1

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Creating Mobile Custom App for SAP SuccessFactors Part 1

This post is our “reflection” on how to take an easy way in developing a mobility app for SFSF in HCP with detailed “turn – by – turn” instructions and hopefully it will help you to pass your “driving test” and get a “license to develop”

Part 1 – “Getting Started”

In this section you learn on “how to”:

  • Starting with SFSF
  • Setting up the mobile-ready OData user roles and permissions
  • Exploring SFSF OData API’s
  • Using RESTClient, testing and troubleshooting OData calls
  • Registering SFSF API to HCPms SMP
  • Registering users to SMP
  • Accessing SFSF OData from SMP on Cloud

SFSF Login

We assume you already obtained your SFSF demo client credentials and can login using similar link as below:

  • https://pmsalesdemo8.successfactors.com/login?company=’Company ID’ (where Company ID is uniquely identifying SFSF Customer or Partner (like ourselves))

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Upon successful login you will land on the following page (if not, we bare no responsibilities what happens next … are you sure you were on the login page to start?)

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

OData User Roles and Permissions

SFSF business processes can be exposed and consumed using OData API’s. For accessing or creating the ODATA API’s the user need to have specific roles. Make sure your user ID assignment has the following roles and permissions:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

SFSF OData API’s

Now the roles and permissions are set, let’s explore available OData APIs. To access them, go to the Admin Center page and in the Tool Search field type “OData API Data Dictionary”

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

The system displays the list similar to pictured below:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

For our challenge we decided to develop a mobile application for SFSF Employee Talent Profile allowing authorized users to search and find detailed information about the employee’s talent such as awards, education, certificates, training course and so on. To “proof test” you can develop mobile app for any other business process in SFSF using our “turn-by-turn” instructions.

Return to the Admin Center page and type any employee name in the search bar:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Select the Talent Profile for chosen employee. The system will display employee record.

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Using dropdown option, you can navigate to desired record and display relevant details. In our case we are interested in the Talent Profile and want to learn out more about this employee:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

We were able to navigate to the right information now let’s use OData API’s to retrieve the same data from SFSF. We need to go back to the Admin Center page and type “OData API Data Dictionary” in the Tool Search field.

TIP: Use prefix “Background_XXX” to find all APIs related to the talent profile data.

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

RESTClient and Testing OData

Congratulations, you are doing great so far and if you are still reading it, this means we did not mess up too badly either.
Next “turn” is to confirm if we can retrieve data using RESTClient. We used Base URL for SFSF:

  • https://apisalesdemo8.successfactors.com/odata/v2/

For testing purposes we selected one of APIs (under Entity Name): Background Awards as pictured below:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Start the Firefox RESTClient and provide the following details:

  • Method: Get
  • URL: https://apisalesdemo8.successfactors.com/odata/v2/{Entitytype}?$filter={Property name} eq ‘Value’
  • Ex: https://apisalesdemo8.successfactors.com/odata/v2/Background_Awards?$filter=userId eq ‘mdunn1’

NOTE: Based on your use case, you can practice with different entity types and filters to get your desired results.

You have to complete authentication by providing appropriate credentials on the Basic Authorization:

  • Username: SFSFusername@CompanyID
  • Password: SFSF password

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

In addition to authorization in the Headers section you need to select application/xml as a Content-Type.

The Request in your system should be similar as pictured below:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

As result the system will display the following Response information:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

You notice that our request was successful and we were able to retrieve the same information what has been displayed in the Awards section of the Employee Talent profile:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Now you should be able to retrieve any desired data from SFSF using OData and to complete testing on RESTClient.

Registering SFSF API to HCPms SMP

It’s time to turn our attention to the process of mobile application development.

Depending on your environment you can consider either consuming OData directly into the mobile application or publish it on SMP first and then consume using SMP.

Even you are already familiar on how to register these services on SMP please bear with us and just follow along:

  • Login to your HCP Cockpit account (using similar url https://hcpmsadmin-sXXXXXXtrial.dispatcher.hanatrial.ondemand.com)
  • Go to Subscriptions -> hcpmsadmin
  • Proceed to Applications and select Create Application option

In the Create Application window provide and save all required details for your future app, for example:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Upon saving your new application select the BACK-END tab and provide the details for your primary connections. Remember that

  • Username: SFSFusername@CompanyID
  • Password: SFSF password

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

To validate that your entries are saved properly and working correctly you can ping the application:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

Registering users to SMP

Access RESTClient and register to receive APP CID:

  • Method: Post
  • URL: https://hcpms-sXXXtrial.hanatrial.ondemand.com:443/odata/applications/latest/{Connection Name}/Connections
  • Ex: https://hcpms-sXXXtrial.hanatrial.ondemand.com:443/odata/applications/latest/com.sfsf.demo/Connections

You have to complete authentication by providing appropriate credentials on the Basic Authorization:

  • Username: SMP server id
  • Pwd: SMP Password

In the Headers section you need to select application/xml as a Content-Type and for Request Body choose Android or iPhone.

<?xml version=”1.0″ encoding=”utf-8″?>
<entry xmlns=”http://www.w3.org/2005/Atom” xmlns:m=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata”
xmlns:d=”http://schemas.microsoft.com/ado/2007/08/dataservices”>
<content type=”application/xml”>
<m:properties>
<d:DeviceType>Android</d:DeviceType>
</m:properties>
</content> </entry>

After submitting the request, you need to verify the registration in the SMP for this application. If no errors occurred you find a new registration entry, for example:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

This entry confirms that registration is successful and X-SMP-APPCID is the Registration ID.

Accessing SFSF OData from SMP on Cloud

We have last test to perfom validating the SFSF Background Awards OData API via SMP using RESTClient (or relevant data for your case):

  • Method: Get
  • URL: https://hcpms-sXXXtrial.hanatrial.ondemand.com:443/com.sfsf.demo/{Entitytype}?$filter={Property name} eq ‘Value’
  • Ex: https://hcpms-sXXXtrial.hanatrial.ondemand.com:443/com.sfsf.demo/Background_Awards?$filter=userId eq ‘mdunn1’

When prompted you have to complete authentication by providing appropriate credentials on the Basic Authorization window:

  • Username: SMP server id
  • Pwd: SMP Password

In the Headers section you need to select application/xml as a Content-Type and for X-SMP-APPCID choose {Registration ID from SMP}:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

If your request is successful, the system will display the following Response result:

Create SAP Mobility Custom App easily for SuccessFactors - Part 1