Happy Business Starts Here

Highlighted
Valued Scholar

Generate Invoice task Workflow error

Hi we are getting this error in Generate Invoice Workflow Task

(1x) - INVALID_VALUE::The invoice will not be generated because there are no charges due on this account.

We have a usage in pending status under the account and we configured the charges as On Demand.

This is the create usage XML Request

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:api="http://api.zuora.com/" xmlns:ns1="http://api.zuora.com/">
<SOAP-ENV:Header>
<ns1Smiley FrustratedessionHeader>
<ns1:session/>
</ns1Smiley FrustratedessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:create>
<ns1:zObjects xsi:type="ns2:Usage">
<ns2:UOM>kWh</ns2:UOM>
<ns2:kWh__c>9.95</ns2:kWh__c>
<ns2:Quantity>2.985</ns2:Quantity>
<ns2:AccountId>8a28828dxxxxx016bfc6xxxxx70</ns2:AccountId>
<ns2Smiley Very Happyescription>xxxx</ns2Smiley Very Happyescription>
<ns2:EndDateTime>2019-09-01T10:23:30</ns2:EndDateTime>
<ns2Smiley TongueromokWh__c>0</ns2Smiley TongueromokWh__c>
<ns2:TotalkWh__c>9.95</ns2:TotalkWh__c>
<ns2:ChargeNumber>C-0000xxxx</ns2:ChargeNumber>
<ns2Smiley FrustratedtartDateTime>2019-08-28T06:20:35</ns2Smiley FrustratedtartDateTime>
<ns2:IncludedkWh__c>0</ns2:IncludedkWh__c>
<ns2:ChargeEndTime__c>2019-09-01T10:23:30</ns2:ChargeEndTime__c>
<ns2Smiley Very HappyiscountedkWh__c>0.0</ns2Smiley Very HappyiscountedkWh__c>
<ns2:LastModifiedBy__c>WF-xxxx-00000xxx</ns2:LastModifiedBy__c>
<ns2:ChargeStartTime__c>2019-08-28T06:20:35</ns2:ChargeStartTime__c>
<ns2Smiley FrustratedubscriptionNumber>A-S00000xxx</ns2Smiley FrustratedubscriptionNumber>
<ns2Smiley TonguericePerkilowatt__c>0.30</ns2Smiley TonguericePerkilowatt__c>
<ns2Smiley Very HappyiscountPercentage__c>0</ns2Smiley Very HappyiscountPercentage__c>
<ns2:ChargingStationType__c>Quick_BAMSA</ns2:ChargingStationType__c>
<ns2:ChargingStationNumber__c>xxxxxx</ns2:ChargingStationNumber__c>
</ns1:zObjects>
</ns1:create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Generate invoice XML Request

 

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:api="http://api.zuora.com/" xmlns:ns1="http://api.zuora.com/">
<SOAP-ENV:Header>
<ns1Smiley FrustratedessionHeader>
<ns1:session/>
</ns1Smiley FrustratedessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:generate>
<ns1:zObjects xsi:type="ns2:Invoice">
<ns2:AccountId>8a2882xxxxxx6xxxx270</ns2:AccountId>
<ns2:IncludesOneTime>false</ns2:IncludesOneTime>
<ns2:IncludesRecurring>false</ns2:IncludesRecurring>
<ns2:IncludesUsage>true</ns2:IncludesUsage>
<ns2:InvoiceDate>2019-09-18</ns2:InvoiceDate>
<ns2:TargetDate>2019-09-19</ns2:TargetDate>
</ns1:zObjects>
</ns1:generate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Generate Invoice XML Response

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:generateResponse xmlns:ns1="http://api.zuora.com/">
<ns1:result>
<ns1:Errors>
<ns1:Code>INVALID_VALUE</ns1:Code>
<ns1:Message>The invoice will not be generated because there are no charges due on this account.</ns1:Message>
</ns1:Errors>
<ns1Smiley Frustrateduccess>false</ns1Smiley Frustrateduccess>
</ns1:result>
</ns1:generateResponse>
</soapenv:Body>
</soapenv:Envelope>

 

How can we solve this?

 

Thanks in advance