TicketCharges

This entity describes a cost associated with an Autotask Ticket. A cost is a billing item for products or materials. Cost items can be billable or non-billable. Billable cost items appear in Approve and Post.

NOTE  You can refer to the Online Help to find root and child access URLs of the entity you wish to query. Refer to Finding resource and child access URLs of REST API entities for more information.

Entity details

Entity Name: TicketCharges

Entity Path:

/atservicesrest/v1.0/TicketCharges

Parent Entity:

Tickets

Can Create:
Can Update:
Only when isBilled = false
Can Query:
Can Delete:
Only when isBilled = false
Can Have UDFs:  

Conditions and requirements

General

  • To create, update, delete, and query TicketCharges, the API user must have Security Level permission to access the Service Desk module or must be assigned to the ticket as a primary or secondary resource.
  • The visibility of charges and expenses is controlled by the object permissions of the co-managed help desk security level. The API user's ability to interact with the entity is determined by these settings.
  • update and delete are allowed only when isBilled = False (cost has not been approved and posted).
  • If the Multi-currency Installed Module is enabled, the following fields will return the relevant Customer Currency values instead of the Internal Currency values: billableAmount and unitPrice.
  • The following fields will return the saved Internal Currency values: internalCurrencyBillableAmount and internalCurrencyUnitPrice.

Special field attributes

Field Conditions and Requirements
billingCodeID

billingCodeID must reference a Material Cost Code type allocation code.

On create or update when billingCodeID has changed and is not Null, and if no value is supplied for the unitCost and unitPrice fields, then those fields take their values from the Material Cost Code associated with billingCodeID.

You cannot select the RMA cost code for billingCodeID (during create or when changed to during update). If the charge is already associated to the RMA cost code, the update will be success.

billableAmount

billableAmount = unitQuantity * unitPrice. If unitPrice is Null, the value will be set to the value from the Material Cost Code associated with billingCodeID.

The API will round the unitQuantity, unitCost, and unitPrice values to 4 decimal places prior to any calculations for the total price or extended cost.

isBillableToCompany If no value is supplied for isBillableToCompany, the value is set to True.
extendedCost

extendedCost = unitQuantity * unitCost. If unitCost is Null, the value will be set to the value from the Material Cost Code associated with billingCodeID.

This entity field will return no information if the user account making the query does not have sufficient privileges to view cost data in the Autotask UI. Additionally, if an update request does not have the necessary permissions, the API will ignore the call's values for the field even if they are blank or would be otherwise required.

The API will round the unitQuantity, unitCost, and unitPrice values to 4 decimal places prior to any calculations for the total price or extended cost.

productID On create or update when productID has changed and is not Null, if no value is supplied for the billingCodeID, unitCost, or unitPrice fields, then those fields take their values from the Product.
status
  • status is read-only. On create, when procurement is enabled, status is set as follows:

If productID is null, then status = Ready to Ship.

If productID references a Product where doesNotRequireProcurement = True, then status = Ready to Ship.

If productID references a Product where doesNotRequireProcurement = False and the Product is not available in Inventory, then status = Need To Order.

If productID references a Product where doesNotRequireProcurement = False and the Product is available in Inventory, then status = Ready to Ship.

If status = Need To Order and extendedCost is > the value set in the system setting "Require approval before ordering..." then status is automatically set to Waiting Approval.

  • When Procurement is disabled, status = Pending.
ticketCharges

ticketCharges must have either a productID or billingCodeID.

When isBilled = True (cost has been approved and posted), TicketCharges is read-only.

ticketID ticketID cannot be updated.

unitCost

This entity field will return no information if the user account making the query does not have sufficient privileges to view cost data in the Autotask UI. Additionally, if an update request does not have the necessary permissions, the API will ignore the call's values for the field even if they are blank or would be otherwise required.

unitPrice

This field will not be queryable if the API user does not have the Can view sensitive Charge data system security setting.

Field definitions

Field Name Datatype Read-Only Is Required Reference Name Picklist
billableAmount decimal      
billingCodeID long     BillingCodes  

chargeType

integer

 

 

contractServiceBundleID long     ContractServiceBundles  
contractServiceID long     ContractServices  
costType integer    

createDate

datetime

 

 

 

creatorResourceID long   Resources  
datePurchased datetime      
description string (8000)        
extendedCost decimal      
id long    
internalCurrencyBillableAmount (Multi-currency module only) decimal      
internalCurrencyUnitPrice (Multi-currency module only) decimal      
internalPurchaseOrderNumber string (50)        
isBillableToCompany boolean        
isBilled boolean      
name string (100)      
notes string (2000)        

organizationalLevelAssociationID

integer

 

OrganizationalLevelAssociations

 

productID long     Products  
purchaseOrderNumber string (50)        
status long    
statusLastModifiedBy long      
statusLastModifiedDate datetime      
ticketID long   Tickets  
unitCost decimal        
unitPrice decimal        
unitQuantity decimal      

Additional resources