Skip to main content

Developer README for the salesforce adaptor


Language Salesforce

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 adaptors monorepo. Follow the Getting Started guide inside to get set up.

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

Build the project using pnpm build.

To just build the docs run pnpm build 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 -