A Seneca Data Store for SalesForce.
seneca-salesforce-store
is built on top of JSForce, which is documented in detail here.
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.
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
seneca-salesforce-store
uses debug, to enable, pass DEBUG=seneca-salesforce-store
environment variable.
Copyright Damian Beresford and Senecajs.org contributors, 2016, Licensed under MIT.