Skip to Content

Note: This alternative integration solution is pending review. We’re evaluating the situations where it makes the most sense to implement the solution as an integration framework between SAP Hybris Commerce and SAP Hybris Marketing. Expect updates in the near future.


Expressway is a very lightweight integration between SAP Hybris Commerce and SAP Hybris Marketing. To deploy Expressway on your SAP Hybris Commerce server, all you have to do is add one extension to your localextensions.xml file, rebuild, and update your system. Once Expressway is deployed, you can immediately start sending master data and other marketing-relevant information to SAP Hybris Marketing. With Expressway, you can send customers, products, categories, reviews, abandoned carts, saved carts, and orders, all out-of-the-box. Moreover, Expressway can be deployed on older versions of SAP Hybris Commerce as far back as version 5.7.

Expressway uses the SAP Hybris Commerce job framework to initiate the replication of data to SAP Hybris Marketing. Each object type (e.g. product, customer, order, etc.) gets its own job, and you can run and schedule this job from Backoffice Administration Cockpit. Expressway was designed with maximum reuse in mind, so that any enhancements you need to make, whether to add new fields to an existing object type or add a completely new object type, are straightforward and involve minimal changes. A major feature of Expressway is its end-to-end monitoring capability. Not only does Expressway provide detailed monitoring of events and errors that may occur in the SAP Hybris Commerce system; Expressway can also be configured to monitor errors that occur in the SAP Hybris Marketing system.


High-Level Overview (click image to enlarge)


How to Use

To use Expressway, navigate to the Cronjobs menu in Backoffice. There you will find all the cronjobs delivered with Expressway (click to enlarge):


Next, we configure a cronjob. Select a cronjob and navigate to the Administration tab. There you will find four configurable properties for use with Expressway (click to enlarge):

The properties are described below:

  • Batch Size: objects are sent to SAP Hybris Marketing in batches, one batch per OData request. This property defines the maximum number of objects in a batch. The default is 500.
  • Catalog Version: specifies the catalog version to be used when selecting certain objects, like products or categories. For example, the ymktProductCronJob only sends products belonging to the catalog version specified in this property.
  • Error Stop Count: objects are sent to SAP Hybris Marketing in batches. The attempt to send a particular batch may fail. The ‘Error Stop Count’ property defines the maximum number of failures before the job is aborted. Note that the Expressway cronjobs can also be aborted on demand.
  • Perform Validation: part of the end-to-end monitoring capability of Expressway. When enabled, this property issues a call to SAP Hybris Marketing after a batch is sent to see if there were any errors importing that batch. The errors are attached to the cronjob log. Enabling this property impacts performance, so use judiciously.

Multi-Language Support

A cronjob can be configured for a particular language, and Expressway sends the data in that language. For example, if the language property of ymktProductCronJob is set to German, Expressway sends the product descriptions in German. To send the products in multiple languages, you can maintain language-specific copies of the ymktProductCronJob (e.g. ymktProductCronJob_EN, ymktProductCronJob_DE, etc.).


cronjob Logging

Messages logged by Expressway during the execution of a cronjob can be seen in the cronjob log. Open the log and download it:

Make sure to set the logging to the desired level using the ‘Log level file’ dropdown as show in the screenshot above.

Note that that logging level chosen in the dropdown does not set the logging level of sapymktsync. That has to be done separately in your file. The level chosen in the dropdown only determines which messages get written to the cronjob log file. So if the logging level of sapymktsync is set to ‘INFO’, it does not matter that the level in ‘Log level file’ is ‘DEBUG’. No ‘DEBUG’ messages from sapymktsync are logged.

Note also that the logging level set in the ‘Log level file’ dropdown can be no higher than the value specified in the ‘cronjob.logtofile.threshold’ property. By default this property is set to ‘INFO’, so if you want to set ‘Log level file’ to ‘DEBUG’, as in the screenshot, you would need to set ‘cronjob.logtofile.threshold’ to ‘DEBUG’ also.

Expressway provides a lot of useful logging information. In particular, it tells you the status and execution time of the cronjob, the number and type of the changes that were detected along with the time taken to detect those changes, the number and type of the changes that were marked as ‘processed’ along with the time to process those changes, and the number of objects that were sent along with the time to send them:

17.05.17 18:48:13:393 INFO SUCCESS/FINISHED=2528ms, CollectChanges(NEW=1)=47ms, ConsumeChanges(NEW=1)=106ms, SendModels(1)=1525ms, ValidateImportHeader(1)=840ms


Abandoned Cart

Expressway defines a property that specifies the length of time in minutes after which a cart is considered abandoned. The property name is ‘sapymktsync.syncjob.abandonedcart.interval’ and the default value is 120 minutes. You can specify a custom value for this property in your file.


How to Enhance

Adding a Field to an Existing Object Type

To add a field to an object type, or to remove a field, or to change the way a field is mapped to its OData fieldname, find the sync service (e.g. CustomerSyncService) for the object type that you’re interested in and make your changes there. For example, to add the customer postal code, which isn’t currently mapped, you would locate the CustomerSyncService class and add the following to the convertAddressModelToMap(…) method:

//<Property Name="PostalCode" Type="Edm.String" MaxLength="10" sap:unicode="false" sap:label="Postal Code"/>
this.optionalPut(map, "PostalCode", address, AddressModel::getPostalcode);

Adding a New Object Type

To add a new object type, create a new sync job and a new sync service.

Adding a New Sync Job

For the new sync job, extend either AbstractSyncJob or AbstractChildSyncJob. The latter is used for object types that are associated with a child object type. For example, OrderSyncJob extends AbstractChildSyncJob because an order has items.

If you extend AbstractSyncJob, you may need to override some or all of the following methods:

  • getModelClass() is where you provide the model class for the item type that you wish to send to SAP Hybris Marketing. This method is mandatory. For customers, the method is as follows:
    protected Class<CustomerModel> getModelClass()
        return CustomerModel.class;
  • getStreamConfigurationItemSelector(…) is where you provide search criteria for your object type. The value provided in this method is used as part of the ‘WHERE’ clause of the Flexible Search query that is constructed by deltadetection. Consider saved carts, which are simply carts whose ‘saveTime’ isn’t null. To retrieve saved carts, SavedCartSyncJob provides the following search criteria:
    protected Optional<String> getStreamConfigurationItemSelector(SyncCronJobModel cronJob)
        return Optional.of("{item.saveTime} IS NOT NULL");
  • You may need to communicate object deletions to SAP Hybris Marketing for your new object type. Although deltadetection can detect that an object was deleted, the only information that remains about the object is its automatically-generated SAP Hybris Commerce-specific primary key (after all, a deleted object no longer exists in the database!). Typically, this primary key is not something your SAP Hybris Marketing system will know about. So how do you inform SAP Hybris Marketing that the object was deleted? Expressway provides two methods for this very purpose:
    • getItemStoreFunction() is where you provide the function that gets the information to store for your new object type. The stored information is used later to restore the object after it’s been deleted (as a technical aside, the information is stored in the ‘info’ field of a deltadetection item type called ‘ItemVersionMarker’; the ‘ItemVersionMarker’ is used to mark changes to items). SavedCartSyncJob implements getItemStoreFunction() for saved carts. All that is needed to communicate the deletion of a saved cart to SAP Hybris Marketing is the cart’s ID. Hence, getItemStoreFunction() does the following:
      protected Optional<Function<CartModel, String>> getItemStoreFunction()
          return Optional.of(CartModel::getCode);
    • getItemRestoreFunction() is where you provide the function that initializes the restored object. The restored object’s fields are mapped to OData field names in the sync service method convertModelDeletedToMap(…). Please note that the restored object is only needed for the mapping to OData; it is not persisted in SAP Hybris Commerce. For saved carts, getItemRestoreFunction() does the following:
      protected Optional<BiConsumer<CartModel, String>> getItemRestoreFunction()
        return Optional.of(CartModel::setCode);

If you extend AbstractChildSyncJob, you may need to override some or all of the following methods in addition to the methods described above.

  • getChildClass() is where you provide the model class for the child item type. This method is mandatory. For orders, the method is as follows:
    protected Class<OrderEntryModel> getChildClass()
        return OrderEntryModel.class;
  • getParentFunction() is where you provide the function that returns the parent of the child item. This method is mandatory. For orders, the method is as follows:
    protected Function<OrderEntryModel, OrderModel> getParentFunction()
        return OrderEntryModel::getOrder;
  • getChildStreamConfigurationItemSelector(…) is where you provide the search criteria for the child. For saved carts, the method is as follows:
    protected Optional<String> getChildStreamConfigurationItemSelector(SyncCronJobModel cronJob)
        return Optional.of("{item.order} IN ({{ SELECT {} FROM {Cart AS c} WHERE {c.saveTime} IS NOT NULL }})");

Adding a New Sync Service
The sync service is configured for a specific SAP Hybris Marketing OData service. This is specified in the bean definition of the sync service in sapymktsync-spring.xml:

<bean id="ymktCustomerSyncService" class="" parent="ymktAbstractSyncService">
    <property name="ODataService" ref="ODataService_CUAN_IMPORT_SRV" />
<bean id="ymktOrderSyncService" class="" parent="ymktAbstractSyncService">
    <property name="ODataService" ref="ODataService_CUAN_BUSINESS_DOCUMENT_IMP_SRV" />

Notice that the customer sync service uses a different OData service than the order sync service.

If you’re using OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV, extend AbstractBusinessDocSyncService.

If you’re using OData service CUAN_IMPORT_SRV, or if you’re using an OData service whose root entity is like the ‘ImportHeader’ in CUAN_IMPORT_SRV, extend AbstractImportHeaderSyncService.

Otherwise, you can extend AbstractSyncService.

In all cases, the sync service is responsible for mapping the fields of SAP Hybris Commerce items (instances of ItemModel) to OData field names. This is done in method convertModelToMap(…). The sync service is also responsible for sending the maps returned by convertModelToMap(…) to the SAP Hybris Marketing system. This is done in method sendModels(…).

After you’re done creating your new sync job and new sync service, you must declare the corresponding beans in sapymktsync-spring.xml. For example:

<!-- Category -->
<bean id="ymktCategorySyncService" class="" parent="ymktAbstractSyncService">
    <property name="ODataService" ref="ODataService_CUAN_IMPORT_SRV" />

<bean id="ymktCategorySyncJob" class="" parent="ymktAbstractSyncJob">
    <property name="syncService" ref="ymktCategorySyncService" />

You must also specify the cronjob that runs your sync job in projectdataConfig.impex. For example:

INSERT_UPDATE SyncCronJob ; code[unique=true]        ; job(code)                 ; catalogVersion(catalog(id), version) ; sessionLanguage(isocode)
                          ; ymktCategoryCronJob      ; ymktCategorySyncJob       ; Default:Staged                       ; en

The ImpEx file will be imported when you update your SAP Hybris Commerce server.


And that’s it! You’re now ready to hop on the Expressway!


Product Owner: Emmanuel Piochon (

Main Developer: Robin Vezina (

Developer: Christos Nikolakakis (

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Erik Johnson

    Why did the product team choose to go this route? We have several methods now, click stream, data hub and now express way. Personally I like this method — except for large commerce implementations.

  2. Bhanu Bhonagiri

    Great article Chris!

    I just have one question, as to how Expressway is different/superior compared to the Data hub integration which is OOTB


  3. Shib Golder

    Good One Chris !! Nice Article..

    Some questions as follows,

    1. So, going forward, Expressway would be the defecto for Point to Point integration via SAP CP Integration for SAP hybris commerce. Is this understanding correct?
    2. What will happen to Data hub, will that be deprecated going forward? Keeping in mind there are lot OOTB implementations (IDOC to Raw model conversions etc ) supported for talking to SAP backend system.
    3. Will SAP CP Integration be treated as the enterprise level integration platform for all talking to all SAP backend systems?






    1. Emmanuel Piochon

      Hi Shib,

      thanks for your questions. Expressway is an alternative for pushing data from Hybris Commerce to Hybris Marketing integration. The direction here is very important. Given the nature of both the sender and receiver, we believe Expressway is the optimal solution in some cases. However, the situation is different for other backend SAP systems, which are the original systems for a lot of data that Commerce is using. For that, the challenges are different and so the solution will be different too.

      SAP Cloud Platform Integration will definitely play a key role in the ecosystem in the months to come, and for Commerce to Marketing it is a perfect fit. So our recommendation will be to leverage SCPI as a middleware in between, even though the point-to-point option would be possible too.


      1. Damian Deßler

        Hi Emmanuel,

        you may have be right, but the current omnichannel architecture “as is” has a lot of different integration scenarios an both partners and customers are now used to use HCI, SAP PI, DataHub etc. and now an additional one. it gets more and more complex.

        Is Expressway for free or part of a license or do we need to license it in the next integration projects seperately?


        1. Robin Vezina

          Hi Damian,


          The scenarios running on HCI (SAP HANA Cloud Integration) can be bundled and ran on a PI (SAP Process Orchestration).


          I would remind you that HCI is optional. Expressway on ECP can communicate directly to yMKT the same way it is done at runtime for product recommendation, offers, segmentation, clickstream, ect. With Expressway, the complete set of integrations between ECP and yMKT can now run without any middlewares.


          Expressway is not a new middleware, it mainly includes a re-written extension of commerce (ECP extension sapymktsync). Instead of re-using the ECP extension y2ysync, it directly consumes deltadetection and provides its own cronjobs on ECP.


          The zip available from this blog is free.
          The name Expressway is a PoC project. Within ECP release, it will simply replace its predecessor implementation which was using y2ysync and Data Hub for the same integration scenarios.



  4. Sun Ho Kim

    Hi Emmanuel,

    Very useful article indeed. Appreciate that.

    Seems like most things are done in yCommerce. Will there be extra job needed in yMkt end?


    Best Regards,



Leave a Reply