on ‎2020 Feb 21 2:35 PM
Hi SAP Community,
Could you please help me understand where the external ID of products/ articles extracted from ERP are stored within C4C? I am using ODATA to get this ID but I only see internal ID when I look under products.
Thank you!
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi,
There are 2 options to retrieve the product External ID using odata in C4C:
1. Using c4codata endpoints
You can padd the product ID as filter to ID parameter and get the Object ID. Then call "/ExternalIDMapping" endpoint and get the external ID for the product.
Example:
https://my30XXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ProductCollection?$filter=ID eq 'P900100' --> Get the ObjectID let say 00163E03A0701EE288BE995DC50D3D27
https://my30XXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ProductCollection('00163E03A0701EE288BE995DC50D3D27')/ExternalIDMapping
2. Using c4codataapi endpoints (Preferred option as c4codata is already deprecated)
Since "c4codataapi" donot expose external ID directly, hence you need to call 2 different entities:
a. Call "ProductCollection" entity and get the product UUID.
https://my30XXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ProductCollection?$filter=ProductID eq 'P900100'
b. Then call "ObjectIdentifierMappingCollection" and pass UUID from earlier step as the UUID filter parameter against LocalObjectUUID along with external system ID. In response RemoteObjectID whould give your the external ID of product
https://my30XXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ObjectIdentifierMappingCollection?$filter=LocalObjectUUID eq guid'00163E03-A070-1EE2-88BE-995DC50D3D27' and RemoteBusinessSystemID eq 'CRM'
BR
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharath Raj,
The eternal id is not available under product when requested through ODATA I.e when I try to Get product data using productcollection query, I see product ID as the internal ID but I don't see external id anywhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Risa Laventhen,
External ID field is not availble in the product collecrion entity. Please check the Odata documenatation
https://help.sap.com/doc/d0f9ba822c08405da7d88174b304df84/2002/en-US/index.html#/topic/Product
Regards,
Bharathraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.