cancel
Showing results for 
Search instead for 
Did you mean: 

CPI: SF OData Update issue using Batch Mode

babruvahana
Contributor
0 Kudos

Hi Experts,

I am trying to update on EmployeeTime records to SF via Batch mode. I am using the below simply query in OData adapter.

While doing batch processing the message is getting failed with the below error in CPI.

While doing without batch processing the message is getting failed with the below error in CPI.

OData Error Response without Batchproceesing:

<?xml version="1.0" encoding="utf-8"?>
<error
	xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
	<code>COE_MISSING_REQUIRED_PROPERTIES</code>
	<message lang="en-US">[COE0027]Please add required properties in payload. Required properties timeTypeNav, userIdNav are missing. You can check which properties are required for an entity in Admin Center > OData API Data Dictionary or the entity metadata.</message>
</error>

Payload Trying to update with batch processing:

<?xml version='1.0' encoding='UTF-8'?>
<batchParts>
	<batchChangeSet>
		<batchChangeSetPart>
			<method>PUT</method>
			<EmployeeTime>
				<EmployeeTime>
					<externalCode>110162220210713</externalCode>
					<endDate>2021-07-13T00:00:00.000</endDate>
					<startDate>2021-07-13T00:00:00.000</startDate>
					<userId>1101622</userId>
					<timeType>LOP1</timeType>
				</EmployeeTime>
			</EmployeeTime>
		</batchChangeSetPart>
	</batchChangeSet>
</batchParts>

Payload Trying to update without batch processing:

<?xml version="1.0" encoding="UTF-8"?>
<EmployeeTime>
	<EmployeeTime>
		<externalCode>110162220210713</externalCode>
		<endDate>2021-07-13T00:00:00.000</endDate>
		<startDate>2021-07-13T00:00:00.000</startDate>
		<userId>1101622</userId>
		<timeType>LOP1</timeType>
	</EmployeeTime>
</EmployeeTime>

Any leads will be highly apprecicated.

Regards,

Pavan

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

I have a problem in accessing upsert functionality of SuccessFactors from CPI. I am using Succesfactors odata v2 adapter in CPI but I am unable to find the Upsert Enitity .

I cannot find the upsert Entity in the SuccessFactors OData v2 in CPI. But I am able to access the same using Postman. Other odata functionalities are accessible from CPI using Oauth2 saml bearer token. Upsert functionality belongs to function-import operation of SuccessFactors adapter. Is it implemented in SuccessFactors adapter?

Cannot find the upsert entity in SF adapter

Postman Client

In the screenshot, I am able to access the same upsert odata in postman using oauth token. I am unable to find the same in CPI. Kindly provide the solution for this issue.

Thanks in advance.

0 Kudos

Hi Pavan,

I have faced a similar issue earlier, moreover, the ODATA entity requires the below values also to be fed in the data. Please add the below two fields in the payload then push.

Even if those field values are not in the scope, these are required to be updated again when you feed the info to SuccessFactors like a mandatory field.

Required fields might be different based on entities.

By the way, thanks for adding the exclusive detail, it clearly states the issue.

Regards,

Naveen

daviddasilva
Active Contributor
0 Kudos

Hi Pavan,

I can't say this looks familiar to me but I do think that employee time records are a restricted resource and so you may need to add some additional properties to the request URL or request headers. There is a SuccessFactors OData reference pdf out there somewhere that should help you find what you need. https://help.sap.com/doc/74597e67f54d4f448252bad4c2b601c9/2105/en-US/SF_HCM_OData_API_REF_en.pdf