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

salesforce-platform-nxg-cg-lib

v1.0.6

Published

Integration with saleforce API's

Downloads

38

Readme

N|Solid

Salesforce getQueryObject

This code has the objective of getting all the information inside of a Salesforce object in a Json format.

Example:

Retrieving all Lead Object information.

::Input example::

url : "https://yoursalesforce.salesforce.com",
query : "SELECT FIELDS(All) FROM LEAD ORDER BY Name LIMIT 50",
clientId : "yourClientID",
clientSecret : "yourClientSecret"

::Output example::

info: Jan-18-2024 15:08:58:     {
totalSize: 1,
  done: true,
  records: [
    {
      attributes: [Object],
      Id: '00QHs00001y2vZqMAI',
      IsDeleted: false,
      MasterRecordId: null,
      LastName: 'Young',
      FirstName: 'Andy',
      Salutation: 'Mr',
      Name: 'Andy Young',
      Title: 'SVP, Operations',
      Company: 'Dickenson plc',
      Street: null,
      City: null,
      State: 'KS',
      PostalCode: null,
      Country: 'USA',
      Latitude: null,
      Longitude: null,
      GeocodeAccuracy: null,
      Address: [Object],
      Phone: '(620) 241-6200',
      MobilePhone: null,
      Fax: null,
      Email: '[email protected]',
      Website: null,
      PhotoUrl: '/services/images/photo/00QHs00001y2vZqMAI',
      Description: null,
      LeadSource: 'Purchased List',
      Status: 'Closed - Converted',
      Industry: null,
      Rating: null,
      AnnualRevenue: null,
      NumberOfEmployees: null,
      OwnerId: '005Hs00000DwqsAIAR',
      IsConverted: false,
      ConvertedDate: null,
      ConvertedAccountId: null,
      ConvertedContactId: null,
      ConvertedOpportunityId: null,
      IsUnreadByOwner: true,
      CreatedDate: '2024-01-10T17:44:10.000+0000',
      CreatedById: '005Hs00000DwqsAIAR',
      LastModifiedDate: '2024-01-10T17:44:10.000+0000',
      LastModifiedById: '005Hs00000DwqsAIAR',
      SystemModstamp: '2024-01-10T18:09:11.000+0000',
      LastActivityDate: null,
      LastViewedDate: null,
      LastReferencedDate: null,
      Jigsaw: null,
      JigsawContactId: null,
      CleanStatus: 'Pending',
      CompanyDunsNumber: null,
      DandbCompanyId: null,
      EmailBouncedReason: null,
      EmailBouncedDate: null,
      IndividualId: null,
      IsPriorityRecord: false,
      SICCode__c: '2768',
      ProductInterest__c: 'GC5000 series',
      Primary__c: 'Yes',
      CurrentGenerators__c: 'All',
      NumberofLocations__c: 130
    }
  ]
}

Salesforce objectCreate

This code has the objective of adding a new item on a saleforce object.

Example:

Adding a new item to Lead object.

::Input example::

let cfg = { 
        url : "https://yoursalesforce.my.salesforce.com",
        version: "yourVersion",
        sobject_api_name: "lead",
        clientId : "yourClientID",
        clientSecret : "yourClientSecret",
        tableProperties : {
            "LastName": "Ortiz",
            "FirstName": "Mauricio",
            "Company" : "CloudGenSys"
        }
    }

::Output example::

info: Jan-23-2024 16:18:42:     { id: '00QHs00001xdjg4MAA', success: true, errors: [] }

Salesforce objectDelete

This code has the objective of removing an item from a saleforce object.

Example:

Deleting an item from Lead object.

::Input example::

    let cfg = { 
        url : "https://yoursalesforce.my.salesforce.com",
        version: "yourVersion",
        sobject_api_name: "lead",
        clientId : "yourClientID",
        clientSecret : "yourClientSecret",
        recordId : "yourRecordID"
    }

::Output example::

There will be no response

Salesforce objectUpdate

This code has the objective of updating an item from a saleforce object.

Example:

Updating an item from Lead object.

::Input example::

    let cfg = { 
        url : "https://yoursalesforce.my.salesforce.com",
        version: "yourVersion",
        sobject_api_name: "lead",
        clientId : "yourClientID",
        clientSecret : "yourClientSecret",
        recordId : "yourRecordID",
        tableProperties : {
            "Title": "Solutions Architect",
            "LeadSource": "Phone Inquiry"
        }

::Output example::

There will be no response