loopback-connector-salesforce

0.2.1 • Public • Published

loopback-connector-salesforce

This module is designed for basic CRUD with the Salesforce v1 endpoints

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development, testing, and deployment purposes.

Installing

npm i --save loopback-connector-salesforce

Adding connector

  1. Create salesforce.json in /common/models and paste this

    {
      "name": "Salesforce",
      "plural": "Salesforce",
      "base": "Model",
      "idInjection": false,
      "options": {},
      "properties": {},
      "validations": [],
      "relations": {},
      "acls": [],
      "methods": {}
    }
  2. Create salesforce.js in /common/models and paste this

    'use strict';
    
    module.exports = require('loopback-connector-salesforce');
  3. Add the model relation to transient datasource in model-config.json:

    "Salesforce": {
      "dataSource": "db"
    }
  4. Add the in memory datasource to datasource.json:

    "db": {
      "name": "db",
      "connector": "memory"
    }
  5. 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=`
    

Available remote methods

  • OpportunityUpdate
  • UserByEmail

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Readme

Keywords

none

Package Sidebar

Install

npm i loopback-connector-salesforce

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

8.41 kB

Total Files

12

Last publish

Collaborators

  • seanflores86