Happy Business Starts Here

Master

Quantity exceeds the charge's min quantity 1.00000

Hi - we're getting this error  Error on zCharge: One Time Licence Cost, Details: Quantity exceeds the charge's min quantity 1.0000000  when adding some products into a quote.

 

I searched and found https://community.zuora.com/t5/Zuora-CPQ/Quantity-exceeds-the-charge-s-min-quantity/td-p/17478 which gave me a hint as to where to look.

 

In Salesforce if I look at the charges of a product that works then the default quantity (zqu__defaultQuantity__c) is not set (i.e. null) and on one that doesn't work it's set to 0.0.

 

The difference is that the working product was made by the UI and the broken one was made via the API.  But - if I look at these in Zuora UI or get them from the API they look the same (defaultQuantity is null in the JSON from the API )

 

Two questions:

  1. Can I see / change a default quantity in the Zuora UI for charges?
  2. If they are both set to null in Zuora - why are they different in Salesforce?
13 REPLIES 13
Support SME

Re: Quantity exceeds the charge's min quantity 1.00000

Hi @Nigel, As you have already found out, this is exactly why the error is thrown for those charges.

Can you please perform a Data Source (under reporting) starting from Product Rate Plan charge Object on Zuora and see what the Default Quantity field value is for those charges?

 

 

datasource.PNG

 

 

Thank you

Doyeli






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: Quantity exceeds the charge's min quantity 1.00000

@doyeli It was showing as 0 in that report - but the ones we'd put in via the UI were blank - which is consistent with what we saw in Salesforce. 

 

Oddly when I got the product via the API the all came out as null.  We think we know what happened with our load, so we can re-run our load process and just set the all to 1. 

 

Just to check - I'm not missing a way we can see this in the UI am I?

Zuora Support

Re: Quantity exceeds the charge's min quantity 1.00000

@NigelIf you don't explicitly set the default quantity in api, it's set to 0, hence as a workaround you need to populate default to 1 when setting up charge though api in zuora.






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

Honor Student

Re: Quantity exceeds the charge's min quantity 1.00000

I'm working with Nigel on this issue.  Thanks everyone for the feedback so far.

 

We're populating the Product Rate Plan and Charges through the https://rest.sandbox.eu.zuora.com/v1/action/create endpoint.

 

We've tried explicitly setting the DefaultQuantity value, however the result is always the same (set to 0) when queried through the Zuora reporting or examining the Salesforce object.  We're puzzled why through the UI is always gets set to blank whereas through the API it's always 0.

 

It might be that we're doing something wrong at creation time.  An example JSON post is as follows:

 

 

{
	"type": "ProductRatePlanCharge",
	"objects": [{
		"AccountingCode": "Accounts Receivable",
		"ChargeModel": "Volume Pricing",
		"ChargeType": "OneTime",
		"DefaultQuantity": 1.0,
		"DeferredRevenueAccount": "Accounts Receivable",
		"EndDateCondition": "OneTime",
		"ListPriceBase": "Per Billing Period",
		"Name": "One Time Licence Cost",
		"OverageCalculationOption": "EndOfSmoothingPeriod",
		"OverageUnusedUnitsCreditOption": "NoCredit",
		"PriceChangeOption": "NoChange",
		"PriceIncreasePercentage": 0,
		"ProductRatePlanId": "8adc8f9962ce38e50162d8a785c77a5b",
		"RecognizedRevenueAccount": "Accounts Receivable",
		"RevenueRecognitionRuleName": "Recognize upon invoicing",
		"TaxCode": "Computer Software",
		"TaxMode": "TaxExclusive",
		"Taxable": "True",
		"TriggerEvent": "ContractEffective",
		"UOM": "User",
		"UpToPeriodsType": "Billing Periods",
		"UseTenantDefaultForPriceChange": "True",
		"ProductRatePlanChargeTierData": {
			"ProductRatePlanChargeTier": [{
				"Currency": "EUR",
				"EndingUnit": 4.0,
				"Price": 356.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 1.0
			},
			{
				"Currency": "EUR",
				"EndingUnit": 9.0,
				"Price": 303.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 5.0
			},
			{
				"Currency": "EUR",
				"EndingUnit": 10000.0,
				"Price": 285.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 10.0
			},
			{
				"Currency": "GBP",
				"EndingUnit": 4.0,
				"Price": 284.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 1.0
			},
			{
				"Currency": "GBP",
				"EndingUnit": 9.0,
				"Price": 241.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 5.0
			},
			{
				"Currency": "GBP",
				"EndingUnit": 10000.0,
				"Price": 227.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 10.0
			},
			{
				"Currency": "USD",
				"EndingUnit": 4.0,
				"Price": 396.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 1.0
			},
			{
				"Currency": "USD",
				"EndingUnit": 9.0,
				"Price": 337.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 5.0
			},
			{
				"Currency": "USD",
				"EndingUnit": 10000.0,
				"Price": 317.0,
				"PriceFormat": "Per Unit",
				"StartingUnit": 10.0
			}]
		}
	}]
}

 

Master

Re: Quantity exceeds the charge's min quantity 1.00000

@Jyoti_Sinha Thanks for the information - but as per above ^^ if we try and set it to 1.0 via the the API it still comes out as 0 in the reporting that @doyeli mentioned  (and via the REST GET api still shows as null)

Zuora Support

Re: Quantity exceeds the charge's min quantity 1.00000

@Nigel@iChasney:

 

I checked the details further and carried few tests, the default quantity field is required if you use a per-unit pricing model. Hence, if you are using a charge model: Per-Unit Pricing, the default quantity appears as being defined in the API call. For rest charge models like Volume Pricing here, the values is always set as 0 via an API call.






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: Quantity exceeds the charge's min quantity 1.00000

Thanks @Jyoti_Sinha

If I read that right, we can't set the default quantity on Volume Pricing to 1 via the API, even though the minimum quantity is 1 - therefore those will never work in the quotes UI?

If I make a product via the UI it just leaves default quantity as null.

 

The above just sounds like an bug we should raise via a support ticket correct?

 

 

Highlighted
Zuora Support

Re: Quantity exceeds the charge's min quantity 1.00000

@Nigel we are working on the reported issue with our Engineering team on the reported ticket. We will keep you updated further via same.






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

Savvy Scholar

Re: Quantity exceeds the charge's min quantity 1.00000

hi @Jyoti_Sinha,

 

Is this fixed? We are expeencing the same.

Do we have a workaround?

 

Thanks