Invoice

Represents a financial document describing the total amount a buyer must pay for goods or services provided.

Users can edit non-posted invoices. Posted invoices can’t be deleted. After an invoice is posted, users can make payments against it to reduce its balance.

Introduced in API version 48.0.

describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update()

  • This object is available with Salesforce Order Management or D2C Commerce license, and Billing (Revenue Cloud). A few fields require Commerce Subscriptions to be enabled. These fields are available only in Lightning Experience.
  • For information about this object that’s available with Billing (Revenue Cloud), including its special access rules, see the Revenue Cloud Developer Guide.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 53.0
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The outstanding balance for this invoice. Equal to the invoice’s total amount with tax, ignoring payments and adjustments.
  • Type: double
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 65.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description:

    Inherited from the account’s Bill to Account.

    This field is a relationship field.

  • Relationship name: BillToContact

  • Relationship type: relationship

  • Refers to: Contact

  • Type: reference

  • Properties: Create, Filter, Group, Sort, Update

  • Description:

    The customer account for this invoice.

    This field is a relationship field.

  • Relationship name: BillingAccount

  • Relationship type: relationship

  • Refers to: Account

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 66.0

  • Relationship name: BillingArrangement

  • Relationship type: relationship

  • Refers to: BillingArrangement

  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort
  • Introduced: API version 66.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 66.0

  • Relationship name: BillingProfile

  • Relationship type: relationship

  • Refers to: BillingAccount

  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 56.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 56.0

  • Relationship name: CollectionUser

  • Relationship type: relationship

  • Refers to: User

  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 63.0
  • Type: date
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 63.0
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 63.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 63.0
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Nillable, Sort
  • Introduced: API version 66.0
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 53.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 67.0
  • Type: int

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 55.0

  • Description:

    Number of days since the invoice was created before it was paid.

    This field is a calculated field.

  • Type: int

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 55.0

  • Description:

    Number of days since the date when payment was due.

    This field is a calculated field.

  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 67.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Users can add more information about this invoice. Maximum of 1,000 characters.
  • Type: string
  • Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
  • Description: The system-generated number that is used to organize financial documents. The number can be sequential or random.
  • Type: date
  • Properties: Create, Filter, Group, Sort, Update
  • Description: The customer must pay the invoice by the due date. Unpaid invoices past the due date can be sent to collections.
  • Type: date
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 55.0
  • Description: Date when the invoice is paid in full.
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: date
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Nillable, Sort
  • Introduced: API version 54.0
  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 60.0

  • Relationship name: InvBatchDraftToPostedRun

  • Relationship type: relationship

  • Refers to: InvBatchDraftToPostedRun

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 54.0

  • Description:

    Id of the invoice batch run that generated this invoice.

    This field is a relationship field.

  • Relationship name: InvoiceBatchRun

  • Relationship type: relationship

  • Refers to: InvoiceBatchRun

  • Type: date
  • Properties: Create, Filter, Group, Sort, Update
  • Description: The date that the invoice was posted. Used with payment terms to determine the invoice’s DueDate. For example, an invoice with an InvoiceDate of 04/01 and Net 30 payment terms has a DueDate of 05/01.
  • Type: datetime
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 61.0
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Nillable, Sort, Update
  • Description: System-created unique ID for this invoice.
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Nillable, Sort
  • Introduced: API version 62.0
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort
  • Introduced: API version 63.0
  • Type: boolean

  • Properties: Defaulted on create, Filter, Group, Sort, Update

  • Introduced: API version 61.0

  • Default value: false

  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 65.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 65.0

  • Relationship name: LegalEntityAccountingPeriod

  • Relationship type: relationship

  • Refers to: LegalEntyAccountingPeriod

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 65.0

  • Relationship name: LegalEntity

  • Relationship type: relationship

  • Refers to: LegalEntity

  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 52.0

  • Description:

    Represents the net credits applied to an invoice. Calculated by subtracting the sum of all unapplied lines from the sum of all applied lines.

    This field is a calculated field.

  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 52.0

  • Description:

    Represents net payments applied to an invoice. Calculated by subtracting the sum of unapplied payments from the sum of payments applied to the invoice.

    This field is a calculated field.

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 67.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 63.0
  • Description: The reason for skipping creation of payment schedules and payment schedule items for the invoice. This field is only available if Commerce Subscriptions is enabled for your org.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 67.0

  • Relationship name: PaymentSchedule

  • Relationship type: relationship

  • Refers to: PaymentSchedule

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 55.0

  • Description:

    ID of the payment term used on this invoice.

    This field is a relationship field.

  • Relationship name: PaymentTerm

  • Relationship type: relationship

  • Refers to: PaymentTerm

  • Type: date
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 60.0
  • Description: The date the invoice was posted.
  • Type: reference

  • Properties: Filter, Group, Nillable, Sort, Update

  • Description:

    The ID of the order or order summary that created this invoice.

    This field is a polymorphic relationship field.

  • Relationship name: ReferenceEntity

  • Relationship type: polymorphic

  • Refers to: CreditMemo, DebitMemo, Order, OrderSummary, RegulatoryTrxnFee

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 63.0

  • Relationship name: SavedPaymentMethod

  • Relationship type: relationship

  • Refers to: SavedPaymentMethod

  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 65.0

  • Relationship name: SequencePolicy

  • Relationship type: relationship

  • Refers to: SequencePolicy

  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 62.0
  • Type: picklist

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 55.0

  • Description:

    The state of the invoice’s payment.

    This field is available when Subscription Management is enabled.

  • Possible values:

    • Not Applicable — Not Applicable
    • Not Settled — Not Settled
    • Partially Settled — Partially Settled
    • Settled — Settled
  • Type: boolean
  • Properties: Defaulted on create, Filter, Group, Sort
  • Introduced: API version 63.0
  • Description: Required. Indicates whether to skip creating payment schedules and payment schedule items for the invoice (true) or not (false). The default value is false. This field is only available if Commerce Subscriptions is enabled for your org.
  • Default value: false
  • Type: picklist
  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update
  • Description: The state of the invoice.
  • Possible values:
    • Canceled — Canceled — Indicates that the invoice was generated and later canceled.
    • Draft — Draft — Indicates that the invoice is a draft. Available in API version 60.0 and later.
    • Draft In Progress — Draft In Progress — Indicates that the draft invoice is in progress. Available in API version 60.0 and later.
    • Error — Error — Indicates that an error occurred when processing the invoice.
    • Pending — Pending — Indicates that the invoice is being processed.
    • Posted — Posted — Indicates that the invoice has been generated and sent to the customer.
    • Posting In Progress — Posting In Progress — Indicates that the invoice posting is in progress. Available in API version 60.0 and later.
    • Void In Progress — Void In Progress — Indicates that the invoice is pending a status change.
    • Voided — Voided — The invoice’s status after the API successfully voids the invoice.
  • Type: picklist

  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

  • Introduced: API version 49.0

  • Description:

    The system used to handle tax on the original Order associated with the Invoice. Gross usually applies to taxes like value-added tax (VAT), and Net usually applies to taxes like sales tax. This field is available when Order Management or B2B Commerce is enabled.

    Possible values are:

    • Gross: Displays most prices and taxes as combined values
    • Net: Displays most prices and taxes as separate values

    This field is available in API version 56.0 and later.

  • Possible values:

    • Gross: Displays most prices and taxes as combined values — Gross: Displays most prices and taxes as combined values
    • Net: Displays most prices and taxes as separate values — Net: Displays most prices and taxes as separate values
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The sum of the invoice’s adjustment line amounts.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 49.0
  • Description: The sum of the amount fields on the invoice’s adjustment-type invoice lines, including tax.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 49.0
  • Description: The total amount of tax applied to the invoice line’s adjustment lines.
  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Description:

    The sum TotalAmount values on the invoice’s lines.

    This field is a calculated field.

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The sum of TotalAmountWithTax values on the invoice’s lines.
  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Description:

    The sum of the invoice’s charges.

    This field is a calculated field.

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 49.0
  • Description: The sum of the amount fields on the invoice’s charge-type invoice lines, including tax.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 49.0
  • Description: The total amount of tax applied to the invoice’s charge lines.
  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 56.0

  • Description:

    The sum of all negative invoice lines that were converted to a credit memo. For example, if one negative invoice line was for -$10 and one was for -$15, the total amount that’s converted to a credit memo is -$25.

    This field is a calculated field.

    This field is available when Subscription Management is enabled.

  • Type: currency

  • Properties: Filter, Nillable, Sort

  • Description:

    The sum of TaxAmount values on the invoice lines.

    This field is a calculated field.

  • Type: currency
  • Properties: Create, Filter, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Filter, Group, idLookup, Nillable, Sort
  • Introduced: API version 63.0
  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 64.0
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 64.0
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 64.0

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.