Autotask icon

Autotask

Interact with Kaseya's Autotask PSA REST API to manage companies, tickets, contracts, and more.

Actions524

Contract Block → Get Many (Advanced)

AI-generated

Overview

This node operation retrieves multiple Contract Block records from the Autotask PSA system using advanced filtering criteria. It is useful for scenarios where users need to query contract blocks with specific conditions, such as filtering by attributes or relationships, and optionally limit the number of results or return all matching records. For example, a user might want to fetch all contract blocks related to a particular contract or within a certain date range using a JSON-based advanced filter.

Use Case Examples

  1. Retrieve all contract blocks related to a specific contract using an advanced JSON filter.
  2. Fetch up to a specified maximum number of contract blocks matching certain criteria, such as status or type.

Properties

Name Meaning
Get All Whether to return all results or only up to a given limit (returnAll boolean). If false, maxRecords limits the number of records returned.
Max Records Maximum number of contract block records to return when 'Get All' is false. Range is 1 to 500.
Advanced Filter A JSON string containing a 'filter' array with Autotask API query criteria to filter contract blocks based on specific conditions.
Add Picklist Labels Whether to automatically add '_label' fields for picklist fields with human-readable values in the output. No labels are added for empty values.
Add Reference Labels Whether to automatically add '_label' fields for reference fields with human-readable values in the output. No labels are added for empty values.
Select Columns Names or IDs. Choose which fields to include in the response. If no fields are selected, all fields will be returned. The ID field is always included regardless of selection.
Flatten User-Defined Fields Whether to bring user-defined fields (UDFs) up to the top level of each object instead of being nested in the userDefinedFields array.

Output

JSON

  • id - Unique identifier of the contract block record.
  • name - Name of the contract block.
  • description - Description or details about the contract block.
  • contractId - Identifier of the contract to which this block belongs.
  • startDate - Start date of the contract block.
  • endDate - End date of the contract block.
  • status - Current status of the contract block.
  • hourFactor - Hour factor associated with the contract block.
  • userDefinedFields - Array of user-defined fields related to the contract block, if not flattened.
  • _label fields - Additional fields with human-readable labels for picklist and reference fields if enabled.

Dependencies

  • An API key credential for Autotask PSA REST API authentication

Troubleshooting

  • Ensure the advanced filter JSON is correctly formatted and matches Autotask API query criteria syntax to avoid query errors.
  • If the node returns no results, verify the filter criteria and consider toggling 'Get All' or adjusting 'Max Records'.
  • Authentication errors may occur if the API key credential is invalid or expired; verify credentials in node settings.
  • If picklist or reference labels are not appearing as expected, check the corresponding boolean options are enabled.

Links

Discussion