ExpenseItem

IMPORTANT  The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will be deactivated.

This entity describes a line item associated with an Expense Report entity. It allows expense line items to be created, queried, and updated through the API.

In Autotask, Expense Items can be added to an Expense Report from the Timesheets or Home modules, or a ticket, project, or task.

Entity details

You can also retrieve this information with the Web Services API call The getEntityInfo() SOAP API call.

Entity Name: ExpenseItem
Can Create:
Can Update:
Can Query:
Can Delete:  
Can Have UDFs:  

Fields that cannot be queried

The following fields from this entity will return an error when queried.

  • GLCode
  • Reimbursable
  • Rejected

Conditions and requirements

General

  • create() and update() are allowed only when the associated ExpenseReport has a Status = In Progress or Rejected
  • Special field attributes

    Field Conditions and Requirements
    AccountID

    When a TicketID or ProjectID are set, the AccountID is calculated based on the ticket or project. If you set an AccountID that differs from the calculated AccountID, an error is returned.

    When a TaskID is set, the AccountID and ProjectID are calculated based on the task and associated project. If you set an AccountID or ProjectID that differs from the calculated AccountID and Project ID, an error is returned.

    If no AccountID is supplied, the expense is associated to the "0" account.

    CurrencyID If no CurrencyID is specified, the ExpenseItem will use the Currency associated with the Account associated with ExpenseItem.AccountID.
    Destination, Origin, and Miles Destination, Origin, and Miles are all required when Category = Mileage
    EntertainmentLocation EntertainmentLocation is required when Category = Entertainement Expense
    ExpenseAmount ExpenseAmount represents the internal currency value of the ReceiptAmount.
    ExpenseAmount, ReceiptAmount

    Neither ExpenseAmount or ReceiptAmount is required. The following conditions apply for single currency databases (multi-currency is not enabled):

    • If a value for ExpenseAmount or ReceiptAmount (not both) is provided, the value for both is set to the value provided.
    • If values for both ExpenseAmount and ReceiptAmount are provided, the value for ReceiptAmount is used and ExpenseAmount is updated to equal ReceiptAmount.
    • If no value is provided for either, then the fields remain without value.

    The following conditions apply for multi-currency databases:

    • On create, ReceiptAmount is required when no value is provided, or if only ExpenseAmount value is provided. When values are provided for both ExpenseAmount and ReceiptAmount, ReceiptAmount is used and ExpenseAmount is updated to equal ReceiptAmount.
    • On update, the ReceiptAmount value always populates both fields. If only ExpenseAmount is provided, neither field is updated.

    NOTE  Best Practice: Going forward from API version 1.5.13, as best practice use ReceiptAmount for both single and multi-currency databases. ExpenseAmount is calculated from ReceiptAmount. The ExpenseAmount field is available for backward compatibility in single currency databases.

    ExpenseCategory

    An inactive ExpenseCategory cannot be specified when creating an ExpenseItem or updating the ExpenseCategory field. An ExpenseItem with an inactive ExpenseCategory can be updated.

    PaymentCategory options are configurable in the Autotask Admin module. Use Web Services API getFieldInfo() call to retrieve the list for a specific implementation.

    ExpenseReportID If Organizational Structure is enabled in Autotask, access to Expense Items is subject to the user's Organizational Structure Line of Business assignments and the Line of Business associated with ExpenseItem.ExpenseReportID, if any.
    PaymentType

    PaymentType picklist options = American Express, Cash, Company Check, Company Credit Card, Mastercard, Other, Personal Check, Visa. These picklist options are not configurable.

    Reimbursable status is updated from the corresponding attribute of the current PaymentType every time the ExpenseItem entity is touched.

    ReceiptAmount

    ReceiptAmount specifies the amount of the expense in the currency it was received. ExpenseAmount now represents the internal currency value of the ReceiptAmount. If no ReceiptAmount is specified for the ExpenseItem, the field will be populated by the amount equal to ExpenseAmount divided by the ExchangeRate of the specified currency (ExpenseCurrencyID).

    ReimbursementAmount

    ReimbursementAmount = the reimbursement amount for this expense in the internal currency. This field impacts databases with multi-currency enabled.

    If this value is not supplied on creation of an ExpenseItem, the field will be populated with the the ExpenseAmount value (the expense amount of the expense in the internal currency). If ExpenseItem.PaymentType is not reimbursable, this value will be 0 and cannot be updated.

    ReimbursementCurrencyReimbursementAmount

    ReimbursementCurrencyReimbursementAmount = the reimbursement amount for this expense in the reimbursement currency of ExpenseItem.ExpenseReportID (the expense's expense report.) This field impacts databases with multi-currency enabled.

    • If this value is not supplied on creation of an ExpenseItem, the field will be populated by dividing the ExpenseAmount by the ExchangeRate of the ReimbursementCurrency associated with the ExpenseItem's ExpenseReport. If the ExpenseItem.PaymentType is not reimbursable, this value will be 0 and cannot be updated.
    • If this value is edited, the ReimbursementAmount will be recalculated by multiplying the new value by the ExchangeRate of the ReimbursementCurrency associated with the ExpenseItem's ExpenseReport.
    • If both values are supplied or edited at the same time, we will take the ReimbursementAmount as the correct one and calculate the ReimbursementCurrencyReimbursementAmount. The supplied ReimbursementCurrencyReimbursementAmount will be discarded.
    WorkType WorkType picklist options are configurable in the Autotask Admin module. Use Web Services API getFieldInfo() call to retrieve the list for a specific implementation.

    Field definitions

    Field Name Label Datatype Read Only Is Required Reference Name Picklist
    AccountID Account ID integer     Account  
    BillableToAccount Billable To Account boolean      
    Description Description string(128)      
    Destination Destination string(128)   See Conditions    
    EntertainmentLocation Entertainment Location string(128)   See Conditions    
    ExpenseAmount Expense Amount double        
    ExpenseCategory Expense Category integer    
    ExpenseCurrencyID Expense Currency ID integer     Currency  
    ExpenseDate Expense Date datetime      
    ExpenseReportID Expense Report ID integer   ExpenseReport  
    GLCode GL Code String(20)      
    HaveReceipt Have Receipt boolean      
    id Expense Item ID long    
    Miles Miles double   See Conditions    
    OdometerEnd Odometer End double        
    OdometerStart Odometer Start double        
    Origin Origin string(128)   See Conditions    
    PaymentType Payment Type integer    
    ProjectID Project ID integer     Project  
    PurchaseOrderNumber purchase_order_number string (50)        
    ReceiptAmount Receipt Amount double        
    Reimbursable Reimbursable boolean      
    ReimbursementAmount Reimbursement Amount double        
    ReimbursementCurrencyReimbursementAmount Reimbursement Currency Reimbursement Amount double        
    Rejected Rejected boolean      
    TaskID Task ID integer     Task  
    TicketID Ticket ID integer     Ticket  
    WorkType Work Type integer