Hi everyone ! I'm resurrecting this post because I'm now facing the count_mismatch error once again.
Previously, I was trying to group products with their variants to do batch inventory update. With Scott's help above, it worked fine. I had 42 products (some with or without variants) and a return from my Magento API that was acknowledging 42 bulk updates tasks.
Now, I'm back in this flow to try to reduce my number of bulk update tasks to 1 per page of data. Sadly, this means that request_items will now only list one bulk update task per page. This triggers Celigo's count_mistmatch error again
Here's what my original data looks like
{
"batch_of_records": [
{
"record": {
"variants": [
{
"variant_id": 40162751840304,
"inventory_quantity": 4
}
]
}
},
{
"record": {
"variants": [
{
"variant_id": 40162751840304,
"inventory_quantity": 4
}
]
}
},
{
"record": {
"variants": [
{
"variant_id": 40162751840304,
"inventory_quantity": 4
}
]
}
},
{
"record": {
"variants": [
{
"variant_id": 40162751840304,
"inventory_quantity": 4
}
]
}
},
{
"record": {
"variants": [
{
"variant_id": 40162751840304,
"inventory_quantity": 4
}
]
}
}
]
}
Here's how I'm transforming this data
[
{
"sourceItems": [
{
"sku": "2243SH40162751840304",
"source_code": "vendor_source_2243",
"quantity" : 4,
"status": 1
},
{
"sku": "2243SH40162751840304",
"source_code": "vendor_source_2243",
"quantity" : 4,
"status": 1
},
{
"sku": "2243SH40162751840304",
"source_code": "vendor_source_2243",
"quantity" : 4,
"status": 1
},
{
"sku": "2243SH40162751840304",
"source_code": "vendor_source_2243",
"quantity" : 4,
"status": 1
},
{
"sku": "2243SH40162751840304",
"source_code": "vendor_source_2243",
"quantity" : 4,
"status": 1
}
]
}
]
Here's what Magento returns
{
"bulk_uuid": "329f5363-14d2-4405-8231-53fabcdb7004",
"request_items": [
{
"id": 0,
"data_hash": "5da1af4191fdf640ca1a42e985fe6f78a6868eee2e654b25b6c2e9cf18cf1496",
"status": "accepted"
}
],
"errors": false
}
So ! How can I make it so that Celigo stops returning the count_mistmatch error ?