Happy Business Starts Here

Master

Can QuoteRulesEnginePlugin know the previous state of charges?

Hi - I'm looking into the QuoteRulesEnginePlugin to try and make quantities on all charges in a rate plan be the same - i.e. if someone changes one charge to quantity 5 I want the others to also change to 5.

I've got my code so that I can update all rows to the same - BUT i'm not sure if I can know which one changed - i.e. I have to pick the first and force them all to that.

 

I can probably go with that, but it would be nicer if I can compare the previous values to the current ones, see which changed and use that new value on all of them.

6 REPLIES 6
Zuora Alumni

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

Take a look at the Javascript Plugin I believe that has the functionality you are looking for.

Master

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

Thanks. I had looked at that, but when using the JS plugin I seem to only be able to affect the value that comes in and not change the other ones. So there i can detect the change, but all I can do is really change it back to keep them all the same.

Support SME

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

Hi @Nigel  Starting from ZQuote 9.1.1 release, you should be able to access the originalChargeGroup field of a charge group passed into the QuoteRulesEnginePlugin. Can you please try to see if this  meets your use case

 

Thank you

Doyeli





SigNowBlue.png

 


If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Master

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

@doyeli Thanks for the pointer I did recall seeing that at one point then forgot about it.  However I just tried again and it seems originalChargeGroup is set to null every time - this was making a "new" quote. Even when making an edit to a field it still comes through as null on the next call.

Support SME

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

HI @Nigel Sorry, I think I did not understand the requirement right. originalChargeGroup  property returns the original subscription charges. So i believe it will return value during Amendment Quote flow. Does it return a value for Amendment Quote flow?

I have confirmation from another customer who could use it from QuoteRuleEngine plugin class  for amendment quote flow 

 

Thank you
Doyeli





SigNowBlue.png

 


If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Master

Re: Can QuoteRulesEnginePlugin know the previous state of charges?

It might do - but I need it on a New workflow as well. I.e. someone makes a new quoteand the quantities are 1.  Then they change one to 4 - i need to know which one changed so I can make them all 4.  Then one is changed to 3 - again same issue.  Even on an amendment there may be mutiple changes so knowing the previous subscription value may not help.