npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

salesforcer

v0.0.2

Published

Module for saving leads using the salesforce API

Downloads

18

Readme

Salesforcer Lead Poster

This is a module for the purpose of saving leads to salesforce via the Rest API. This module only supports the Session ID Authorization model.

You will need to obtain a clientId and a clientSecret. Please see documentation for more information. Salesforce Rest Api Documentation

var SalesForcer = require('salesforcer');

var sales = new SalesForcer({
	clientId: 'clientId',
	clientSecret: 'clientSecret',
	username: 'username',
	password: 'password'
})

sales
    .createLead({
        email: '[email protected]',
        firstName: 'TESTAPILEAD',
        company: "My Test Company",
        lastName: 'fredrick'
    }, function (err, result) {
        // do something with results
    });

Important

Please make sure to read about the security token here

Basically, you will have to append your security token to the end of your password. It tripped me up for a while until I found this information buried in the docs.

from the docs:

For access via the API or a client, users must add their security token (or time-based token if Two-Factor Authentication on API Logins is set on the user’s profile and the user has added a time-based token to his or her account) to the end of their password in order to log in.

A security token is an automatically-generated key from Salesforce. For example, if a user’s password is mypassword, and the security token is XXXXXXXXXX, then the user must enter mypasswordXXXXXXXXXX to log in. Or, some client applications have a separate field for the security token. Users can obtain their security token by changing their password or resetting their security token via the Salesforce user interface. When a user changes their password or resets their security token, Salesforce sends a new security token to the email address on the user’s Salesforce record. The security token is valid until a user resets their security token, changes their password, or has their password reset.