Russian  English  All projects

Synchronizing goods in Bitrix24 with XML on PHP



You need to write a script on php that will sync the items in Bitrix24 according to the contents of the XML file.

algorithm:
1. Count XML file (150-200 positions)
2. Count the goods in Bitrix24 (API method is), the number can reach 5,000 (i.e. there are irrelevant/inactive products, this nuance can be discussed)
3. Compare cars by VIN (unique for each position)
4. If the VIN coincided - do nothing
4.1. If there is a VIN in XML and Bitrix24 doesnt have it, you need to create a product (about 5-10 fields)
4.2. If there is a VIN in XML and bitrix24 (with the active field in Bitrix24, i.e. the product is deactivated), you must activate it (crm.product.fields active field).
4.3. If XML does not have the VID that Bitrix24 has (with active field 1, i.e. the product is active), you need to change the activity status of the product, i.e. deactivate it.
5. Report write in file (or database) (date, what is created, what is deleted, what and how updated)

API description dev.1c-bitrix.ru/rest_hel...

An example of what the data looks like is on two screens.

Ive got a good review)

If you do not have reviews, there can be no prepayment, only in fact.
Bots by.
10.05.2021 10:42



 Answers freelancers