Product integration, add to category added in BO

I am working on a product import using integration kit and I need to add the imported products to a category created in back office, though these categories do not have an id (by design as I understand it). What would be the best way to solve this? Should I create a custom field on the Category template where the customer could add the category key or is it possible for the customer to set the id on categories in some way?

Litium version: 7.6.1

You can’t set the Category Id from Back office. You can only do that in code.

You can pick up Categories by Localized Name with a dataService, but that’s not the best way ofc.

Or you can create a Category event listener that listens to CategoryCreated and CategoryUpdated where you automaticly set the Id in the code, that way, Categories created in Back office will get an Id.

1 Like

Thank you for your answer. I decided to go with a custom Id field since the customer will need to be able to enter this Id manually to match another system. The category is found in the integration using a data service. Seems to be working, although I would prefer to be able to use the “real” Id field.

Related suggestion: Expose Category Id field in back office | Ideas

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.