1.3.5 • Published 5 years ago

connectwisenodejs v1.3.5

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

SDK for Connectwise Manage.

https://www.npmjs.com/package/connectwisenodejs

Install using NPM

npm install connectwisenodejs

Set environmental variables for the following:

  • cw_url=
  • cw_company=
  • cw_public_key=
  • cw_private_key=
  • clientid=

cw_url is without https://. For example crm.company.com.

clientid is optional. You can register for a client id at https://developer.connectwise.com/ClientID

Include package and initiate

const connectwise = require('connectwisenodejs')
let cw = new connectwise({
  clientid: process.env.clientid,
  cw_url: process.env.cw_url,
  cw_company: process.env.cw_company,
  cw_public_key: process.env.cw_public_key,
  cw_private_key: process.env.cw_private_key
})

Example - Fetching invoices

    cw.getCall('/finance/invoices', `balance > 0`, 'company/name asc').then(async (res) => {
        console.log(res)
    }.catch((err) => {
        console.error(error)
        return error
    })

Example - Creating ticket & returning ticket ID

// Set ticket data
   const ticketdata = {
        summary: `test ticket`,
                    company: {
                        id: <company rec id>
                    },
                    initialDescription: `Test ticket data `,
                    initialInternalAnalysis: `Internal Analysis`
                }

// Create ticket
    cw.postCall('/service/tickets', ticketdata).then((res) => {
			return res.id;
		}).catch((err) => {
			console.log(err);
		});
1.3.5

5 years ago

1.3.4

5 years ago

1.3.2

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago