1.0.4 • Published 5 years ago

salesforce-analytics-wrapper v1.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Salesforce (JSForce) Wrapper

Salesforce wrapper written over JSForce, an api tool for salesforce. This wrapper include 3 methods : - login() - executeQuery() - getReport()

Installation

npm install salesforce-analytics-wrapper

Usage

login(config, additionalConfig)

Login to saleforce

This method accepts two params 1. config - JSON object 2. additionalConfig (optional) - JSON object

config object

ParamDescription
securityTokenSecurity token from salesforce if any.
userNameLogin user name for saleforce.com
passwordpassword for saleforce.com

Example config :

{
    "securityToken" : "",
    "userName": "user1",
    "password": "password1"
}

additionalConfig object - optional

ParamDescription
loginUrlLogin url if different from default one, eg: test.saleforce.com

Example config :

{
    "loginUrl" : "https://test.salesforce.com/"
}

executeQuery(query)

To execute a SOQL query

1. query - string

getReport(reportId)

To execute a report created in saleforce and get the parsed data in JSON format. Parsing is handled internally.

1. reportId - string

Sample

var connector = require('salesforce-analytics-wrapper')
var config = {
    "securityToken" : "",
    "userName": "user1",
    "password": "password1"
}
var loginDetails = await connector.login(config)
var query = "Select Id from Account"
var data = await connector.executeQuery(query)

License

MIT

1.0.4

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