Integration Object and API in Hybris

Integration Objects are the medium which is used to transfer the data from Backed system to hybris and vise versa. With every Integration object we will have an integration API [for create, update or delete the data] that accept one or more object payload[batch upload].

They Key benefits for using Integration object is that it can be defined and extended at runtime from Backoffice Integration Object UI Prospective. The Integration API uses and extends the OData protocol for building and using RESTful APIs.

We can see the Integration object and its associated integration object item using the integration service endpoints.

GET https://localhost:9002/odata2webservices/IntegrationService/IntegrationObjects

To see the meta data of this integration object we need to append $metadata in the end

GET https://localhost:9002/odata2webservices/IntegrationService/IntegrationObjects?$metadata

  1. Integration Object – Inbound
  2. Integration Object – Outbound.

As the name suggest inbound refers to the data pushed from backend system to Hybris. We can create, update or delete data using Integration Object. We use SCPI to push the Data from External system to Hybris. We need to provide the EDMX object representations to SCPI which they will use to IFLOW development. Then the SCPI push the Request payload to an integration API exposed by Hybris.

e.g. Product Data can be pushed from backend system to Hybris via SCPI.

POST call – https://localhost:9002/odata2webservices/InboundProduct/Products

Request Body :

In Outbound service data is transferred from Hybris to Backend System. e.g. During registration on Hybris site, the customer got replicated to Backend System. Integration Objects are sent to OData endpoint. We need to Set up and configure the outboundservices extension to push the data to external system.

We can also schedule the the data push to external system via Outbound Sync. It uses Delta Detection to identify new and modified Items in SAP Commerce. The outbound sync involve 3 steps:

  • Configuring the outbound channel though which the changes will transferred – creation of consumed destination, authentication
  • Configuring the change stream. – creation of OutboundSyncStreamConfigurationContainer, OutboundSyncStreamConfiguration
  • Configuring the Cron job that run on the basis of trigger to send the data – creation of OutboundSyncJob and OutboundSyncCronJob. This job retries after failure. the default value for max tries is 5.

To Start using Integration object in your project you need to add below extension in your localextension.xml file :

  • integrationservices Extension
  • integrationbackoffice Extension
  • inboundservices Extension
  • outboundservices Extension
  • odata2services Extension
  • odata2webservices Extension
  • outboundsync Extension
  • integrationmonitoringbackoffice Extension
  • outboundsyncbackoffice Extension
  • integrationbackofficetest Extension
  • webhookbackoffice Extension
  • webhookservices Extension

    After using these extension we need to identify, what all data we need to export or import. Suppose there is any custom attributes in product model. Then we need to create those attribute in Integration Object Impex, which we get updated using system update. This changes can be made directly from Backoffice Integration UI Prospective. Once the changes are done we can use above inbound or outbound methodology for transfer of data.

    The Integration Object API endpoints can me made secure using OAuth, Basic Authentication. User group would be used for authorization.

    To disable or enable data monitoring, set the Boolean value for the inbound and outbound monitoring properties separately. The default setting for both is false.

    inboundservices.monitoring.enabled=true

    outboundservices.monitoring.enabled=true

    To enable payload persistence, set outboundservices.monitoring.success.payload.retention=true.

    To enable outbound request error monitoring, set outboundservices.monitoring.error.payload.retention=true.

    An admin user or employee with integration object user group can access the integration UI prospective and from there he/she can do multiple things :

    • Modification in integration object
    • Export EDMX which will be used by SCPI team for their IFLOW development.
    • Monitoring of the Request
    • Managing the Authentication and Authorization of Integration Object.

    Leave a Reply

    Your email address will not be published. Required fields are marked *