Updating Price when item or quantity changes

Kerry10
Giga Expert

We are in the process of rolling out our hardware catalog, and I noticed an issue once the REQ/RITM/SCTASKS are created. If the item that the RITM references is changed, or if the quantity is changed, the price on the RITM does not update. 

 

I figure I can make a custom business rule to fix this, but it seems odd to me that this is not out of the box functionality. Am I missing a setting somewhere? Should I not be updating the quantity after the REQ comes in? Is there a reason this is not OOB?

6 REPLIES 6

SanjivMeher
Kilo Patron
Kilo Patron

The RITM doesn't store the total price. It stores just the item price that has been ordered and the quantity.

Changing quantity should already be updating the price in the request using 'Reduce request price - item change' BR.

But I am not sure, how you can change the item referenced in the RITM. Because every item catalog has its own variables and logic. You should cancel the order and request a new item. 

But you still want to do that, you will have to add a custom business rule to re-calculate the price.


Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,

 

All of our items have the same workflow. I created a BR to update the price when the item changed.

 

One thing I noticed about the 'Reduce request price - item change' BR is that it does not reduce the REQ price when an item is cancelled. Do you know why this is?

 

thanks

 

 

You may need to following marked in bold. I think SNC.Request doesn't check for item being getting cancelled and SNC.Request is not exposed to us. So we dont know, what conditions is checked inside it.

 

function onAfter(current, previous) {
var request = new SNC.Request(current.request.sys_id + "", previous, current);
if (request || current.state=='<state value of cancelled>')
request.recalculateAllPrices();
}


Please mark this response as correct or helpful if it assisted you with your question.

Hi Kerry,

We are looking for a similar requirement to auto-update the price in RITM if the priced variable quantity changes in RITM. Could you please share the custom code that you created to handle this scenario? It would really be of great help.. Thanks in advance!

 

Thanks,

Sathish