Invoices
Stores invoice header data and totals; includes billing address, due dates, and payment status. Not available in free or standard editions.
Table-Specific Information
Select
This table supports COQL for filtering, meaning that most filters comparing columns to values are submitted server-side.
Insert
INSERT INTO Invoices (Subject, AccountName_Id, InvoicedItems) VALUES ('test2', '1021046000000427106', '[
{
"Product_Name": {
"id": "1021046000000414457"
},
"Quantity": 1024,
"Discount": 12,
"Price_Book_Name": {
"id": "1021366103040414494"
},
"Tax": 0,
"List_Price": 1.21,
"Description": "test desc"
}
]');
Required fields for REST API: Subject, InvoicedItems.
Required fields for BULK API: Subject, InvoicedItems, AccountName_Id.
Any field which is not read-only (ReadOnly = false in the table below) can be inserted.
Please note that the REST API honors only the 'id' field of the 'Product_Name' aggregate in the InvoicedItems column. The BULK API does not accept any other field in this aggregate.
Delete
You must specify the Id in the WHERE clause when executing a delete against this table.
DELETE FROM Invoices WHERE Id = '3152079000000153079'
Update
You must specify the Id in the WHERE clause when executing an update against this table.
UPDATE Invoices SET Description = 'Updated from API' WHERE Id = '3152079000000153079'
Required fields: Id.
Any field which is not read-only (ReadOnly = false in the table below) can be updated.
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Unique identifier for the invoice. |
| InvoiceOwner_Id | String | False |
Unique identifier of the user who owns the invoice. |
| InvoiceOwner_FirstName | String | True |
First name of the user who owns the invoice. |
| InvoiceOwner_LastName | String | True |
Last name of the user who owns the invoice. |
| InvoiceOwner_Email | String | True |
Email address of the user who owns the invoice. |
| InvoiceOwner_Name | String | True |
Full name of the user who owns the invoice. |
| InvoiceNumber | String | True |
The unique number assigned to the invoice. |
| Subject | String | False |
The subject or title of the invoice. |
| SalesOrder_Id | String | False |
Unique identifier of the associated sales order. |
| SalesOrder_Name | String | True |
Name of the associated sales order. |
| InvoiceDate | Date | False |
The date on which the invoice was issued. |
| PurchaseOrder | String | False |
Reference number of the related purchase order. |
| DueDate | Date | False |
The date by which the invoice must be paid. |
| ExciseDuty | Decimal | False |
The excise duty amount applied to the invoice. |
| SalesCommission | Decimal | False |
The sales commission amount related to the invoice. |
| Status | String | False |
Current status of the invoice. |
| AccountName_Id | String | False |
Unique identifier of the account associated with the invoice. |
| AccountName_Name | String | True |
Name of the account associated with the invoice. |
| ContactName_Id | String | False |
Unique identifier of the contact associated with the invoice. |
| ContactName_Name | String | True |
Name of the contact associated with the invoice. |
| CreatedBy_Id | String | False |
Unique identifier of the user who created the invoice. |
| CreatedBy_FirstName | String | True |
First name of the user who created the invoice. |
| CreatedBy_LastName | String | True |
Last name of the user who created the invoice. |
| CreatedBy_Email | String | True |
Email address of the user who created the invoice. |
| CreatedBy_Name | String | True |
Full name of the user who created the invoice. |
| ModifiedBy_Id | String | False |
Unique identifier of the user who last modified the invoice. |
| ModifiedBy_FirstName | String | True |
First name of the user who last modified the invoice. |
| ModifiedBy_LastName | String | True |
Last name of the user who last modified the invoice. |
| ModifiedBy_Email | String | True |
Email address of the user who last modified the invoice. |
| ModifiedBy_Name | String | True |
Full name of the user who last modified the invoice. |
| CreatedTime | Datetime | False |
The date and time when the invoice was created. |
| ModifiedTime | Datetime | False |
The date and time when the invoice was last modified. |
| Tag | String | False |
User-defined tags associated with the invoice. |
| BillingStreet | String | False |
Billing street address. |
| ShippingStreet | String | False |
Shipping street address. |
| BillingCity | String | False |
Billing city. |
| ShippingCity | String | False |
Shipping city. |
| BillingState | String | False |
Billing state. |
| ShippingState | String | False |
Shipping state. |
| BillingCode | String | False |
Billing postal code. |
| ShippingCode | String | False |
Shipping postal code. |
| BillingCountry | String | False |
Billing country. |
| ShippingCountry | String | False |
Shipping country. |
| SubTotal | String | True |
Total amount before applying tax, discount, or adjustments. |
| Discount | Decimal | False |
Discount applied to the invoice. |
| Tax | Decimal | False |
Total tax amount applied to the invoice. |
| Adjustment | Decimal | False |
Any adjustments made to the invoice total. |
| GrandTotal | String | True |
Final total amount after applying discounts, tax, and adjustments. |
| TermsandConditions | String | False |
Terms and conditions related to the invoice. |
| Description | String | False |
Additional notes or description of the invoice. |
| InvoicedItems | String | False |
List of items included in the invoice. |
| DealName_Id | String | False |
Unique identifier of the associated deal. |
| DealName_Name | String | True |
Name of the associated deal. |
| Locked | Bool | True |
Indicates whether the invoice record is locked for editing. |
| LastActivityTime | Datetime | False |
The date and time of the last activity related to the invoice. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| DuplicateCheckFields | String |
The field or fields used for checking duplicate records during upsert operations. |
| Trigger | String |
Triggers the rule when inserting the record into the CRM account. |
| CustomViewId | Long |
The custom view identifier used to filter this record. Works when the useCOQL parameter is set to false. |