Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Move Invoices to Draft

The moveInvoicestoDraft API is used to move one or more invoices from the Approved status back to Draft. This is useful if you need to make corrections or adjustments to invoices that have already been approved, but not yet paid or credited.

APISignature
moveInvoicestoDraftstatic List moveInvoicestoDraft(Set invoiceIds)
When you call the API and input a set of invoice IDs, the API:
  • Validates each invoice in the set.
  • The status of the invoice and all its line items changes to Draft.
  • The status of all billing schedules and usage schedules related to the invoice line items changes to Pending Invoiced.
  • The remaining billable amount on the asset line item is recomputed.
  • The billing schedules can be invoiced again if needed
  • Return a list of results, one for each invoice, indicating success or failure for each attempt.

Request Parameters

FieldTypeRequiredDescription
invoiceIdsSetYesA set of Invoice record IDs you want to move to Draft status.

Response

FieldTypeDescription
CustomClass.InvoiceActionResultListA result parameter is returned for each request parameter.

Code Sample - Request

Set<Id> invoiceIds = new Set<Id>();
invoiceIds.add('a5TDc00000161lB'); 
List<Apttus_Billing.CustomClass.InvoiceActionResult> moveInvoicestoDraft = 
Apttus_Billing.InvoiceService.moveInvoicestoDraft(invoiceIds);
System.debug('-moveInvoicestoDraft-'+moveInvoicestoDraft);

Code Sample - Response

moveInvoicestoDraft-(null, null, InvoiceActionResult:[invoiceId=a5TDc00000161mlMAA, isSuccess=true, message=Invoice has been Moved to Draft status.], InvoiceActionResult:[invoiceId=a5TDc00000161mmMAA, isSuccess=true, message=Invoice has been Moved to Draft status.])