This module is designed for basic CRUD with the Salesforce v1 endpoints
These instructions will get you a copy of the project up and running on your local machine for development, testing, and deployment purposes.
npm i --save loopback-connector-salesforce
-
Create
salesforce.json
in /common/models and paste this{ "name": "Salesforce", "plural": "Salesforce", "base": "Model", "idInjection": false, "options": {}, "properties": {}, "validations": [], "relations": {}, "acls": [], "methods": {} }
-
Create
salesforce.js
in /common/models and paste this'use strict'; module.exports = require('loopback-connector-salesforce');
-
Add the model relation to transient datasource in
model-config.json
:"Salesforce": { "dataSource": "db" }
-
Add the in memory datasource to
datasource.json
:"db": { "name": "db", "connector": "memory" }
-
Add the following environment variables to connect to the server depending on auth type preferred
DEV
`NODE_ENV=staging` `SALESFORCE_USER=` `SALESFORCE_PASS=` `SALESFORCE_SECURITYTOKEN=` `SALESFORCE_PASSTOKEN=`
PROD
`NODE_ENV=production` `SALESFORCE_USER=` `SALESFORCE_PASS=` `SALESFORCE_SECURITYTOKEN=` `SALESFORCE_PASSTOKEN=` `SALESFORCE_APIVERSION=` `SALESFORCE_REDIRECTURL=` `SALESFORCE_CLIENTID=` `SALESFORCE_CLIENTSECRET=`
- OpportunityUpdate
- UserByEmail
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Sean Flores - Initial work - InternalAnalytics