cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This documentation is for the new preview UI. It’s still being refined and is subject to change. For documentation for the old UI, see Knowledge Base.

Article link copied to clipboard
Updated
Published
11 min read

The ConnectWise Connector enables seamless integration with the ConnectWise API to sync configurations, agreements, SLAs and tickets. It allows users to get, add and update configurations via actions and filters.

The component key is connectwiseConnector.

API Documentation

This component was built using the ConnectWise Api Doc.

Connections (Authentication)

ConnectWise PSA Connection

Input Notes Example
ConnectWise PSA Site

(string/ Required)
Base site for ConnectWise PSA staging.connectwisedev.com
ConnectWise Company ID

(string / Required)
Company ID for ConnectWise REST lansweeper_f
ConnectWise Public Key Public key for ConnectWise REST Bwgy949Of41PUnsH
ConnectWise Private Key

(string / Required)
Private Key for ConnectWise REST fNTWV5Gl5w4GyA5G

Lansweeper Connection

Input Notes Example
Access Token

(string / Required)
Lansweeper Access Token for REST lsf_eyJ0b2tlbiI6ImQwZWVjOWZkZWYzZTA3ZGRiY2VlZTZmNzk3MmZmYWYyOGZkNDFhMGU0YTdhYWU

Endpoint Mapping Information

Data on which information will need to be posted/referenced for an endpoint (Endpoint in table) as prerequisites (Mapped Endpoints) before posting that data to an endpoint.

If a ConnectWise configuration needs to be created, we will need to pass the enumerated fields as references, such as types, status, and locations. For example, if a location "California" doesn't already exist in the ConnectWise database, then we first need to create it and then use the reference to create a configuration.

Endpoint Mapped Endpoints (Pre-requisites)
/company/configurations 1. /company/configurations/types (req)
2. /company/configurations/statuses (req)
3. /company/companies (req)
4. /system/locations (client req)
5. /procurement/manufacturers (client req)
/company/configurations/types Not required
/company/configurations/status Not required
/company/companies Not required
/system/locations /system/myCompany/corporateStructureLevels (Need confirmation)
/procurement/manufacturers Not required

Data Sources

Company

This data source is used to provide a company reference that can be used in config variables.

The company list is fetched from an API, and users can select their company from the dropdown shown in the screenshot below. This company reference is then used to post or update ConnectWise configurations.

Actions

List Locations

This action is used to fetch a list of locations

Key: listOfLocationsAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Conditions

(string / Optional)
Search results based on the fields returned in a GET /company/contacts?conditions=name="test"
Child Conditions

(string / Optional)
Searching arrays on endpoints that list childConditions under parameters /company/contacts?childconditions=communicationItems/value like "<john@Outlook.com>" AND communicationItems/communicationType="Email"
Custom Field Conditions

(String / Optional)
Allows searching custom fields when customFieldConditions is listed in the parameters /company/contacts?customFieldConditions=caption="TomNumber" AND value !=null
Page

(integer / Optional)
Specifies the page number to fetch 2
Page Size

(integer / Optional)
Specifies number of records to fetch. If not provided default value will be 25 200

Pagination Scenarios

Page Number Page Size Expected Result
NA NA Fetch all records from ConnectWise. Example: if total is 15,000 → return all 15,000 records
2 NA Fetch 25 records starting from page 2. Range: 26 to 50
2 100 Page size = 100, skip the first 100 records (page 1), then fetch the next 100. Range: 101 to 200
2 200 Page size = 200, skip 200, fetch next 100. Range: 201 to 300 (but only up to 100 will be returned)
NA 300 Default Page = 1, fetch 300 records on page 1. Max Page Size = 1000

Create Location

This action is used to create a location

Key: createLocationAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Name

(string / Required)
Name of the location to be created test-location
Structure Level Id

(string / Required)
Provide a reference of Corporate Structural Level (Level 1 to Level 5) 1

List Configuration Types

This action is used to fetch a list of configuration types

Key: listConfigurationTypes

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Conditions

(string / Optional)
Search results based on the fields returned in a GET /company/contacts?conditions=name="test"
Child Conditions

(string / Optional)
Searching arrays on endpoints that list childConditions under parameters /company/contacts?childconditions=communicationItems/value like "<john@Outlook.com>" AND communicationItems/communicationType="Email"
Custom Field Conditions

(String / Optional)
Allows searching custom fields when customFieldConditions is listed in the parameters /company/contacts?customFieldConditions=caption="TomNumber" AND value !=null
Page

(integer / Optional)
Specifies the page number to fetch 2
Page Size

(integer / Optional)
Specifies number of records to fetch. If not provided default value will be 25 200

Pagination Scenarios

Page Number Page Size Expected Result
NA NA Fetch all records from ConnectWise. Example: if total is 15,000 → return all 15,000 records
2 NA Fetch 25 records starting from page 2. Range: 26 to 50
2 100 Page size = 100, skip the first 100 records (page 1), then fetch the next 100. Range: 101 to 200
2 200 Page size = 200, skip 200, fetch next 100. Range: 201 to 300 (but only up to 100 will be returned)
NA 300 Default Page = 1, fetch 300 records on page 1. Max Page Size = 1000

Create Configuration Type

This action is used to create a configuration type

Key: createConfigurationTypeAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Name

(string / Required)
Name of the configuration type to be created (Max length: 50) test-configuration

List Manufacturers

This action is used to fetch a list of manufacturers

Key: listOfManufacturersAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Conditions

(string / Optional)
Search results based on the fields returned in a GET /company/contacts?conditions=name="test"
Page

(integer / Optional)
Specifies the page number to fetch 2
Page Size

(integer / Optional)
Specifies number of records to fetch. If not provided default value will be 25 200

Pagination Scenarios

Page Number Page Size Expected Result
NA NA Fetch all records from ConnectWise. Example: if total is 15,000 → return all 15,000 records
2 NA Fetch 25 records starting from page 2. Range: 26 to 50
2 100 Page size = 100, skip the first 100 records (page 1), then fetch the next 100. Range: 101 to 200
2 200 Page size = 200, skip 200, fetch next 100. Range: 201 to 300 (but only up to 100 will be returned)
NA 300 Default Page = 1, fetch 300 records on page 1. Max Page Size = 1000

Create Manufacturer

This action is used to create a manufacturer

Key: createManufacturerAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Name

(string / Required)
Name of the manufacturer to be created lenovo

List Configuration Status

This action is used to fetch a list of configuration statuses

Key: listConfigurationStatus

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Conditions

(string / Optional)
Search results based on the fields returned in a GET /company/contacts?conditions=name="test"
Page

(integer / Optional)
Specifies the page number to fetch 2
Page Size

(integer / Optional)
Specifies number of records to fetch. If not provided default value will be 25 200

Pagination Scenarios

Page Number Page Size Expected Result
NA NA Fetch all records from ConnectWise. Example: if total is 15,000 → return all 15,000 records
2 NA Fetch 25 records starting from page 2. Range: 26 to 50
2 100 Page size = 100, skip the first 100 records (page 1), then fetch the next 100. Range: 101 to 200
2 200 Page size = 200, skip 200, fetch next 100. Range: 201 to 300 (but only up to 100 will be returned)
NA 300 Default Page = 1, fetch 300 records on page 1. Max Page Size = 1000

Create Configuration Status

This action is used to create a configuration status

Key: createConfigurationStatusAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Description

(string / Required)
Description of the configuration Status to be created (Max length: 50) test-active
Closed Flag

(boolean / Optional)
Closed flag of the configuration status (Default: false) true
Default Flag

(boolean / Optional)
Default flag of the configuration status (Default: false) true

Match Configurations

This action is used to match external assets with ConnectWise configurations

Key: matchConfigurationsAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Conditions

(string / Optional)
Search results based on the fields returned in a GET /company/contacts?conditions=name="test"
Case sensitive match

(Boolean / Required)
Specifies how to match the external data with ConnectWise data (default: true) false
Configuration Name Path

(String / Optional)
Specifies the path for the name of the configuration asset.general.name
Serial Number Path

(String / Optional)
Specifies the path for serial number of the asset asset.general.serialNumber
Mac Address Path

(String / Optional)
Specifies the path of the mac address of the asset asset.network.macAddress
Model Number Path

(String / Optional)
Specifies the path of the model number of the asset asset.model
IP Address Path

(String / Optional)
Specifies the path of the ip address of the asset asset.network.ipAddress
Additional Field Mappings

(key-value pairs)
Specifies the path mappings for key-value pairs. Can enter multiple key-value pairs. Key: asset.general.warranty
Value: warrantyDetails

Available ConnectWise paths:
- type.name
- status.name
- company.name
- contact.name
- vendor.name
- site.name
- location.name
- department.name
- manufacturer.name
- serialNumber
- deviceIdentifier
- modelNumber
- tagNumber
- warrantyExpirationDate
- vendorNotes
- notes
- macAddress
- lastLoginName
- billFlag
- backupSuccesses
- backupIncomplete
- backupFailed
- backupRestores
- backupServerName
- backupBillableSpaceGb
- backupProtectedDeviceList
- backupYear
- backupMonth
- ipAddress
- defaultGateway
- osType
- osInfo
- cpuSpeed
- ram
- localHardDrives
- activeFlag
- mobileGuid
- companyLocationId
- showRemoteFlag
- showAutomateFlag
- needsRenewalFlag
Custom Field Mappings

(JSON / Optional)
Specifies the JSON with field mappings that contains ConnectWise custom field paths with corresponding external data [{"asset.general.key": "ls_asset_id"},{"asset.general.url": "ls_asset_url"},{"software.general": "ls_software"}]
External Data

(JSON / Required)
Specifies the JSON with external Data. The JSON should be an array of objects where objects are assets See example below

External Data Example:

[
  {
    "asset": {
      "id": "567",
      "general": {
        "type_key": "LTEwLUFzc2V0VHlwZS02ZGQyY2MyZC0zOWM2LTQ2YzAtYTAxOS1hYTQ2YWUzNmM1MjI=",
        "key": "0f5ac0be-93e3-3a9d-8fcb-02904d4f42d8",
        "manufacturer": "Rockwell Automation",
        "name": "166.246.143.187/1/7",
        "state": "Active",
        "type": "OT"
      }
    }
  }
]

List Agreements for Configurations

This action is used to fetch a list of agreements for configurations

Key: listAgreementsForConfigurationsAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Configuration Request Payload

(array / Required)
Specifies the configuration payload for fetching agreements [Config1, Config2, …]

Sample Output:

[
  {
    "id": 9015,
    "name": "109.164.219.139/1/5",
    "customFields": {
      "ls_asset_id": "01771f50-6a8c-325c-a3d6-bd2681282014"
    },
    "sla": null,
    "agreements": [
      {
        "id": 538,
        "name": "test",
        "startDate": "29/09/2000",
        "endDate": "30/09/2028",
        "agreementStatus": "Active",
        "type": {
          "id": 5,
          "name": "Block Time - One time",
          "_info": {
            "type_href": "https://api-staging.connectwisedev.com/v4_6_release/apis/3.0//finance/agreements/types/5"
          }
        }
      }
    ]
  }
]

List Tickets for Configurations

This action is used to fetch a list of tickets for configurations

Key: listTicketsForConfigurationsAction

Input Notes Example
Connection

(connection / Required)
ConnectWise connection
Configuration Request Payload

(array / Required)
Specifies the configuration payload for fetching tickets [Config1, Config2, …]

Sample Output:

[
  {
    "id": 9015,
    "name": "109.164.219.139/1/5",
    "customFields": {
      "ls_asset_id": "01771f50-6a8c-325c-a3d6-bd2681282014"
    },
    "tickets": [
      {
        "id": 538,
        "summary": "test",
        "recordType": "ServiceTicket",
        "status": {
          "id": 16,
          "name": "New (not responded)",
          "Sort": 0,
          "_info": {
            "status_href": "https://api-staging.connectwisedev.com/v4_6_release/apis/3.0//service/boards/0/statuses/16"
          }
        },
        "closedFlag": false
      }
    ],
    "ticketsInfo": {
      "totalTickets": 1,
      "openTickets": 1,
      "closedTickets": 0
    }
  }
]

Configurations Sample Input

Can be used in listAgreementsForConfigurationsAction and listTicketsForConfigurationsAction as config1, config2, etc.

[
  {
    "id": 10585,
    "name": "1756-EafgN/C 2178921900",
    "type": {
      "id": 139,
      "name": "ls_OT"
    },
    "status": {
      "id": 34,
      "name": "ls_Don't show"
    },
    "company": {
      "id": 6,
      "identifier": "BlueLightCo",
      "name": "Blue Light, Co."
    },
    "serialNumber": "00d0c39f",
    "modelNumber": "1756-EN678/D",
    "purchaseDate": "2025-10-11T07:35:18Z",
    "warrantyExpirationDate": "2025-10-09T07:34:42Z",
    "macAddress": "00:1D:9C:D1:F6:DF",
    "billFlag": false,
    "ipAddress": "166.139.180.82",
    "customFields": [
      {
        "id": 5,
        "caption": "ls_asset_id",
        "type": "Text"
      },
      {
        "id": 6,
        "caption": "ls_asset_url",
        "type": "Text"
      },
      {
        "id": 7,
        "caption": "ls_software",
        "type": "TextArea"
      }
    ]
  }
]

Integration Workflows

Asset Synchronization Integration

The Asset Synchronization Integration synchronizes assets from Lansweeper and migrates them into ConnectWise as configurations. The integration supports both configuration creation and updates by managing reference data, performing matching logic, and executing batched operations to ensure optimal performance.

Implementation

The process begins with the "List Assets" action from Lansweeper, which retrieves the list of assets used as input for the synchronization process.

Before creating or modifying configurations, the integration verifies that all required reference objects needed by ConnectWise are available. The following subflows are invoked sequentially:

  • Location Flow
  • Manufacturer Flow
  • Status Flow
  • Type Flow

Each subflow:

  • Fetches existing records from ConnectWise
  • Creates the reference objects if they do not already exist

The resulting reference data is then stored and reused during configuration creation and modification to maintain data consistency throughout the process.

Matching Process

The "Match Configurations" action is then executed:

  • This step receives the asset data and compares it with existing ConnectWise configurations to identify synchronization status
  • The output includes two arrays:
    • matched[]: Assets that already exist in ConnectWise (existing configurations)
    • unmatched[]: Assets that are new and need to be created as configurations

Creating New Configurations

For assets in the unmatched[] list:

  • A configuration creation payload is constructed using the asset data and previously prepared reference objects
  • Each payload object is appended to a batch array
  • The batched payload (in groups of 50) is passed to the "Bulk Configuration Creation" action to create configurations in ConnectWise
  • This batching mechanism ensures efficient API utilization

Updating Existing Configurations

For assets in the matched[] list:

  • The integration validates and updates the related reference objects (Location, Manufacturer, Status, Type) if required
  • A modification payload is created containing only the fields that differ (i.e., unmatchedFields)
  • The modification payloads are aggregated into batches of 50
  • Each batch is passed to the "Bulk Configuration Modification" action to update the existing configurations in ConnectWise

Tickets, Agreements and SLA Sync Integration

The ConnectWise to Lansweeper synchronization flow ensures that data from ConnectWise configurations is accurately reflected in Lansweeper assets. This integration synchronizes both metadata and relationship details, including agreements and tickets, and updates Lansweeper assets with this contextual information to maintain data consistency across systems.

Implementation

The flow begins by invoking the Cross Flow responsible for custom field synchronization:

  • This subflow validates whether the required custom fields exist in Lansweeper
  • If any custom field is missing, it is created dynamically before the main synchronization process proceeds

The integration retrieves configuration data from ConnectWise using the "List of Configurations" action. The output from this action serves as input for subsequent operations that associate configurations with related agreements and tickets.

The following actions are executed sequentially using the configuration data:

  • List Agreements by Configuration: Fetches all agreements linked to each configuration
  • List Tickets by Configuration: Retrieves all tickets associated with each configuration

The integration then uses a Code Block component to construct the final asset payloads:

  • This component transforms ConnectWise configuration, agreement, and ticket data into a payload structure that aligns with Lansweeper's asset schema
  • The prepared payload array is then passed to the next step for iteration

A Loop component iterates over each payload object, and the integration calls the "Edit Asset" action of Lansweeper for each asset. This updates or enriches the existing Lansweeper assets with the corresponding ConnectWise data.

Agreement Data Captured

For Agreements, the following details are captured and updated in Lansweeper:

  • Agreement ID
  • Agreement Name
  • Agreement Type
  • Agreement Status
  • Start Date
  • End Date

Ticket Data Captured

For Tickets, the integration aggregates and stores ticket-related metrics in Lansweeper custom fields:

  • cw_total_tickets: Total number of tickets associated with the configuration
  • cw_open_tickets: Number of Open tickets
  • cw_closed_tickets: Number of tickets in Closed status
  • cw_configuration_url: Direct link to ConnectWise configuration page

Tickets are classified as open or closed based on the Boolean flag property in ConnectWise service tickets, known as "closedFlag".

This flow ensures bidirectional synchronization between ConnectWise and Lansweeper, keeping assets in Lansweeper enriched and contextually up to date with their corresponding ConnectWise records.

Integration Setup Instructions

Navigate to the Integration folder in the repository and locate the YAML file to import into the platform.

Update Connector References

Identify all connector components (e.g., ConnectWise, Lansweeper) in the YAML file and update them as needed. Simply replace the following placeholders with their respective key and version values for the components:

  • <Lansweeper Component Version>
  • <Lansweeper Component Key>
  • <ConnectWise Component Version>
  • <ConnectWise Component Key>

Example:

component:
  isPublic: false
  key: connectwiseConnector # Use your component key
  version: 54 # Use your published component version

Replace the key and version fields for each connector with the correct values published on your platform. Repeat this process for all instances of ConnectWise and Lansweeper connectors in the YAML file.

Custom Field Setup

The ConnectWise administrator needs to create the required custom fields in ConnectWise and enter their IDs in the configuration wizard. Make sure they are named as follows:

  • "ls_asset_id": For Lansweeper Asset Key
  • "ls_asset_url": For Lansweeper Asset URL
  • "ls_software": For Lansweeper Asset Software data
  • "ls_asset_location": For Lansweeper Asset Location data

The administrator can view the IDs of the custom fields created in the ConnectWise UI. The IDs visible there need to be entered into the respective ID input for the custom field in the Integration configuration wizard.