# Connectwise PSA Integration

Integrating [ConnectWise PSA](https://www.connectwise.com/platform/psa) with ilert enables automated alert creation in ilert based on ticket updates in ConnectWise. This helps reduce mean time to resolution (MTTR) by providing real-time alerting and escalation from your service management tool.

## In ilert: create an ConnectWise PSA alert source

1. In ilert, go to **Alert sources → Alert sources** and click **Create new alert source**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FjX0cS4q7woTXKajZmc1W%2FScreenshot%202023-08-28%20at%2010.21.10.png?alt=media&#x26;token=8ef3666b-84eb-4b51-abee-f07303313941" alt=""><figcaption></figcaption></figure>
2. Search for **ConnectWise PSA** in the search field, click the ConnectWise PSA tile, and then **Next**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FlXzQlJpaTFSR49AZk0xA%2FScreenshot%202023-08-28%20at%2010.24.23.png?alt=media&#x26;token=cffeacb4-57b9-47d4-827d-b0f6b1afd914" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams, and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FNnuZqONaIhbOf6fn4OkZ%2FScreenshot%202023-08-28%20at%2011.37.47.png?alt=media&#x26;token=8a74f7b5-5bd2-4eea-97fa-1c1dbb041333" alt=""><figcaption></figcaption></figure>
5. Select your [Alert grouping](https://docs.ilert.com/alerting/configure-alerting/alert-sources#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FueugN4JgHn1c90ggFA6u%2FScreenshot%202023-08-28%20at%2011.38.24.png?alt=media&#x26;token=b8009daf-3ca8-4264-a6fa-e42ef7333205" alt=""><figcaption></figcaption></figure>
6. The next page shows additional settings, such as customer alert templates or notification priority. Click **Finish setup** for now.
7. On the final page, an API key and/or webhook URL will be generated. You will need it later.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FuXPK6bvaY0llvfJNlLMZ%2Fil-1.png?alt=media&#x26;token=6cebc7eb-435d-4701-8ea5-c539a49385dc" alt=""><figcaption></figcaption></figure>

## Prerequisites

* A registered ConnectWise application with a client ID. You can obtain one here: <https://developer.connectwise.com/ClientID>

## In ConnectWise PSA: Create an API key

1. In the ConnectWise PSA sidebar, navigate to **Members**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FIy7xHM8AOXKAOELP8QDn%2F1.png?alt=media&#x26;token=5da6f7aa-5ff0-4e7a-9683-1d22a4751017" alt=""><figcaption></figcaption></figure>

2. Click on the **API Keys** tab.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F0q5XdlEyxSLOMdNVu5hm%2F2.png?alt=media&#x26;token=cf479f54-a19f-448d-9ce1-8130bb466579" alt=""><figcaption></figcaption></figure>

3. Click on the **+** icon to create a new API key.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F0zh7o38iFbIqTZBF6zZj%2F3.png?alt=media&#x26;token=7ac8d2a2-d033-4643-8835-ef08fc3038e9" alt=""><figcaption></figcaption></figure>

4. Enter a description in the **Description** field and click **Save**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FXUIoeMXL1iWjLnd6Riq9%2F4.png?alt=media&#x26;token=5f4841d0-af20-458b-b154-18127c1909b1" alt=""><figcaption></figcaption></figure>

5. Copy the **Public Key** and **Private Key** for use in the next step.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FPGkfGYYDzZBaUMwEiTRI%2F5.png?alt=media&#x26;token=47b65f7b-c728-4bb1-b06d-a550d5cf6d8e" alt=""><figcaption></figcaption></figure>

## In ConnectWise PSA: Create a callback

1. Use the following `curl` command to create a callback via the ConnectWise REST API:

```bash
curl -X POST "<API-BASE-URL>/v4_6_release/apis/3.0/system/callbacks" \
  -u "logincompany+publickey:privatekey" \
  -H "clientId: <clientId>" \
  -H "Content-Type: application/json" \
  -d '{
        "description": "ilert Callback",
        "url": "<INTEGRATION-URL>",
        "type": "ticket",
        "objectId": 1,
        "level": "owner",
        "inactiveFlag": false
      }'
```

Replace the following placeholders:

* `<API-BASE-URL>`: use one of the following depending on your region:
  * `https://api-au.myconnectwise.net`
  * `https://api-eu.myconnectwise.net`
  * `https://api-staging.connectwisedev.com`
  * `https://api-na.myconnectwise.net`
* `logincompany`: your ConnectWise company login name
* `publickey`: your ConnectWise API public key
* `privatekey`: your ConnectWise API private key
* `<clientId>`: your application's registered client ID
* `<INTEGRATION-URL>`: the ilert alert source URL

2. After running the command, the callback should appear under **Members → API Callbacks** in the ConnectWise PSA interface.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FVsobk8fZxyrptmMa4LR8%2F6.png?alt=media&#x26;token=e6926d04-1d5c-4f8d-8aae-333d3d91368c" alt=""><figcaption></figcaption></figure>

## FAQ

#### **Will alerts in ilert be resolved automatically?**

Yes, as soon as a ConnectWise callback sends a ticket event with `closedFlag` value set to `true`, corresponding alert in ilert will be resolved.

#### **What permissions are required in ConnectWise?**

The API user must have permissions to create callbacks and access tickets.

#### **Can I test the integration?**

Yes. Create a test ticket in ConnectWise and verify that an alert appears in ilert.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/connectwisepsa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
