Recommended content import

Hello, 

I am still new on this support forum, but I am hoping someone can give me some tips. 

I am evaluating shopware 5 to see if it can meet some demands. 

The products are allready available in a external database / website and we are able to build code to produce xml, csv, json on request. 

We need to ‘inject’ new products, update selling prices (every hour), update descriptions and other related data.

Shopware 5 seems to offer a rest API and an import system. 

The REST api seems to be the best choice. But is this meant for single product updates or can it also handle bulk insertion?

The import mechanism can also be an option, but how to automate this (with external source of data) and bulk updates are likely to be very slow (Or am I wrong here?) 

Direct DB writing requires everything to be exactly the same, and does not feel like the proper way in Shopware 5. (Correct me if I’m wrong here ) 

Retrieving the productdata from the external database within a custom plugin seems possible, does this open other possibillities? 

 

Best regards

 

 

REST-API is the best choice - it has also a batch mode to update or put a bunch of products. API is fine and will cover almost all of your needs. We are using it since years.

I would implement a synchronizer tool with interface for the external database to create the json and handle updates, data checks etc. and have a mirrored data set of the products inside the shopware database in the structure shopware expects using only api.

You can easily use api for bulk insertion as it doesn’t affect th performance and as far as concerned to update after every hour use cron job for in your plugin.By building a customize plugin interface for product import and updation would be better option then directly writing in db.

@steinsoftware schrieb:

REST-API is the best choice - it has also a batch mode to update or put a bunch of products. API is fine and will cover almost all of your needs. We are using it since years.

I would implement a synchronizer tool with interface for the external database to create the json and handle updates, data checks etc. and have a mirrored data set of the products inside the shopware database in the structure shopware expects using only api.

Ok so the REST-API is the way to go, I’ll read the documentation for that and start some trials. 

The second part of your answer is a bit unclear. What I understand from it is that I should build an external tool (synchronizer) that is able to build and validate the required data. And then write the data set into the shopware database using nothing more then the shopware REST-API. This sounds logical, and to be honest this ‚synchronizer‘ tool is allready being developed (side project taking way too long) and is meant as central data store for editing en redistrubution.

@Emaan schrieb:

You can easily use api for bulk insertion as it doesn’t affect th performance and as far as concerned to update after every hour use cron job for in your plugin.By building a customize plugin interface for product import and updation would be better option then directly writing in db.

Ok great bulk insertion with the API. But I guess not the REST-API , which part of the shopware API can handle bulk inserts or updates.

Another question, what if you insert a product of a certain brand/category that is not registered yet, should you pre register/insert the brand/category?