Skip to main content

Create a Financial Document for a Sales Opportunity

This service allows you to generate a financial document for a Sales Opportunity, using financial lines previously added to the Sales Opportunity (or a specified subset of financial lines previously added to the Sales Opportunity)

Query String Parameters

NameTypeDescriptionRequired
ActionStringGenerateFinancialDocForSoRequired
SoIdIntSales Opportunity Id targeted for financial doc creationRequired
FinancialDocTypeStringSpecifies the type of financial document to be created. Optional
SiteIdIntContactId for site of target document. If none passed contact for Sales Opportunity is usedOptional
SupplierIdIntContactId for supplier of goods on invoiceOptional
AccountIdIntId of bank account usedOptional
DocIdIntId of pre existing financial doc to updateSee Note 1 below
NominalCodeIdIntId of invoice nominal codeOptional
DepartmentCodeIdIntId of department codeOptional
ReferenceStringInvoice ReferenceOptional
FirstLineStringInvoice first line textOptional
NotesStringInvoice notesOptional
InternalNotesStringInvoice Internal notesOptional
DelayIntPayment terms- i.e. 30 days pass 30Optional
LineItemIdsStringSpecifies which line items are added to the document. Pass multiples in a csv string.See Note 1 Below
AddToGroupBooleanAdds the financial document to the group job (if present). As default if parameter is not passed it will automatically add theOptional

To update existing financial documents the DocId and LineItemsIds can be used in conjunction as below

  • The lineItemIds only refer to line items added to the job in question

  • Update Doc with All items logged on job: Pass a DocId but don’t specify which items you want in the lineItemIds parameter. The service will remove all lines from the financial document then add all the lines logged on the job back Into the doc

  • Update Doc with some items logged against the job: Pass a DocId and specify which items you want in the lineItemIds parameter. The service will remove all lines from the doc and add back, only the lines specified in the lineItemIds from the job back Into the financial document

  • Create a New Financial Document with some items logged on the job: if you don’t specify a DocId but include lineItemIds the specified lines will be added to a new financial Document

  • Create a Financial document with all items logged against a job: If you don’t include either DocId or LineItems a new financial document will be created with all the lines from the job

Response Codes

Example

Request URL

https://webservice.bigchange.com/v01/services.ashx?action=generatefinancialdocforso