Overview
Your daily POLLING job didn't complete correctly and failed to populate the channel with stock so online orders are not flowing. Orders will not have dispatches created correctly until your GOOD stock is back in the ONLINE channel.
Solution
The problem is caused by the situation created by not enough stock. Please reach out to the Support team and provide the job name that failed to complete correctly. We will populate the channel table manually in the DB.
<supportagent>
Notes:
- The agent should have access to the customer's DB.
- The queries will need to be adjusted according to the client's implementation and architecture.
Run the SQL script to populate the channel table:
begin
for i in (select
loc_num, season, sty_num, sty_qual, bf_mat_char_val, sty_size,
sum(tot_item_qty)"SUM_TOT", sum(nvl(qty1,0))"SUM_QTY1",
sum(nvl(qty2,0))"SUM_QTY2", sum(nvl(qty3,0))"SUM_QTY3",
sum(nvl(qty4,0))"SUM_QTY4", sum(nvl(qty5,0))"SUM_QTY5",
sum(nvl(qty6,0))"SUM_QTY6", sum(nvl(qty7,0))"SUM_QTY7",
sum(nvl(qty8,0))"SUM_QTY8", sum(nvl(qty9,0))"SUM_QTY9",
sum(nvl(qty10,0))"SUM_QTY10", sum(nvl(qty11,0))"SUM_QTY11",
sum(nvl(qty12,0))"SUM_QTY12"
from gar_stk a
where loc_num=90020
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, season, sty_num, sty_qual, bf_mat_char_val, sty_size
)
LOOP
insert into tmp_gar_channel_stk_old
values( '28-JUL-21 17:00:00',
'M', i.season, i.sty_num,i.sty_qual, i.bf_mat_char_val, i.sty_size,
i.sum_tot, i.sum_qty1, i.sum_qty2, i.sum_qty3, i.sum_qty4, i.sum_qty5, i.sum_qty6,
i.sum_qty7, i.sum_qty8, i.sum_qty9, i.sum_qty10, i.sum_qty11, i.sum_qty12,
i.loc_num
);
END LOOP;
END;
select sum(tot_qty) from tmp_gar_channel_stk_old where in_date = '28-JUL-21 17:00:00'
commit;
-- Now copy the back up table into the live table
begin
for i in (
select in_date, channel_code, season, sty_num, sty_qual,
bf_mat_char_val, sty_size,
tot_qty, qty1, qty2, qty3, qty4, qty5, qty6,
qty7,qty8, qty9, qty10, qty11, qty12,
loc_num
from pro.tmp_gar_channel_stk_old a
where in_date = '28-JUL-21 17:00:00'
)
LOOP
-- to skip the possible cause of unique record
delete from pro.tmp_gar_channel_stk
where channel_code = i.channel_code
and season = i.season and sty_num = i.sty_num
and sty_qual = i.sty_qual
and bf_mat_char_val = i.bf_mat_char_val
and sty_size = i.sty_size and loc_num = i.loc_num;
insert into pro.tmp_gar_channel_stk (
in_date, channel_code, season, sty_num, sty_qual, bf_mat_char_val,
sty_size, tot_qty, qty1, qty2, qty3, qty4, qty5, qty6, qty7, qty8, qty9, qty10, qty11, qty12, loc_num
)
values (
i.in_date, i.channel_code, i.season, i.sty_num, i.sty_qual, i.bf_mat_char_val, i.sty_size,i.tot_qty,
i.qty1, i.qty2, i.qty3, i.qty4, i.qty5, i.qty6,
i.qty7, i.qty8, i.qty9, i.qty10, i.qty11, i.qty12, i.loc_num
);
END LOOP;
END;
commit;
Testing
Check that the stock in the WS0W is updated using the same calculation as in the script.
</supportagent>
Comments
0 comments
Article is closed for comments.