1.1.0 • Published 5 years ago

@chg/salesforce-users v1.1.0

Weekly downloads
44
License
MIT
Repository
github
Last release
5 years ago

Salesforce-Users

This module contains methods used when interacting with salesforce users. There are a number of methods that can be used to retrieve details about a user and a utility method for setting properties of those users.

Usage

npm i @chg/salesforce-users

const sfUsers = require('@chg/salesforce-users')('client_id', 'client_secret', 'dev');

// make sure the user you use has access to change user and contact records in salesforce
sf.authorize('admin_user', 'shhh secret password!'); 

// Get/Set user
const user = await sf.getUser('MrTumnus@yahoo.com');
await sf.setUser('MrTumnus@yahoo.com', { FavoriteFood: "Turkish Delight" });

// Get/Set contact
const contact = await sf.getContact('MrTumnus@yahoo.com');
await sf.setContact('MrTumnus@yahoo.com', { FavoriteFood: "Turkish Delight" });

// We are ready to delete Mr. Tumnus
await sf.deactivateUser("MrTumnus@yahoo.com");
1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago