Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.67 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.67 KB

Seneca

A Seneca Data Store for SalesForce.

Seneca Salesforce Store

Build Status Coverage

seneca-salesforce-store is built on top of JSForce, which is documented in detail here.

Usage

  seneca.use('salesforce-store', {
    loginUrl: process.env.url,
    username: process.env.username,
    password: process.env.password
  });

  seneca.ready();

...

  var lead = seneca.make$('Lead');
  lead.Company = 'Test Company';
  lead.LastName = 'Test Name';
  lead.save$(function (err) {
...

See test-basic for more.

Tests

Basic unit tests with npm test, everything is mocked.

There are acceptance tests which hit SalesForce (creatings test Leads etc), to run these you need to provide your own Salesforce Sandbox environment and credentials. To run:

env url='https://test.salesforce.com' [email protected] password=Password1 ./node_modules/.bin/turbo test/accept

Debug

seneca-salesforce-store uses debug, to enable, pass DEBUG=seneca-salesforce-store environment variable.

License

Copyright Damian Beresford and Senecajs.org contributors, 2016, Licensed under MIT.