cancel
Showing results for 
Search instead for 
Did you mean: 

SuccessFactors - Custom Navigation URL Token

WolfgangS
Explorer
0 Kudos

Hello,

I tried to extend the custom navigation in SFSF to add context parameters into the link to an external application (as described in the Configuring Custom Navigations" PDF on this page: http://help.sap.com/hr_foundation).

I add the token @PERSON_EMPLOYMENT_ID@ in the navigation url to our application. After we used the navigation, the url was extended with an ID. The problem is that I cannot find the matching ID to this ID in the person or employment records of this person in SFSF.

Does anyone know the corresponding attributes in the employment or person records in SFSF for the tokens @PERSON_ID@ or @PERSON_EMPLOYMENT_ID@?

Thanks for help,

Wolfgang

Accepted Solutions (1)

Accepted Solutions (1)

gerald_reinhard
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Wolfgang,

Person_ID and Person_Employment_ID refer to the internal person and employment IDs those entities are available as of today only in the Compound Employee API. See documentation available at help.sap.com/hr_api. This API will return those IDs. OData is not returning those ingternal IDs yet

CE API is returning those ids in the following API fields:

/person/employment_information/employment_id

/person/person_id

But more important than those internal IDs is the fact that the URL will always contain the selected userId:

The URL Parameter is always generated for the URL an is as follows: &selected_user=cgrant1.

This user ID is the userID available in the User entity in OData (field userId). From there you will come to the Employment of the Employee by expanding the empInfo navigation ($expand=empInfo) from there you can go on to all other entities (e.g. personNav).

This means you don't require the above mentioned internal IDs, they are only of use if you have a SAP ERP system and a data replication between EC and ERP running, because those IDs are stored in ERP to refer to the EC Employees. In an HCP Application you should make use of the provided selected_user URL parameter.

Best regards

    Gerald

WolfgangS
Explorer
0 Kudos

Hi Gerald,

Thank you for your reply.

I cannot find the parameter &selected_user=... in the URL.

I only see the parameters I added in the navigation link in custom navigation.

I configured the following URL:

http://localhost/?personid=@PERSON_ID@&employmentid=@PERSON_EMPLOYMENT_ID@

When I call the navigation entry for example in the action menu of a person I get the following URL:

http://localhost/?personid=cgrant1&employmentid=4001

Is there any option to enable the selected_user parameter in URL?

Best regards,

Wolfgang

WolfgangS
Explorer
0 Kudos

I noticed, that the parameter selected_user is in the URL, wenn I open the link from the Employee Profile - Employee Actions menu.

If I use the link in the sidecard action or goto menu the selected_user parameter is not available.

In this case I think I have to take the workaround via SFAPI call to fetch the username and then call the OData Service?

gerald_reinhard
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Wolfgang,

if you check chapter 2.1.2 in the documentation you will see that there are two different places where you can offer links in the person or in the employment navigation links. My example has been created in the "Employee Profile - jump to" menu location (see screenshot). If you choose that one or also "Employee Profile - Employee Records" you will have the &selected_user URL parameter. In all other cases you won't.

Best regards

   Gerald

gerald_reinhard
Product and Topic Expert
Product and Topic Expert
0 Kudos

Why can't you use the two other available places to do the navigation? You will get from there the userId and if required also the personIdExternal via OData expand call:

https://salesdemo4.successfactors.com/odata/v2/User?$filter=username+eq+'cgrant'&$format=JSON&$expan...

What is the benefit of using the other places, e.g. Person - Take Action or Person - Jump To? Do you require the internal IDs for some reason?

WolfgangS
Explorer
0 Kudos

I can use the two other available places to do the navigation.

The benefit for using this in other places like 'Person - Take action' is to improve the user experience with reducing the amount of clicks.

For example searching people:

In the search result I can use the 'Take Action' in the sidemenu of the person to jump to my app. In this case the selected userid in the URL would be helpful.

If I only use the URL placed in the Employee Actions menu first I have to search, open the profile of the employee and after that I can use the URL link to my app.

There are some other places like 'My Team' where the possibility to link directly to my app via sidemenu 'Take Action' would improve the user experience.

gerald_reinhard
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Wolfgang,

thanks for letting me know. I didn't thought about the quick cards in employee search. That makes perfektly sense. Not sure if you know but in case you have ideas to improve our product, e.g. provide additional information in APIs or more URL paramenters in custom navigations. You can file and idea in the successfactors community for employee central:

http://community.successfactors.com/t5/Employee-Central/ct-p/EmployeeCentral

You should have access to this community as a partner and/or customer.

I will ask for an enhancement in the custom navigation (additional URL parameter PERSON_ID_EXTERNAL and/or USER_ID). Will keep you posted as soon as I know when this feature will become available but this will be for sure not this year. After a new feature is available you will find such enhancement either in our release notes available at: http://help.sap.com/cloud4hr and/or in our IRR or release webinars. To register to or IRR or release webinars please visit this jam group: https://jam4.sapjam.com/groups/7GhKY05ABkFooThoFzrGyt/info

Beside this I also like to point you to another document which compares our two available custom navigation options. It is located here: http://help.sap.com/hr_integration/ The guide is called  "Integrating SAP ERP with Employee Central in a Side-by-Side Deployment Model" look in chapter 8 and for the comparison chapter 8.4. This 2nd navigation options allows to have dynamic links based on the content of the viewed employee and also allows embedded UI using iframes

Best regards

    Gerald

Answers (3)

Answers (3)

jigmundra
Explorer
0 Kudos

Hello @gerald_reinhard @siddharthrajora ,

I was able to create the custom navigation URL & was able to add the dynamic parameter/token @USER_ID@ to the URL via Configure Custom Navigation and so when I tested the URL the token "@USER_ID@" was replaced by real User ID of logged in user as per mentioned in guide https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/727f7d55535c41dbafffc73785ed53fa/3e7f007b32754...

However, I would like to check if I could place this same custom URL with @USER_ID@ token on home page card and if the token "@USER_ID@" can be replaced by real User ID of logged in user when employee clicks on this link/URL from home page card. From what I have noticed is on home page card, you can embed the deep link of SF that can redirect to any page within SF but you can't configure the custom URL with dynamic parameters whose value will be resolved in runtime (ex: when someone clicks on the link). Can you please confirm the same whether the same config is possible on home page card or not?

 

Thanks,

Jigyasa

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos
So as i understand, from homepage its not inserting the user id of the logged in user?
Former Member
0 Kudos

Hi All,

  we added a Custom navigation URL,When accessed the URL we are not able to get @PERSON_ID@ ,only @USER_ID@ AND @COMPANY_ID is working.are we missing any configuration in SFSF.kindly help me on this.

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

@PERSON_ID@ Inserts the PERSONID of a targeted user (not the logged-in user). You can select a target user in Employee Profile, quickcard, or My Team tile. This token requires Employee Central. @PERSON_EMPLOYMENT_ID@ Inserts the EMPLOYMENTID of a targeted user (not the logged-in user). You can select a target user in Employee Profile, quickcard, or My Team tile. This token requires Employee Central. As per the guide it says targeted user, anyhow you should be able to see personal profile or you can run a adhoc report for Job information or personal information to get the values etc.

WolfgangS
Explorer
0 Kudos

Hi Siddharth,

Thank you for your reply.

Your answer correspond with the description in the documentation.

I've tried to reproduce it with a sales demo system with Carla Grand.

When I use the link in the quickcard in the URL are the following token ID values:

@PERSON_EMPLOYMENT_ID@: 409

@PERSON_ID@:91


This values are not in the personal profile of Carla.


I tried to use the Odata api to look into the person an employment records of Carla. There I find the following values:

personIdExternal: "cgrant1",

userId: "cgrant1",

empId: "4001",

When I use the Tokens in the URL I expect for @PERSON_EMPLOYMENT_ID@ the value 4001 and for @PERSON_ID@ the value cgrand1.

So I can not understand why the values in the URL are 409 or 91.

Wolfgang

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

which system you are connecting to? SAP HCM etc through this custom link?

reason i pasted that because it says targeted user and not logged in user.

WolfgangS
Explorer
0 Kudos

I connect a HCP Cloud Portal. But I don't think the reason depends on the system I want to connect.

I tried to set the following link in custom navigantion: http://localhost/?personid=@PERSON_ID@&employmentid=@PERSON_EMPLOYMENT_ID@

I do the following steps to reproduce this issue:

1. Logon on SFSF with the admin user (Emili Clark)

2. I search for cgrant and open the quick card of Carla Grant

3. In the quick card I select GoTo MyTestURL

4. A new browser window opens with the following URL: http://localhost/?personid=91&employmentid=409&

I would expect the following URL: http://localhost/?personid=cgrant1&employmentid=4001&

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

have you tried using USERID? parameter instead of person parameters? what values are seen in that context?

Also, end result of it, does it work ie custom navigation link

probably you can also raise a ticket for this.

component LOD-SF-FWK-UI

WolfgangS
Explorer
0 Kudos

With UserID I get the following URL: http://localhost/?personid=91&employmentid=409&userid=admin&

I'll raise a ticket for this.

Thanks for help!

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

So user id works correct? also 409 and 91 does it belong to admin user ? can you confirm?

WolfgangS
Explorer
0 Kudos

User id works correct, but i can not confirm that 409 and 91 belongs to admin user.

The User id of admin is admin and the empid is null