CRM E-Commerce Product Catalog Search Enhancement
E-Commerce product catalog search performs through TREX which is an SAP search engine. CRM product catalog replication process replicates product catalog data into the TREX engine. Product images replicate into the IMAGE server which is configured in XCM scenario. The product catalog search operation performs into the TREX engine not in CRM.
SAP provided some BAdis to add additional attributes to the product catalog data while replicating data into TREX, which helps in maintaining additional attribute information which can be used in searching.
This blog will shed some light on the product catalog search enhancement process to maximize the searching using additional attributes as per the business process. SAP has provided two BADIs to add additional attributes for the product catalog search criteria.
TREX Data Format
The product catalog data is stored in TREX engine in the following format (table). The ID can be anything usually in content management scenario it would be document name and path. In the E-Commerce scenario it is either Product Category Name or Product Number. In the search result it will return the ID. The attribute is the search criteria field name like Product Name, Status ..etc. The VALUE is search criteria value.
Two BADIs are triggered while replicating the catalog data into the Index (TREX) server for each Product Category and Product in the catalog hierarchy. This process will create two different indexes on the TREX server, the Area index contains the Product category information and Area Item index contains the product information. The following steps are necessary to implement the enhancement of product catalog search criteria.
Implement the PCAT_IMS_FEED_ATT BADI to create attributes (NAME, COLOR, STYLE ..etc) on the TREX server at the time of replication. The attribute names should not repeated. The iv_level import parameter in the BADIs indicates on which level (Category, Product) the BADI is triggered.The CL_EX_PCAT_IMS_FEED_ATT class cotains the sample implementation.
Implement the PCAT_IMS_FEED_VAL BADI to assign value for the above added attribute (Clamps, RED, Standard ..etc). For each Product or Category first the attribute BADI will trigger, subsequently, the value assignment BADI will trigger, this sequence will be maintain for each replication. Sample implementation can be found in the CL_EX_PCAT_IMS_FEED_ATT class.
The two BADIs help to replicate additional search criteria data into the TREX engine , if the attributes are not added, then they can not be used in the search. In order to display the newly replicated attributes on the search screen, they have to added to the crm~isa~isacore~resources_en.properties file.
Example: catalog.isa.bigSearch.VENDPARTNUM=Vendor Part Number
E-Commerce product catalog search won’t execute on the CRM Server, it will be executed on the TREX server instead. This process reduces the load on the CRM server. Every time the catalog changes, it has to be replicated (delta) into the TREX server otherwise the TREX won’t be aware of the changes. Since the search framework is driving from CRM (ABAP & Java) side, there is no TREX knowledge required to enhance search criteria.