Autotask icon

Autotask

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

Actions524

Contract Charge → Create If Not Exists

AI-generated

Overview

The node operation 'Create If Not Exists' for the 'Contract Charge' resource in the Autotask integration allows users to create a new contract charge entry only if a duplicate does not already exist based on specified deduplication fields. This operation is useful in scenarios where you want to avoid creating duplicate contract charges in the system, such as when syncing data from external sources or automating contract management workflows. Users can specify fields to detect duplicates and optionally update existing entries if differences are found, or throw an error on duplicates.

Use Case Examples

  1. Automatically create a contract charge in Autotask only if it doesn't already exist to prevent duplicate billing entries.
  2. Use deduplication fields to identify existing contract charges and update them if necessary, ensuring data consistency.
  3. Throw an error when a duplicate contract charge is detected to enforce strict data integrity rules.

Properties

Name Meaning
Error on Duplicate Whether to throw an error when a duplicate contract charge is found instead of returning a soft 'skipped' outcome.
Dedup Fields Names or IDs Fields used for duplicate detection. If empty, deduplication is skipped and the contract charge is always created.
Update Fields Names or IDs Fields to compare against the duplicate. If values differ, the duplicate will be updated. This is ignored when 'Error on Duplicate' is enabled.
Fields Mapping of fields to set on the contract charge resource when creating or updating.

Output

JSON

  • id - The unique identifier of the created or updated contract charge.
  • status - The status of the operation, e.g., 'created', 'updated', or 'skipped'.
  • data - The full data object of the contract charge after the operation.

Dependencies

  • An API key credential for Autotask PSA REST API

Troubleshooting

  • If duplicates are detected but 'Error on Duplicate' is false, the node will skip creation and return a 'skipped' status. To enforce strict duplicate prevention, enable 'Error on Duplicate'.
  • If the deduplication fields are not set correctly or left empty, duplicates may not be detected, leading to multiple contract charges being created.
  • Errors related to API authentication or permissions may occur if the Autotask API credentials are invalid or lack necessary scopes. Verify credentials and permissions.

Links

Discussion