Tasks

This entity describes an Autotask Task. Tasks are associated with a Project and define work that must be done. Tasks can have one or more Resource assigned to them and can be scheduled for Service Calls. Autotask users manage Tasks through the Projects module and, when associated with a Service Call, through the Service Desk module or Dispatcher's Workshop.

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: Tasks

Entity Path:

/atservicesrest/v1.0/Tasks

Can Create:
Can Update:
Can Query:
Can Delete:  
Can Have UDFs:

IMPORTANT  Requests to this entity require special handling. Refer to the Entity URLs and relationships section of this article for details.

Fields that cannot be queried

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

  • remainingHours

Conditions and requirements

General

  • If Autotask receives a create, update, or delete request for this entity and its corresponding module is unavailable, the API will return the error message, "The logged in Resource does not have the adequate permissions to update this entity type." For more information about installed modules, refer to our Modules article.
  • The Task entity can have no more than 100 UDFs. Refer to UserDefinedFieldDefinitions.
  • When a Project is completed via the API, the API will complete all Tasks associated with the project and update the "Remaining Hours" and "Projected Variance from Remaining Hours" totals at both the Task TimeEntry and Project levels.
  • Resources without security level access to Projects have RESTRICTED access to Tasks; that is, they can only update tasks that they are assigned to as the primary or a secondary resource.
  • When Organizational Structure is enabled in Autotask, and a user is associated with one or more Lines of Business, the user can see only tasks whose project has no associated Line of Business, or is associated with the Line(s) of Business they are assigned to. This is true even if user has Projects View All permission.
  • Tasks associated with projects of Type = Baseline are read-only and cannot be created, updated or deleted via the API.

IMPORTANT  When the API receives a request to update a field that contains Rich Text, the API will update the text-only version of the field and overwrite the data in the Rich Text field with plain text. All text formatting and images will be lost. Refer to The Rich Text editor to learn more.

Special field attributes

Field Conditions and Requirements

billingCodeID

 

billingCodeID must reference a Work Type allocation code.

billingCodeID and departmentID are not required unless the task has a primary or secondary Resource assigned. billingCodeID and Department ID are only required as follows:

  • If the task has a Primary Resource (assignedResourceID) assigned, an billingCodeID must be provided. departmentID is set to the Primary Resource’s Department.
  • If the task has only a secondary resource assigned, then both billingCodeID and departmentID must be provided.

NOTE  Although the secondary resource is not exposed via the API, the API must still respect the billingCodeID and departmentID requirement.

canClientPortalUserCompleteTask

If no value is provided for isVisibleInClientPortal and canClientPortalUserCompleteTask, they both default to False.

If isVisibleInClientPortal is False, then canClientPortalUserCompleteTask will override to False.

companylocationID

 

During a create call or when changing the value during an update, the account location must be active AND belong to the project's account. During create, if a value is not supplied then the field will default to the account's primary location, if one exists. Otherwise, a location will not be assigned.
completedByType creatorResourceID and completedByResourceID can return a contactID or a resourceID. creatorType and completedByType specify whether the task was created or completed by a Contact or a Resource.
creatorType creatorResourceID and completedByResourceID can return a contactID or a resourceID. creatorType and completedByType specify whether the task was created or completed by a Contact or a Resource.
endDateTime

To maintain consistency with the Autotask UI, Task.endDateTime ignores any time component passed in. A time value of midnight will be applied to any Task end date provided.

End date can be the same day as start date.

isVisibleInClientPortal

If no value is provided for isVisibleInClientPortal and canClientPortalUserCompleteTask, they both default to False.

If isVisibleInClientPortal is False, then canClientPortalUserCompleteTask will override to False.

lastActivityPersonType lastActivityPersonType values indicating whether the initiator of the last activity was a resource or a contact.
priority The Priority Order field in the UI corresponds to the priority integer field in the API. The priority field is not required. If no value is provided on create or update, the value defaults to 0.
priorityLabel The Priority field in the UI corresponds to the priorityLabel picklist field in the API.
projectID On update, projectID cannot be changed. An error will be returned.
projectID is validated only during create or update.
role

Autotask allows a role to be inactivated. An attempt to create a Task using a Resource + role combination with an inactive role will trigger an error.

You can update an existing Task if the Resource + role combination uses an inactive role.
status When Task.status is set to isComplete (picklist value 5), the value of Task.remainingHours is set to 0 and cannot be updated.

NOTE  Fields with time such as startDateTime , will use your database's default time setting.

Field definitions

Field Name Datatype Read-Only Is Required Reference Name Picklist
assignedResourceID integer     Resources  
assignedResourceroleID integer     Roles  
billingCodeID integer     BillingCodes  
canClientPortalUserCompleteTask boolean        
companylocationID integer     CompanyLocations  
completedByResourceID integer   Resources  
completedByType integer    
completedDateTime datetime      
createDateTime datetime      
creatorResourceID integer   Resources  
creatorType integer    
departmentID integer      
description string (8000)        
endDateTime datetime        
estimatedHours decimal        
externalID string (50)        
hoursToBeScheduled decimal      
id long    
isTaskBillable boolean      
isVisibleInClientPortal boolean        
lastActivityDateTime datetime      
lastActivityPersonType integer    
lastActivityResourceID integer   Resources  
phaseID integer     Tasks  
priority integer        
priorityLabel integer      
projectID integer   Projects  
purchaseOrderNumber string (50)        
remainingHours decimal        
startDateTime datetime        
status integer    

taskCategoryID

integer

 

 

 

taskNumber string (50)      
taskType integer    
title string (255)      

Additional resources