cancel
Showing results for 
Search instead for 
Did you mean: 

SF- ODATA API - Query _ SAP CPI Integrations

niyatijain2
Explorer
0 Kudos

Hi All,

We are quering ODATA API in successfactor with below filter condition in CPI SuccessFactor ODATA ADAPTER processing.

$select=firstName,lastName,gender,empInfo/personNav/nationalIdNav/nationalId,empInfo/personNav/nationalIdNav/countryNav/territoryName,empInfo/personNav/nationalIdNav/personNav/emailNav/emailType,empInfo/personNav/dateOfBirth&$filter=(empInfo/jobInfoNav/lastModifiedDateTime ge datetime'${property.LastRunDate}' or empInfo/personNav/personalInfoNav/lastModifiedDateTime ge datetime'${property.LastRunDate}') and empInfo/jobInfoNav/event ne '4434

where is want to have the query filter as considering all the filter outside as 'AND' condition and the one in round braces- I want to fetch delta data from both personal data and employment data but not where both are present at the same time.

I am trying to fetch delta data from different entities in SF but the condititon that not all entities are modified at the same time and want to have the condition work for the entities. 

Can anyone help me in this?

Accepted Solutions (0)

Answers (1)

Answers (1)

ShaikAzmathulla
Participant
0 Kudos

Hi ,

To query delta data from SuccessFactors using the OData API in SAP CPI, you can construct a filter condition with logical AND and OR operators. Use OR within parentheses to handle delta data retrieval separately for personal and employment data, and use NOT to exclude records where both are modified simultaneously. Here's a condensed version:

Construct a filter condition with AND for overall conditions:

Logic : $filter=(condition1 and not(condition2) and condition3)
Where:
Condition1: Retrieves records modified after the last run date for personal or employment data.
Condition2: Excludes records modified after the last run date for both personal and employment data.
Condition3: Filters out records where the job event is equal to '4434'.

Regards,

Azmath.