cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

C4C: How to extend Standard Odata Service or SOAP Webservice for creating customer from ext. system?

siwei_yang
Participant
0 Likes
2,517

Hi Dear C4C Expert,

we have a third party (non-sap) system which will transfer data of customer via CPI to C4C and request C4C to create the new customer. As we know using ODATA service (e.g POST https://xxxxxxxx.ondemand.com/sap/c4c/odata/v1/c4codataapi/IndividualCustomerCollection) we could achieve this task. But additionally we would like to know if the customer data comes from the third party system or not. Because we also get customer data from ERP (also through CPI), we don't want to mix these data with the others.

We have seen that in payload of the above ODATA service there is a field called ExternalSystem. But it is not directly available. In PDI I have no idea how to access to this field. So it turned out that we have to create a new Z-field to save the information where the customer data came from.

Now our question is, how to extend the standard ODATA service (or soap web service) so that we can set this Z-field during creating a customer on the third party system.

Or do you have better idea than this? Or maybe there has been already a standard way to deal with this.

Best wishes

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member226
Employee
Employee
0 Likes

Hi,

You can extend the standard odata. It depends on how/where the custom field has been added.

1. if field is added via KUT then just go to adaptation mode and edit the field and go to "OData Services" tab and Mark the check box. Save your changes.

2. If the field has been added via PDI then you can use PDI Object "Odata Extention" as mentioned in https://blogs.sap.com/2017/05/07/new-feature-odata-service-extension-with-extension-fields-in-sdk/

For SOAP service as well you can use KUT tool to extend the Webservice or use "Process Extension Scenario" for PDI based fields.

Field "ExternalSystem" comes from ObjectIdentifierMappingCollection of the C4C Odata. Thats why it is read-only field when using with IndividualCustomerCollection. However, you can just use this object to create a new mapping (Check "ID for Integration" in administrator workcenter as well as BLOG to know more) based on the remote system ID.

Thanks

siwei_yang
Participant
0 Likes

Hi Saurabh,

thanks a lot for your answer. It resolves my issue.

Best wishes

Peter

Answers (0)