ConnectWise Integration

ConnectWise is a business management platform that integrates business-process automation, help desk, customer service, sales, marketing, project management, and business analytics of a company. OpsGenie is an alert and notification management solution that is highly complementary to ConnectWise.

OpsGenie ConnectWise integration enables ConnectWise to create alerts in OpsGenie when a ticket is updated in ConnectWise and enables OpsGenie to create, resolve, etc. a ticket in ConnectWise when an alert is created, resolved, etc. in OpsGenie.

What does OpsGenie offer to ConnectWise users?

By using OpsGenie ConnectWise Integration, you can forward ConnectWise tickets to OpsGenie as alerts. OpsGenie can determine the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls and iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.


Functionality of the integration

  • When a ticket is updated in ConnectWise, an alert is created in OpsGenie automatically through the integration.
  • When an alert is created, resolved, etc. in OpsGenie, a ticket is created in ConnectWise automatically through the integration.

Installation Steps

The steps below describe how to integrate OpsGenie and ConnectWise.

Add ConnectWise Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done already
  2. Go to OpsGenie ConnectWise Integration page,
  3. Specify who should be notified for ConnectWise alerts using the Teams field. Auto-complete suggestions will be provided as you type. 
  4. If you would like to use create, resolve, etc. tickets in ConnectWise when an alert is created, closed, etc. in OpsGenie, select Send Alerts To ConnectWise option.
  5. Select which actions will be performed on ConnectWise side via Alert Action option. You can select create, close or both actions.
  6. Select an alert filter if you don't prefer forwarding all alerts to ConnectWise.
  7. Copy the Webhook URL by clicking on the copy button or selecting.
  8. Click on Save Integration.

Configuration in ConnectWise

  1. In ConnectWise, click on System from the left menu.
  2. Select Setup Tables under System tab.
  3. Type integrator into Table field and press Enter key.
  4. Click on Integrator Login under Table column.
  5. Click + sign above to add a new integrator login.
  6. Type OpsGenie to Username field and type a password to Password field.
  7. The password doesn't have to be the same password that you use for your ConnectWise account.
  8. Select All records for Access Level field.
  9. Select the checkbox for Service Ticket API under Enable Available API(s) to enable it.
  10. Select your Service Board (e.g. Professional Services).
  11. Paste your API Key for ConectWise integration into the Callback URL field.
  12. DO NOT select Use legacy callback format option.
  13. Click on Save icon on the above to save your new integrator login.

Forwarding Alerts to ConnectWise via AWS Lambda (Optional)

AWS Lambda is the compute service from AWS that runs your code without any servers. AWS Lambda is a great solution for many use cases including integrations, particularly when integrating SaaS solutions like OpsGenie and ConnectWise.

Creating NodeJS Lambda Function as ZIP file

  1. Go to opsgenie-connectwise-integration public repo at Github.
  2. Follow the instructions.
  3. Keep result ZIP package file (we'll use it later).

Creating the Lambda Function over API Gateway endpoint

  1. Go to AWS Lambda console.
  2. If this is your first time using AWS Lambda you’ll see a welcome screen. Just click on “Get Started Now”.
  3. Click on the "Blank Function" to select the blueprint.
  4. Select "API Gateway" as function trigger.
  5. Enter a API Name for the API Gateway endpoint, e.g. OpsGenieConnectWiseIntegrationAPI.
  6. Select "prod" as Deployment stage and "Open" as Security options.
  7. Click on the “Next” button.
  8. Enter a Name for the Lambda function, e.g. OpsGenieConnectWiseIntegration.
  9. Description can be empty or anything you like.
  10. Runtime should be "Node.js 4.3".
  11. Code entry type should be "Upload a .ZIP file"
  12. Upload ZIP file that we packaged before.
  13. For Role select "Create a custom role".
  14. On the newly opened window just click on “Allow” in order to give necessary permissions to our Lambda function to be able to send logs to AWS CloudWatch.
  15. Leave Handler’s value as index.handler. At this point, Role should be set to lambda_basic_execution already.
  16. In the Advanced settings pane select Timeout value as 5 just to be safe for our case. Leave Memory value as 128 which is more that necessary for our case.
  17. Click on the “Next” button.
  18. Before clicking "Create function" button, review all settings.
  19. A new API endpoint will be listed. Note it.
  20. Go AWS -> Services -> API Gateway.
  21. Choose your API that you created for your lambda script under "APIs" tab on the left menu.
  22. Click on "ANY" under "/your_lambda_function_name".
  23. Click on "Actions" above and select "Delete Method" under "METHOD ACTIONS".
  24. Confirm the delete action.
  25. After that click again on "Actions" and select "Create Method" under "RESOURCE ACTIONS".
  26. Select "POST" on the newly created combobox.
  27. Click on check sign.
  28. After this a new page will open.
  29. Select your lambda region.
  30. Type the name of your lambda function into the field that will be created after selecting region.
  31. Click on Save button on the down-right of the page.
  32. Confirm "Add Permission to Lambda Function" dialog.
  33. Click on "Actions" again and select "Deploy API" under "API ACTIONS".
  34. Select "prod" as your "Deployment stage".
  35. Click on "Deploy" button.

Configuring the Integration to Send Alerts to ConnectWise

  1. Now go to your ConnectWise Integration that your configured in OpsGenie.
  2. Select Send Alerts To ConnectWise.
  3. Write the API endpoint that AWS API Gateway provided in the AWS Lambda URL text field. Just to make our experiment safer by not sending all alerts to the ConnectWise as tickets, add an Alert Filter with a tag matching condition for a tag such as ConnectWise. You may name your integration as you like; it’s named ConnectWise here. After configuring the integration click on Save Integration.

Testing the Integration to Send Alerts to ConnectWise

  1. Now we’re ready to go. Create a new Alert with ConnectWise tag.
  2. Now go to your ConnectWise Service Board and see a ticket is created from the alert!
  3. Also check that the alert you just created has been assigned a new tag with CW- prefix. This tag is used for associating this OpsGenie Alert to the ConnectWise ticket whose key is included in the tag.

Monitoring Lambda runtime and function logs via CloudWatch Logs

  1. You can also check CloudWatch logs for the logs we’ve written over the console object and also the ones written by the AWS Lambda runtime. Go to CloudWatch console first.
  2. Click on “Logs”.
  3. Click on the Log Group associated with our Lambda function.
  4. Click on one of the Log Streams, e.g. the most recent one after sorting them by Last Event Time.
  5. Check logs written by the runtime and our function itself.