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

how to consume odata service?

Former Member
0 Likes
1,305

Hi experts,

hybris is connecting external system,external system provided post request odata service In hybris,trying to build the payload using oootb odata extensions in Hybris1808 Can you help us how to build payload to send data to external system.

Thanks, Anusha

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Likes

Hello Anusha, This means that the item is associated with another item . to solve this problem, you need to set auto create to true as per the below link https://help.hybris.com/1811/hcd/d5e9027151d145afa5aa0a9241d33a3a.html

Former Member
0 Likes
 INSERT_UPDATE IntegrationObject; code[unique = true];
 ; TestOrder
  
 INSERT_UPDATE IntegrationObjectItem; integrationObject(code)[unique = true]; code[unique = true]; type(code)
 ; TestOrder ; AbstractOrder              ; AbstractOrder
 ; TestOrder ; B2BUnit              ; B2BUnit
  
 INSERT_UPDATE IntegrationObjectItemAttribute; integrationObjectItem(integrationObject(code), code)[unique = true]; attributeName[unique = true]; attributeDescriptor(enclosingType(code), qualifier); returnIntegrationObjectItem(integrationObject(code), code); unique[default = false]
 ;TestOrder:AbstractOrder; code ; AbstractOrder:code;;true
 ;TestOrder:B2BUnit; uid ; B2BUnit:uid;;true

we created "TestOrder " Integration Object and executed below script to build payload import de.hybris.platform.integrationservices.service.IntegrationObjectConversionService; import de.hybris.platform.core.model.order.OrderModel; import de.hybris.platform.b2b.services.B2BOrderService; final OrderModel order=b2bOrderService.getOrderForCode("xxxxx")
final Map payload = integrationObjectConversionService.findIntegrationObject(order,"TestOrder"); but we are getting error,the Integration Object Definition of 'TestOrder' was not found

Former Member
0 Likes

Hi Anusha,

Did you complete this 'consuming OData service" part you were trying for? I have recently started working in Hybris & looking to do the same; wondering how do you configure the connection properties & how to make OData calls ('get' methods to start with)?

Thanks, Lalit

Amit-Panwar
Product and Topic Expert
Product and Topic Expert
0 Likes