seneca-salesforce-store
v1.0.0
Published
Salesforce plugin for Seneca
Downloads
9
Readme
Seneca Salesforce Store
A Seneca Data Store for SalesForce.
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.