> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idemeum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConnectWise PSA

> Ticketing integration with ConnectWise PSA.

## **ConnectWise configuration**

In order to allow 3rd party applications (like idemeum) to make calls on behalf of a user we need to create a `Member API` and an `API key` in ConnectWise.

### **Create custom role for idemeum API**

We need to create a custom role that would allow all the operation that idemeum has to perform.

* In ConnectWise admin console navigate to: `System` → `Security Roles`
* Click the `+` sign to create a new security role and give a role a name (e.g: `Idemeum Role`)

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw1.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=ee782f176d5925bdd95d722741514bda" alt="Cw1" width="1600" height="730" data-path="images/cw1.png" />

* Then add the following permissions
  * **Companies**
    * Company Maintenance:  Inquire - All
    * Configurations: Inquire - All
  * **Service Desk**
    * Close Service Tickets:  Edit - All; Inquire - All
    * Resource Scheduling: Add - All; Edit - All; Inquire - All
    * Service Tickets: Add - My; Edit - All - Inquire - All
  * **System**
    * Member Maintenance:  Inquire - All
    * My Company:  Inquire - All
    * Table Setup: Add - All; Inquire - All
  * **Time and expense**
    * Time Entry:  Add - All; Edit - All; Inquire - All
    * Tim Entry Billable Option:  Add - All; Inquire - All

### **Add an API member**

* From the ConnectWise admin console navigate to: `System` → `Members` → `API Members`

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw2.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=511a003891f2d3ffb66abfe9c7458871" alt="Cw2" width="1600" height="856" data-path="images/cw2.png" />

* Click the `+` sign and add a new API member. In the example below I have named it: `nikpot-api`.
* For the Role ID select `Idemeum Role` that we created. Fill out the rest of the required fields and click Save icon.

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw3.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=f34329db6df90c015a9cae2b5f98096e" alt="Cw3" width="1600" height="856" data-path="images/cw3.png" />

### **Add API key**

* After you have added the API member you can select it from the list and select API Keys tab and click the + sign to add a new API key.

<img src="https://mintcdn.com/idemeum/Wr4gqg3DkCo0Z_fw/images/cw4.png?fit=max&auto=format&n=Wr4gqg3DkCo0Z_fw&q=85&s=af8ed67e5df9e5b09693f5d76c232414" alt="Cw4" width="1600" height="1286" data-path="images/cw4.png" />

* In the example below I have named the key `nikpot-key`. Click Save.
* Make sure you save the `Private Key` somewhere safe as it is only displayed once when you create the API key. We will need both the `Public` and `Private` Keys to be configured in idemeum Admin portal.

<img src="https://mintcdn.com/idemeum/5qU7wRiMoo2gfUSR/images/cw6.png?fit=max&auto=format&n=5qU7wRiMoo2gfUSR&q=85&s=4c07d4c56d0a37f4a7cf31ad22b672d8" alt="Cw6" width="1600" height="1286" data-path="images/cw6.png" />

## **Idemeum configuration**

* Login to the admin portal of idemeum and navigate to: `Settings` → `Integrations` and click `Add Integrations` → `Outbound integrations`.

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw8.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=65bc06060514dbdb24572a48d6bed51f" alt="Cw8" width="1600" height="1286" data-path="images/cw8.png" />

* From the list of connectors select `ConnectWise`.
* Fill out the following information for the ConnectWise configuration:
  * **API server URL** - needs to be one of the value from the list below

```
https://api-au.myconnectwise.net
https://api-eu.myconnectwise.net
https://api-na.myconnectwise.net
https://api-staging.connectwisedev.com
```

* **ConnectWise Company Name** - this is your company name in ConnectWise (the same one that you use to login to the Manage console for ConnectWise)
* **API public key** - the public key that you have created in ConnectWise
* **API private key** - the private key that you have created in ConnectWise

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw9.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=84e82b1e6262075a71dc85af7cd57a3d" alt="Cw9" width="1600" height="1286" data-path="images/cw9.png" />

* Once you have added all the information click Save. During saving we will check if the information provided is correct by trying to make a call to the URL provided using the API public/private key.
* If the test passes, then the ConnectWise configuration will be saved.

## **Default ConnectWise parameters**

<Warning>
  The following attributes are configured by default in backend and will be used when creating or closing the tickets. While we do not allow them to be configured in the UI, please reach to idemeum support if you need these values to be different.
</Warning>

* **boardId**: 1
* **severity**: Medium
* **impact**: Medium
* **closeStatusId**: 17
* **timeToClosure**: 5

## **Link idemeum and ConnectWise tenants**

When elevation events are created for one of your idemeum customers we need to know in which of your ConnectWise company to create the ticket.

* When saving the ConnectWise configuration, idemeum triggers an asynchronous request to match each of your idemeum customer names with your companies in ConnectWise. We will match first by `Customer Display Name` then by `Customer name`.
* If your idemeum customers are different than your ConnectWise companies then you can manually link them in the Customers tab in idemeum admin portal.

<img src="https://mintcdn.com/idemeum/5qU7wRiMoo2gfUSR/images/cw10.png?fit=max&auto=format&n=5qU7wRiMoo2gfUSR&q=85&s=56ad5ab34aaba426fcffde40ed5376eb" alt="Cw10" width="1600" height="1286" data-path="images/cw10.png" />

## **Managing elevation requests**

In the example below we will show how a user requests access to the Microsoft Edge browse as an admin. As the elevation request is created in idemeum, a ticket is also created in ConnectWise.

* User tries to launch Edge browser on a Windows desktop with admin privileges.
* Since this requires admin privileges on the computer the user is asked if a request for approval to be sent to the system administrator.
* Upon clicking yes, an elevation request will be send to the system administrator.
* If we go to ConnectWise console for this Company we can see that a ticket was created in New state:

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw12.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=a9d60092f31ebb6b7305715c74a506eb" alt="Cw12" width="1600" height="1286" data-path="images/cw12.png" />

* If we drill down into the ticket we can see more information about the ticket severity/impact. The summary of the ticket will contain the user that requested the elevation, on what device and which application

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw13.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=08b44153db712f910dbf9f11bb1cfde9" alt="Cw13" width="1600" height="1286" data-path="images/cw13.png" />

* We can also see a description with more information about the elevation request. You can see that the user that created the description is `nikpot-api` (this is the name of the API member that we configured in the first step in ConnectWise).

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw14.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=7338257434cbe80125641654dc780b88" alt="Cw14" width="1600" height="1286" data-path="images/cw14.png" />

* There are also 2 links in the description that the user in ConnectWise can use to approve / deny the elevation request in either MSP tenant or customer tenant in idemeum.
* In case we find the device in one of the configurations in the ConnectWise company, we will also associated that configuration with the ticket created. When looking for the configuration we will search the configuration name or the tagNumber attributes.
* When clicking on the link to approve in the MSP tenant a new window will be opened and the user will be taken to that specific elevation request in idemeum so an approve/deny action can be taken.
* In this example we will Deny the elevation request just for this user.

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw15.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=36ee3a999492a987a8d8c5deb3a8894e" alt="Cw15" width="1600" height="1286" data-path="images/cw15.png" />

* If we go back to the ticket in ConnectWise we will see that the ticket is in closed state and that a new resolution note was added on what action was taken for this elevation request.

<img src="https://mintcdn.com/idemeum/fQiqTDn9JMj_NoIj/images/cw16.png?fit=max&auto=format&n=fQiqTDn9JMj_NoIj&q=85&s=2581498d9bf90cd99f3826fb0445de7a" alt="Cw16" width="1600" height="1286" data-path="images/cw16.png" />
