1.0.4 • Published 2 years ago

@zaid1981/zsconnect v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

ZapScale Connect

Requirements:

  • Node.js 16+

Setup and run locally

$ cd your-app-name
$ npm i local-package-path/Zapscale-Connect

Input Payload

const user = {
  userId: '6200ee7239a09b8894e72c2a',
  userName: 'Thredsol',
  solutionId: '7923b6c4-14aa-48d4-a7b4-c6f30b18fc4a',
  type: 'salesforce'
}
# userId is C1 id
# userName is C1 name. It should be the only one word. Let's say company name is 'Threadsol Pvt. Ltd.' then userName should be 'Threadsol' only.
# type is Generic name of peripheral app
# Random string as security code
const securityCode = 'aswSD@341'
const tray = new Tray()
tray.connect(user.type, user, securityCode, (test: string) => {
  console.log(test)
})

Response Details

In case of Error

data: {
    status: false,
    message: ‘Something Went Wrong!’,
    webhookUrl: null
}
data: {
        status: false,
        message: ‘User closed the popup window’
      }

In case of Success

  • If webhookUrl is not empty, show that to the user and store it somewhere so that it can be viewed again by the user if required.
data: {
        status: true,
        message: ‘Successfully Integrated’,
        webhookUrl: startSolutionResponse.data.webhookUrl
      }
data: {
        status: true,
        message: ‘Successfully Integrated’,
        webhookUrl: null
      }