Three Useful GitHub Repos That Every SAP Commerce Developer Should Consider

Flexible Search Builder

License: MIT
Key contributor: Andrii Andriichuk

Flexible Search Builder is a library to take the pain out of generating Flexiblesearch queries in the SAP Commerce code. You can wrap the queries within very lightweight and easy to use Java objects which follow the “builder” paradigm. It helps you to keep you from making foolish errors and make the code nicer and easier to read.

The elements of the builder chain are immutable (unless you pass a mutable parameter and then modify it), thus they can be safely reused among different queries.

Below are some examples of how it works:

final FlexibleSearchQuery query4 =
    FieldWithType.of(ProductModel.NAME, String.class),
    FieldWithType.of(ProductModel.DESCRIPTION, String.class),
    FieldWithType.of(ProductModel.PK, Long.class)
  condition(ProductModel.SUMMARY, IS_NULL)
  .condition(ProductModel.NAME, IS_NOT_NULL)
.condition(ProductModel.PK, BETWEEN, 8796093054977L, 8796193054977L)

The code is basically self-explaining. The library supports grouping, joins, aliases.

final JoinOnElement joinTables =
     .on(r.source(), e.field(PRODUCT))
     .on(, e.field(ORDER))
     .on(, c2p.source());

See more examples in the README in the root folder.





License: Apache License 2.0
Key contributor: Markus Perndorfer

How to figure out what branch was deployed to the environment if all you have is web access to the storefront and backoffice?

This small extension helps to see what version is deployed to a given environment. During the build process, the version metadata from GIT, such as branch id, commit id, and tag, are saved and accessible from HAC.


License: Apache License 2.0
Key contributor: Klaus Hauschild

JHac is a console tool and API for HAC. You can execute code, query, and import data using the API and via an app which you can put inside your automation or integration scripts.

For example, using the following script you can execute a custom code via Groovy Scripting Console available in HAC.

    "spring.beanDefinitionNames.each {\n"
    + " println it\n"
    + "}\n"
    + "return \"Groovy Rocks!\"")

The following script shows how to fetch data via API:

   .flexibleSearchQuery("SELECT * FROM { Product }")

You can also run the impex script:

    "INSERT_UPDATE user; uid[unique = true]\n"
    + "; admin")
Or export data:

  .scriptContent("INSERT_UPDATE user; uid[unique = true]")

There is a CLI app built on top of the API which is ready out-of-the-box for some of the operations listed above.

Right now the client app doesn’t support FlexibleSearch yet, but I see from the code that it is trivial to add — contribute! Currently, it supports Groovy, which is basically enough to simulate Flexible Search, Impex Import, and Impex Export.

Other useful repos



The automation tool from SAP for automating SAP Commerce Cloud build and deployment mechanisms. SAP recently announced the API for the purpose, so it seems that this tool is no longer relevant (?).

SAP Commerce IntelliJ Idea Plugin


SAP Commerce/Hybris Integration Intellij IDEA Plugin from Alexander Bartash. This plugin was originally released under GPL 3.0, so this repository contains an open-source fork. The commercial version is available here: 

The open-source version is also available in the jetbrains marketplace (free): 

Hybris Commerce Eclipse Plugin


This plugin takes care of some of the common issues of developing with the SAP Commerce Suite, such as automating importing source code, synchronizing working sets with localextensions, providing an Impex editor, etc. 

Leave a Reply