ContractBlock
IMPORTANT The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will eventually be deactivated. At this time, there is no end-of-lifecycle date.
The ContractBlock entity describes an Autotask Contract Block. The Contract Block represents a block of hours purchased for a Block Hours type Contract. With a Block Hours Contract, the customer pre-pays for a block of hours and then the pre-paid hours are reduced as billable work is performed. The contract maintains the balance of hours. You can create a Block Hours type Contract without creating an associated ContractBlock entity, but time cannot be charged against the contract.
NOTE A Contract Block specifies a single per hour rate. Autotask Block Hour Factors accommodate work performed against the contract by resources with different role rates. The ContractFactor entity describes a block hour factor.
Entity details
You can also retrieve this information with the Web Services API call The getEntityInfo() SOAP API call.
Entity Name: | ContractBlock |
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.
- HoursApproved
Conditions and requirements
General
- Resources with security levels that specify limited or no contract visibility cannot create, update, or query this entity.
- If the Multi-currency Installed Module is enabled, the following field will return the relevant Customer Currency values instead of the Internal Currency values: HourlyRate
NOTE The API does not currently support automatic cost creation when creating a contract block. To create contract costs automatically the contract blocks must be added through the User Interface.
Special field attributes
Field | Conditions and Requirements |
---|---|
ContractID |
ContractID must reference a Contract where ContractType is Blocks Hour type. |
Hours |
On update(), ContractBlock.Hours must be >= ContractBlock.HoursApproved. ContractBlock.Hours and ContractBlock.HourlyRate must be >= 0. |
IsPaid |
IsPaid is no longer required. It is now Read Only. On creation, IsPaid will automatically be set to 0 and then updated by triggers. |
StartDate, EndDate |
ContractBlock.StartDate must be < ContractBlock.EndDate. ContractBlock.StartDate and ContractBlock.EndDate must be within the StartDate and EndDate of the Contract referenced by ContractBlock.ContractID; that is, you cannot create a ContractBlock outside of the Contract dates. StartDate and EndDate only support date values. The API will not store non-date values (such as time) in these fields. |
Field definitions
The following table describes the standard Autotask field objects for this entity.
- To retrieve more detailed information specific to a particular Autotask implementation, use the Web Services API call The getFieldInfo() SOAP API call.
- For information on entity UDFs, use getUDFInfo().
- For String datatypes, the number in parentheses ( ) indicates the maximum number of characters allowed.
- LT indicates Local Term.
For more information about fields marked as picklists, review our Understanding picklists article.
Field Name | Label | Datatype | Read Only | Is Required | Reference Name | Picklist |
---|---|---|---|---|---|---|
ContractID | Contract ID | integer | Contract | |||
DatePurchased | Date Purchased | datetime | ||||
EndDate | End Date | datetime | ||||
HourlyRate | Rate | double | ||||
Hours | Hours | double | ||||
HoursApproved | Hours Approved | double | ||||
id | id | long | ||||
InvoiceNumber | Invoice Number | string (50) | ||||
IsPaid | Paid | string (10) | ||||
PaymentNumber | Payment Number | string (50) | ||||
PaymentType | Payment Type | integer | ||||
StartDate | StartDate | datetime | ||||
Status | Status | integer |