Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.


Repository files navigation

⚠️ MOVED TO OpenFn/adaptors! ⚠️

N.B.: New versions are available at:

Language SalesForce (Archived)

Salesforce Language Pack for OpenFn. **See the main docs site: **

Release notes and deprecated

See releases for all changes.

Sample configuration

  "loginUrl": "https://somesalesforcelogin.url/",
  "username": "someusername",
  "password": "somesupersecretpassword",
  "securityToken": "salesforcesecuritytoken"


Allow communication with Salesforce using a set of Lisp compatible expressions.

Using simple functions we can create a simplified API, simple enough to generate code from data.


Expressions are a simplified set of function calls. Outlining the operations needed to be performed.

An uncompiled expression has no knowledge of the internals of the adaptor, credentials or runtime environment.

It's the responsibility of the build process to provide a wrapper that will inject the functions in.

For example:

  create('vera__Test_Event__c', {
    vera__Test_Event_Name_Unique__c: 'hello from jsforce',
  create('vera__Boat__c', {
    Name: 'Catatafish redux!',
    vera__Test_Event__c: reference(0),

## API

field("key","value") Returns { "key": "value" }

relationship("relationship_name__r", "externalID", dataSource("path"))



bulk('obj_name', 'operation', 'options', arrayOfFields)

create('obj_name', fields())

destroy('obj_name', fields())

createIf(logical, 'obj_name', fields())

upsert(sObject, 'externalID', fields())

upsertIf(logical, 'obj_name', 'externalID', fields())

update('obj_name', fields())


Clone the repo, run npm install.

Run tests using npm run test or npm run test:watch

Build the project using make.

To build the docs for this repo, run ./node_modules/.bin/jsdoc --readme ./ ./lib -d docs.

## Other

Create SOAP session

curl -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: login" -d @tmp/login.txt | xmllint --format -

Close jobs

curl -H 'X-SFDC-Session: abc123sessionID456xyz' -H "Content-Type: application/xml; charset=UTF-8" -d @tmp/close_job.txt | xmllint --format -