We read inventory through the API (/goapis/api/v1/parts/list) and calculate available as qoh_cache − qr_cache.
When a new allocation is made, for example a sales order line for a stock part that hasn’t been picked yet, Reserved updates straight away in the UI and in /parts/ajax_part_info. qr_cache on parts/list keeps the old value until the part is recached, either with the Recache button on the part page or, as far as we can tell, overnight. Until then our available quantity is higher than what Cetec shows.
Example from a test environment: Reserved was 230 in both places. After adding a 17-unit order line, ajax_part_info showed 247 while qr_cache stayed at 230. Clicking Recache moved qr_cache to 247.
Right now we work around it by calling ajax_part_info for each part with open demand, but that’s hundreds of calls per sync. Questions:
- Is there a way to trigger a part recache through the API with a preshared token, ideally in bulk (all parts, or all parts whose allocations changed)? We couldn’t find one in either documentation portal.
- If not, could
qr_cachebe refreshed when an allocation changes? - When does the scheduled recache run, so we can time our sync after it?
Thanks!