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?
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.
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.