Populators, Converters and WsDTO concept in SAP Commerce(Hybris)

Why we need them?

Let’s say we have product table(ProductModel) in the database with 50 fields but we need 10 of them to return to Front end(UI). We call our model source which has all the data from the database and we call target(DTO) the data structure which is subset of the model source and will be passed to UI. We use converters and populators to create a target DTO by converting a source Model object using Populators to populate the DTO.

Steps for defining Converters and Populators(Example with ProductData):

1. Defining data transfer object(DTO).

WsDTO concept

WsDTO is data layer used by version 2 of the REST API in OCC.

  • DEFAULT — medium set of fields defined on the most common use cases.
  • FULL — all fields are returned.
<bean parent="fieldSetLevelMapping" id="productWsDTOFieldSetLevelMapping">
<property name="dtoClass"
<property name="levelMapping">
<entry key="BASIC"
<entry key="DEFAULT"
<entry key="FULL"




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store