@chg/salesforce-users

1.1.0 • Public • Published

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");

Readme

Keywords

Package Sidebar

Install

npm i @chg/salesforce-users

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

23.5 kB

Total Files

9

Last publish

Collaborators

  • deadbool
  • lighttester
  • john.miller.chg
  • codander
  • jenn17
  • darrius.wright
  • jrasmussen
  • chg_admin