cancel
Showing results for 
Search instead for 
Did you mean: 

odata v4 connectivity to Successfactors EC

former_member539805
Participant
0 Kudos

Hey All,

Is there a way to connect to an SF EC using an odatav4 adapter?

I need to retrieve data, apply filter conditions and expand on multiple entities using odata apis. Using odatav2 this is really tedious since odatav2 does not support filtering on child elements. Odatav4, however, supports filtering on child entities and navigational entities along with lamda operation support like 'And' and 'All'.

All said and done, how do we actually use odatav4 to retrieve data from SF EC?

What will the url be? I am sure it's not - https://host-url.sapsf.com/odata/v2

Any help will be highly appreciated. Thank you.

Kriba

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor

I have only seen SuccessFactors Employee Central having OData v2. If the server only has V2, I don't think you can simply use a V4 adapter with it.

Regarding filtering on child element, you can achieve it on OData v2 too by using following filter format, it is not specific to only V4:-

$filter=childElement/childField eq 'value'

former_member539805
Participant
0 Kudos

Oh! I was under the impression that when you are querying a parent entity and then you navigate from the parent entity to a child entity and query few parameters on the child entity using filter conditions, it doesn't work.

For example-

https://<<host-url>>.com/odata/v2/PerPerson?&select=personIdExternal,customString3,emailNav/emailAdd... eq 'P'

So in this case I am querying the Parent entity and navigating towards the child entity and the filter condition is on the child entity. I have tried a couple of time with this and it doesn't work. It fetches all the records irrespective of the filter condition.

engswee
Active Contributor

Hi Kriba

Not sure why it doesn't work for you, but such filtering on child entity fields work perfectly fine for me. Here are some screenshots from Postman:-

This is a query on parent entity WfRequest, with a filter on child entity's status field

https://<host>:443/odata/v2/WfRequest?$filter= wfRequestStepNav/status eq 'PENDING'&$expand=empWfRequestNav,wfRequestStepNav,empWfRequestNav/wfConfigNav

With status as PENDING, there are results returned.

When I change the value of the query field for status to a random value, the result set is empty.

This indicates the the filter condition on the child entity is being evaluated in the query call.

former_member539805
Participant
0 Kudos

Ok let me try this out and get back to you. As far as the cases I have tried, this has failed.

former_member185414
Active Contributor
0 Kudos

It hasn't worked for me either so I have a question - is the 'status' property in parent entity(WfRequest) as well ?

engswee
Active Contributor

Hi Kriba

I had a further check on this with other entities, and for the SF EC OData APIs which is on V2, it only works when the navigation is to a single entity instead of a collection. In other words, if the relationship is 1:1, then it works, if it is 1:N, then it does not.

Regards

Eng Swee

former_member185414
Active Contributor

Hi Eng/Kriba,

And another (not so good) way to make it work is to expose the same property at the header level as well, provided the data model permits the same.

BR.

former_member539805
Participant

Hey Eng,

Ah yes. That makes sense. And that's why it wasn't working before. I was using a top down approach to navigate from PerPerson to PerEmail or EmpEmployment. Now, the problem with that is that the top down approach always gives you a 1:N cardinality and hence it didn't work. For example - one person having multiple Email or multiple Employment records.

I recently changed all the odata calls to use the Bottom up approach navigating from EmpJob or EmpEmployment to PerPerson. This is always a 1:1 cardinality and the odata filtering worked like a charm!!

Thank you Eng and Ankit for your valuable comments

Kriba

Answers (2)

Answers (2)

pboulicaut
Participant
0 Kudos

you should check these doc :

https://help.sap.com/doc/2d1d6fcc4eae4db8b9bbd3103baee1c7/2205/en-US/HXMSuiteODataAPIRefGuideV4.pdf

it's specific to ODATA V4 and it contains URLs for each datacenter

anu_patyath
Explorer
0 Kudos

Hello Kriba and @engswee.yeoh,

I am new to ODATA and SFSF adapter. Could you please guide me (on useful materials your suggestions etc) on how I can extract delta changes to an employee from Successfactors using SfSF adapter or ODATA adapter and send to an external partner. I see many blogs asking to use operations modeler but blogs only talks about querying single entity. Will operations modeler allow me to formulate a query to extract data based on filters on multiple entities and can the same query be posted into SAP PO Query string in the adapters ?

Thanks for your suggestions.

Anu