Integrating Autotask with Atria

Integrating Datto Autotask with Atria


The Atria Autotask integration takes billing data from Atria and updates the corresponding Recurring Services contract line quantity in Autotask .

This document will help you understand how the integration works and what you need to do to get it up and running.

Process Overview

1. Service Changes Tracked.

      Changes to provisioning occur in Atria, these are collated and stored in the database, tracking the change made and who made the change.

      For example:

  1. A customer is created
  2. A customer is assigned a service
  3. A user is created
  4. A user is assigned a service
  5. A service is removed from a user
  6. A service plan is changed for a user
  7. An application or resource is assigned to a user

2. Atria Billing Process generates billing views

      On a daily basis, Service changes are used to generate billing data for the current Billing Period.  Non-billable data is filtered out based on pre-configured billing rules

3. Update Autotask Contracts

      Depending on the configured schedule, billing data is used to update Autotask. The Contract quantities in Autotask are updated to reflect the quantities returned from the Atria API.

Important Notes:

  1. The integration at present, uses a 1:1 mapping between an Atria customer and an Autotask Account. This means that there is no direct support for reseller billing, however it is likely that Autotask can handle this natively through configuration.
  2. Atria does not create Accounts or Contracts within Autotask, these must be configured in Autotask for the integration to work.
  3. The integration looks for a Recurring Services Contract for the Customer - If you have multiple contracts of the same type within a customer, the results may be inconsistent.  

Configuration Process – Guidelines

Integration Installation Process

To set up AutotaskPSA within Atria it requires importing the Extension. This is carried out on the provisioning server.
This downloads and installs the latest version of the AutotaskPSA integration code. 
You do this by running the below PowerShell command

Install-AtriaExtension -Extension AutotaskPSA -RestartServices

After this has been ran, you are free to continue with the integration. Integration Setup Process

Atria uses the Autotask API - an API User needs to be configured - for more information review the Autotask guide here
For more information on Autotask API users - visit 

Create a Job in Atria

A Job in Atria is a recurring task, this will perform the Autotask update on a scheduled basis.

Access the Jobs Feature:

1. Navigate to Configuration > Jobs

2. Select Add a new Job to show the Job form:


Give a meaningful name – this will be used to identify the job.  e.g "Transfer Billing Data to Autotask on 27th of each month"


Select “Autotask PSA” from the drop down list of available Tasks.

Log Level:

To start with, Select Verbose, this will give increased logging – you can adjust this later.

CRON expression

This determines the frequency of execution. The expression “0 22 26 * *” means that the process will run automatically at 10pm on the 26 th of the month. More information on CRON expressions is available here


This contains the parameters for your scheduled task, each parameter can have a default value. Parameters are stored in JSON format



Default Value


Autotask Base API – this is the URL for connecting to Autotask.  Recommend to leave blank and use the ZoneUser setting to automatically determine the correct URL.  If set, this is the URL that Atria will use to access the Autotask API.



Email address of a valid user for your Autotask instance.  Suggest you use the address for the API user.



Determines which billing period to use for the transfer from Atria.

“Previous” – the previous closed billing period.

“Current” – the current billing period

“YYYY-MM-DD” – specify a date, the billing period will be selected based on the date.



Will only process records for the specified customers – based on Atria customer code, if blank or unspecified – all customers will be processed.


If set to True, Atria will set the EffectiveDate of each contract change to the current date/time.  When set to False, Atria will use the start date of the current billing period as the effective date.  If you do not do part month billing for services, set to false.  If you have part month billing, this process will need to execute at least every day in order to capture changes.
Determines if Atria can create contract lines.  If set to "False" Atria will log that a contract line is missing, if it's set to true, it will create a contract line for the service.

Example Parameters

  1. {
  2. "BaseUrl":"",
  3. "ZoneUser":""
  4. "CustomersFilter":["ASP", "SampleCustomerShortCodeName"],
  5. "BillingPeriod": "Current",
  6. "ProRatedTransactions": "False"
  7. "AllowAtriaCreateItems": "True"
  8. }

Secrets (Configuration)

Secrets are encrypted and stored, once stored, they are unable to be retrieved and displayed in the UI. If you need to update them, re-enter the secrets on the Secrets page and resave the job.  if you missed the earlier step - follow this guide to setup the user in Autotask Guide on how to setup an API User in Autotask




The API User configured in Autotask


The corresponding password for the API User

To create the Secrets parameter set – copy below, then replace the XXXX with your values.

  1. {
  2. "UserName":"XXXXXXXXX",
  3. "Secret":"XXXXXXXXX",
  4. }

Press Save to create the Job

The job is now displayed in the Jobs screen:

The Jobs page will be similar to the below:

  1. The Label of the new Job is shown in the list of Jobs.
  2. The next Run date is shown – this is calculated based on the CRON expression, in this case – the next run will be on 26 th December at 10pm.
  3. To test the execution, Click on the ellipsis and select “Run Now”
  4. You can disable the job and stop it from running indefinitely by selecting disable.
  5. Select delete to permanently remove the job, you will be asked to confirm before deletion.

Testing the Process

Manually run the job – the job may take a few moments to start, when the job has completed a link to the Log will be shown in the “Last Run Result” column. Click on this to view the runs of the job. From here you can select the run to see the detailed log entries.

Log Entries

Each line item in the log has an code, and a logging level.

Errors are likely to be technical issues – for example, if an API is unavailable this will result in an error and the process is u

Warnings are likely to need some intervention in order to resolve and are likely to be data related – e.g. Could not find something, a reference field is missing etc.

Verbose and Info provide information, but should not require action.

Prepare Service Catalog and Contracts

Please note - the contract type must be Recurring Services type

In order to make sure the integration is successful, some work may need to be done to configure the two systems to link records correctly. Depending on how you operate today, this could be very simple, or it may be more complex.

1. Setup Customer Mapping

Ensure all Atria Customers are correctly mapped to the Autotask Account ID. Copy the value from Autotask, and ensure it is set in Atria. 

The Account ID can be seen at the top of the Account form (see 1 and 3),  Clicking on the clipboard icon copies the Account ID to the clipboard.

Map the Account ID in Atria : Customer Billing Identifier (on the edit customer page)

2. Setup Product Mapping

The product mapping between Atria and Autotask is configurable.  When the integration runs, Atria will use the product mapping to locate and update the correct item in the contract for the customer.

By default (and if not specified) Atria will attempt to use the Autotask Service Identifier (ServiceID) which is the unique integer identifier from the Service entity within Autotask.  The SKU property for all items in Atria needs to be configured to match the ServiceID for the billable service in Autotask.   We recommend using this field - it's always guaranteed to uniquely identify the Service within Autotask.

Autotask Field to use
Setting to use in Atria Job Parameters
ServiceIDstring"SKUType":{"name":"ServiceId", "type":"int"}
Namestring"SKUType":{"name":"name", "type":"string"}
"SKUType":{"name":"InvoiceDescription", "type":"string"}
descriptionstring"SKUType":{"name":"description", "type":"string"}

Review all of the products managed in Atria and ensure everything that needs to be billed has an associated SKU which maps directly to the ServiceID in the Autotask Service Catalog.

For information on where to configure SKUs in Atria – read the Configuring Product SKUs in this guide

Review and Configure Billing Rules

Setup Billing Rules to mark all non-important items as non-billable – this will stop them from being transitioned to invoices and potentially creating “Noise” in the log files.

If you have completed the Setup Product Mapping in Atria, it may be adequate for you to just exclude all items which do not have a SKU assigned.

For information on billing rules, there is more information in this KB

Example Monthly Billing Process

  1. Billing period configured in Atria to start on 26th of the month
  2. BillingPeriod in Autotask job set to “Previous”

On 25 th of month

  1. Daily Atria billing job runs and generates complete billing data for month
  2. Billing period closes

On 26 th of month

Autotask Billing process executes and updates contracts in Autotask, processing the Billing Period that has just completed.

Review and Resolve Results:




Export Log Entries

  1. Locate Job run, export log and open in Excel


Review Errors

  1. Any errors returned will need technical diagnosis and may require the job to be re-executed.


Review Warn level entries and action problems as below

  1. Filter to show warnings and resolve issues line by line – see Data Resolution Guide Below


Review Informational Changes

  1. Review any informational changes, these will show the changes to contracts that have been made as a result of running the process.
  1. Re-execute Processes
  1. Manually Run the Bill Processing
  2. Manually Run the Autotask Billing Job.
  3. Check logs to ensure issues have been resolved.

Data Integrity - Resolution Guide

Guidance for Resolving Data relationship issues between Autotask and Atria. All possible codes are listed at the bottom of this article.

IDOccurs WhenLog LevelResolution
AT04A customer does not have a Billing IdentifierWarningLocate the Account in Autotask, copy the Account ID. Locate Customer in Atria, paste the AccountID into the Billing Identifier field and Save.
AT06Customer Does not have a Recurring Service ContractWarningCheck that the Account in Autotask has a "Recurring Services" Contract configured.
AT07SKU Missing in AtriaWarningIf you do not want this data in Autotask, you can ignore or filter using an Atria billing rule. If this needs to be invoiced, ensure a product exists in ConnectWise and that the SKU code is stored against the Service in Atria.
AT08Service Does not exist in AutotaskWarningThis means that the Service ID specified in the SKU does not match anything in the Autotask Service catalog.  Check the Service Identifier stored in Atria or add the service to autotask
AT12Contract Line Missing in AutotaskWarningThe Recurring Services contract for the customer does not contain this service.  Either add the service manually or reconfigure the Atria with the AllowAtriaCreateAdditions set to True.
AT15No record found in a billing periodWarningThis is a warning - it could mean that the billing process has not executed.  Check the billing report in Atria for the specified period.

NOTE that changes made in Atria – e.g. Changing Billing Identifier or SKU values, will not be reflected until the Atria Billing Process is re-executed for the correct billing period. Once the billing process has completed you can re-run the Autotask Billing Job to update Autotask
To quickly re-run the Atria Billing Process and reprocess the current billing records, Navigate to Reports > Service Billing Configuration
Then, select "Reprocess Billing Records"

Please note, this may take a while to run depending on the amount of Customers/Users/Services.

Using UI Features to make the review process easier

Use the following features to ease the process.

1. The arrow buttons will order the results by error code, this will mean you can go through and fix all similar issues in one go – e.g. for customer identifier issues, order by Code, then go through and fix all missing Billing Identifier problems.

2. Similarly, you can order by Log Type, then scroll down to the warning level logs and review.

3. The search can be used to filter, the Code and Message fields are indexed, for example, typing in AT04 will show all AT04 lines. Or typing a product code may find a log entry.

4. Use the download button to download the data into spreadsheet format – then use Excel or similar to filter/review the data.

Autotask Log Codes and Messages

The Following table lists the possible codes returned from the Autotask integration process. 

IDOccurs WhenLog LevelMessage
AT01Start of ProcessInfoBilling Process Started: For Billing Period{BillPeriod End Date}
AT02Cannot Connect to AutotaskErrorFailed to connect to Autotask: Error reported was : {Error Details}
AT03Cannot Connect to AtriaErrorFailed to connect to Atria: Error reported was : {Error Details}
AT04A customer does not have a Billing IdentifierWarning{CustomerCode} CompanyID Missing Unable to process records for Atria Customer {CustomerName} – Please add CompanyNumber from Autotask into Billing Identifier field on Customer.
AT05Company Cannot be located on AutotaskErrorNo Company with Customer Number for {customerAccountCode} Found. Check Autotask to see if the customer: {customerName} with Company Number: {customerAccountCode} exists in Autotask.
AT06Customer Does not have a Recurring Service ContractWarningNo Contract exists for the Customer {customerName}. Check Autotask to see if customer {customerName} and a Recurring Service Contract with Contract Number : {customerAccountCode} exists in Autotask.
AT07SKU Missing in AtriaWarning{CustomerName} SKU Missing in Atria : {CustomerName} : Skipped Line {LineDescription} for Customer {CustomerName} as no SKU was provided
AT08Service Does not exist in AutotaskWarning{CustomerName} Service Missing in Autotask : {CustomerName} : Skipped Line {LineDescription} for Customer {CustomerName} as no SKU was provided
AT09Contract Quantity UpdatedInfo{CustomerName} Quantity Update : Line located for {LineDescription} with Product ID {Sku} and updated from { Old Value} to { New Value}
AT10Contract Line UnchangedVerbose{CustomerName} Contract Line for {Name} located – quantity is unchanged
AT11New Contract Line CreatedInfo{CustomerName} Contract Line Added : New Line added for {Name} with Service ID {Id}
AT12Contract Line Missing in AutotaskWarning{CustomerName} Contract Line Missing in Autotask : Skipped Line {LineDescription} with Product ID {Sku} for Customer {CustomerName} as the Contract Service SKU could not be located in Autotask
AT13Contract Line Reduced to ZeroInfo{customerName} Line located for {serviceDto.Description} with Service Name {serviceDto.Name } is been removed in the selected billing period. The Quantity is updated from {contractServiceUnitDto.Units.ToString("F")} to 0.00
AT14Creating new Contract Service failsError{CustomerName} ContractService {Sku}, Error Details {Error Details}
AT15No record found in a billing periodWarningNo records found in Atria for billing period: {Billing Date}
AT16Secrets values are not validErrorFailed to retrieve autotask secrets. Error occurred is: {Message}
AT17User Email is not available or is not validErrorFailed to Retrieve Job Task Paramters: Error reported was: user email is not valid
AT18One of the Autotask Secrets is not availableErrorFailed to validate Autotask secrets. {Autotask Secret} must have a valid value
AT19Billing Period entry is incorrectErrorIncorrect billing period date or format recognized.
AT20Start Processing Deprovisioned CustomersVerboseStarted Processing Deprovisioned Customers
AT21Finish Processing Deprovisioned CustomersVerboseFinished Processing Deprovisioned Customers
AT22Start Autotask Worker Task ProcessVerboseAutotask Worker Task Service {JobWorkerTaskTypeId} started.
AT23Failing to Deserialize ObjectErrorFailed to Deserialize object: Error reported was: {Error Details}
AT24Billing Process CompletedInfoBilling Process Completed with status {Jobstatus}

    • Related Articles

    • Creating an Autotask API User for Atria

      Introduction In order to configure Atria to update Contracts in Autotask, you need to generate an API user and obtain the API username and password. This article takes you through the steps of setting up a Security Level and a new user. 1. Set up a ...
    • Billing with Atria

      Atria Billing Index Atria has a systematic approach to tracking services that it manages, this data can be exported or directly integrated via API into external PSA or billing systems. Background Information Quick video on billing and auditing How ...
    • Billing Process Overview

      Objective This article outlines, at a high level, the billing features available in Atria. The billing feature provides transparency of Atria billable services that have been consumed, down to the day. Applies To Introduced in Atria version 12.0.0. ...
    • Atria Billing Setup User Guide

      Objective This article describes how to configure Atria to utilize the latest billing features. This document outlines the billing setup attributes that should be configured.    Applies to Introduced in Atria version 12.0.0 Billing Setup Overview To ...
    • Service Billing Summary Report

      Objective This article describes the information contained in the Billing Summary Report.     Applies to Introduced in Atria version 12.0.0 Billing Summary Report Overview The service billing summary report is designed to highlight the billable ...