1.0.7 • Published 4 years ago

@praxent/praxent-crm v1.0.7

Weekly downloads
8
License
ISC
Repository
github
Last release
4 years ago

Praxent CRM Package

This package is to assist in the sending of information to your specified CRM. Right now this package is only built out for HubSpot but future iterations could expand that scope.

How to Use

HubSpot Integration

You can use the package as follows:

const HubspotIntegration = require('@praxent/praxent-crm')

async exampleFunction() => {
  try {
    const hubspotIntegration = HubspotIntegration({ apiKey }) // appId required for webhooks

    const response = await hubspotIntegration.fetch({ action: 'createContact', data })
    return {
      success: true,
      data: response,
    }
  } catch(error) {
    console.warn(error)
    return {
      success: false,
      error,
    }
  }
}

The data variable is whatever data you want to send to HubSpot formatted for your specific project.

Actions Types:

createContact

{
  properties: [
    {
      property: string,
      value: any,
    }
    ...
  ]
}

createDeal

{
  associations: {
    associatedVids: [int],
  },
  properties: [
    {
      name: string,
      value: any,
    }
    ...
  ]
}

searchContactByEmail

{
  email: string,
}

viewSettings

{}

updateSettings

{
  webhookUrl: string, // requires https
  maxConcurrentRequests: int, // greater than 5
}

createSubscriptions

{
  subscriptionDetails: {
    subscriptionType: string,
    propertyName: string,
  },
  enabled: bool,
}

getSubscriptions

{}

updateSubscriptions

{
  subscriptionId: int,
  data: {
    enabled: bool,
  }
}

deleteSubscriptions

{}
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago