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
Name | Type | Description | Required |
---|---|---|---|
Action | String | GenerateFinancialDocForSo | Required |
SoId | Int | Sales Opportunity Id targeted for financial doc creation | Required |
FinancialDocType | String | Specifies the type of financial document to be created. | Optional |
SiteId | Int | ContactId for site of target document. If none passed contact for Sales Opportunity is used | Optional |
SupplierId | Int | ContactId for supplier of goods on invoice | Optional |
AccountId | Int | Id of bank account used | Optional |
DocId | Int | Id of pre existing financial doc to update | See Note 1 below |
NominalCodeId | Int | Id of invoice nominal code | Optional |
DepartmentCodeId | Int | Id of department code | Optional |
Reference | String | Invoice Reference | Optional |
FirstLine | String | Invoice first line text | Optional |
Notes | String | Invoice notes | Optional |
InternalNotes | String | Invoice Internal notes | Optional |
Delay | Int | Payment terms- i.e. 30 days pass 30 | Optional |
LineItemIds | String | Specifies which line items are added to the document. Pass multiples in a csv string. | See Note 1 Below |
AddToGroup | Boolean | Adds the financial document to the group job (if present). As default if parameter is not passed it will automatically add the | Optional |
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
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=generatefinancialdocforso
Response Data
{ "Code": 0, "Result": [ { "JourneyId": "12345", "StartTime": "2024-08-18T08:00:00Z", "EndTime": "2024-08-18T10:00:00Z", "StartLocation": "Location A", "EndLocation": "Location B", "Distance": 25.6, "Unit": "kilometers" } ] }