The scheduled task that creates an inventory file for your web partner failed as part of the usual queue, and now there is no stock in your online channel for web orders. This article describes the workaround that should be applied in this case.
There are multiple reasons why a scheduled task can fail. For example, if you tried running the failed task under the other queue but the file that was generated contains only header tags and running in debug level 6 is giving a message like this:
Stock Total file created as '/procims/CLP001_T_Inventory_Snapshot_20210105020559.xml' but size not determined.
The reason for the failure is the high number of records being processed by the task.
As a workaround, while the issue is investigated and fixed, we can manually populate the Online channel stock status in the DB directly in order to allow the consecutive process, such as exporting the file for third-party consumption can proceed with a better stock picture.
Please create a Customer Support ticket with the description of the issue and logs attached. A Customer Support agent will reach out to you with the solution or workaround.
The agent needs access to the customer's DB.
Previously TM Lewin has faced this issue and the agent used the script below to populate pro.TMP_GAR_CHANNEL_STK table in DB. Use this script as a baseline, adjust if needed and execute in the customer's DB:
-- Populate the Channel back-up table with the stock currently sitting in the CLP001 location
-- for a select number of Stock Types (just those that are channelable and have stock)
-- The channel is hard-coded to ONLINE as this is the only channel that TM Lewin are surrently using
for i in (select
from gar_stk a
and gstock_type in ('CLP-PETE-STK','CLP-SHER-STK','GAR-CUST-ALLOC','GAR-RET-STOCK','RET-ALLOC-STOCK','RETAIL-STOCK')
group by loc_num,
insert into tmp_gar_channel_stk_old
values( 'DD-MMM-YY', -- replace 'DD-MMM-YY' with the current date
-- Now copy the back up table into the live table
for i in (select
from pro.tmp_gar_channel_stk_old a
insert into pro.tmp_gar_channel_stk (in_date,
If the second part of the script fails (copying the backup table into the live table), there are already records in the pro.tmp_gar_channel_stk table. When this happens, all existing records must be removed from pro.tmp_gar_channel_stk and from pro.tmp_gar_channel_stk_old.
After the records have been removed, re-run both scripts.
After manually populating the online channel stock status in the DB directly, you should be able to process orders again and the inventory file should be generated normally during the next task run.