CW Manage: Getting started with REST Callbacks/Webhooks

Quinntin Comer Uncategorized Leave a Comment

ConnectWise has been moving away from their legacy SOAP Callbacks (Setup Tables > Integrator Logins). They have been moving everything to REST and REST callbacks are the only ones they will really support if you reach out to them for assistance now.

With the information in this article, we will help you get started with creating REST callbacks and some of the options.

Useful Information/Links

  • Postman – Postman makes getting started with API and API Development a breeze. For a newbie, they make it very easy and there is a lot of documentation and guides out there surrounding Postman in use for testing and developing with numerous APIs.
  • ConnectWise Developer Network – This website provides access to the API library, database library and everything else you could desire for getting started with developing/automating/reporting from the ConnectWise suite. Best part — its FREE.
  • MSPGeek (Formerly LabTechGeek) Community – This community is a good resource for “all things ConnectWise” and is a fantastic resource for anyone new to the community.
  • Base64Encode – This website is useful for generating your authorization token instead of using Basic authentication.
  • Documentation on REST Callbacks: https://developer.connectwise.com/Products/Manage/Developer_Guide#Callbacks_(Webhooks)

Requirements

Process

In our example, we will create a callback for tickets created on our “Help Desk” board. This will only send JSON webhooks for ticket adds/updates/modifications on this board specifically.

  1. Refer to the following document under Tickets: https://developer.connectwise.com/Products/Manage/Developer_Guide#Callbacks_(Webhooks)
  2. We will be creating a “Ticket” callback with the type of “Board”.
  3. We will need to gather the following details:
    1. CW Service Board ID
    2. Webhook URL
  4. To get the CW Service Board ID, you will need to make a GET request to http://CWURL/v4_6_release/apis/3.0/service/boards.
    1. Tip: You can use filtering and field names to reduce the amount of output. Example: ?conditions=(name like “*Help Desk*”)&fields=id,name
  1. Now, we need to make a POST request to https://CWURL/v_4_6_release/apis/3.0/system/callbacks:
  1. URL: The URL to post the JSON webhook to.
    1. Description: Your desired description
    2. objectID: This is the service board ID
    3. Type: Ticket
    4. Level: board
    5. MemberID: API Member ID
{
        "url": "YOURURLHERE - Example: Zapier Webhook URL",
	"description": "Zapier - Example"
        "objectId": 21, ## This is the service board ID
        "type": "ticket",
        "level": "board",
        "memberId": 169, ## this is the Member ID for your API member
        "inactiveFlag": false,
        "isSoapCallbackFlag": false,
        "isSelfSuppressedFlag": false
    }

You should now be receiving JSON data to the URL you provided. This enables instantly. If you want to disable it, you can set the inactiveFlag to “true”

Leave a Reply

Your email address will not be published. Required fields are marked *