Happy Business Starts Here

Master

Is it possible to create a formula to reference quantity?

Every time I try to create a formula referencing the quantity, it will either not update or fail (Field zqu__Quantity__c may not be used in this type of formula).  I've tried the process builder, workflows and custom fields.  Is there a reason why I cannot reference the quantity in any formula?  Is Apex required?

8 REPLIES 8
Zuora Staff

Re: Is it possible to create a formula to reference quantity?

What is it that you are interested in building? Take a look at the Zuora CPQ Rules engine.  You should be able to leverage quantity using our rules engine and also have the ability to perform calculations.

 

https://knowledgecenter.zuora.com/CA_Commerce/C_Zuora_Quotes/E_Zuora_Rules_Engine

Highlighted
Master

Re: Is it possible to create a formula to reference quantity?

I'm trying to update zqu__QuoteRatePlanCharge__c.zqu__Quantity__c with the value of zqu__QuoteRatePlanCharge__c.New_Quantity__c when zqu__Quote__c.Quantity_Updated__c (checkbox) = true.

I setup the "Calculated Values" function to have zqu__QuoteRatePlanCharge__c.New_Quantity__c = zqu__QuoteRatePlanCharge__c.zqu__Quantity__c + zqu__QuoteRatePlanCharge__c.Spend_Qty__c, but I am unsure of how to setup the rule of only updating zqu__QuoteRatePlanCharge__c.zqu__Quantity__c when the box is checked.

Valued Scholar

Re: Is it possible to create a formula to reference quantity?

Are you not able to use zqu__Quote__c.Quantity_Updated__c in an IF statement?

Master

Re: Is it possible to create a formula to reference quantity?

I assume I'm supposed to do that in Rules? Everytime I try and do quantity updates using the default Salesforce workflows, it doesn't make any updates.  This is what I see in Rules:

Show Validation Message
Add Product
Remove Product
Update Product
Custom Action

Custom Action doesn't provide an option to create a formula.

Zuora Staff

Re: Is it possible to create a formula to reference quantity?

The reason I inquired about your requirements was to understand more of what you were trying to do. You can use the Rules Engine to calculate and update quantities. Taking a look, you should also be able to leverage Process Builder for what you want to do. You will leverage the Quote Rate Plan Charge's to filter and set the update action on the quantity field. Sample screenshot attached.

PB.JPG
Master

Re: Is it possible to create a formula to reference quantity?

One of the issues I'm having is updating the value of zqu__QuoteRatePlanCharge__c.New_Quantity__c.  I cannot update this value in the process builder.  Every time I try, it doesn't actually make updates.

Zuora Staff

Re: Is it possible to create a formula to reference quantity?

From what it sounds like, the field(s) are available but not updating. Based on this, I'd recommend reaching out to our support team to help look into this further.  They can be reached by submitting a ticket via our support portal.

 

https://support.zuora.com

Master

Re: Is it possible to create a formula to reference quantity?

So I can't use Calculated Values to calculate zqu__QuoteRatePlanCharge__c.New_Quantity__c?