Salesforce SDK for Node.js Functions

Any use of the Service is subject to the applicable Services Terms provided at Agreements and Terms.

Note

Use the Salesforce SDK for Node.js Functions to develop Functions in TypeScript.

Use the Salesforce SDK for Node.js Functions 

See Set Up Your Development Environment.

Example Function 

This JSON is a sample package.json file.

1{
2  "name": "nodejs-example-function",
3  "version": "1.0.0",
4  "description": "",
5  "main": "index.js",
6  "scripts": {
7    "test": "echo \"Error: no test specified\" && exit 1"
8  },
9  "author": "",
10  "license": "ISC",
11  "dependencies": {
12    "yahoo-stock-prices": "^1.1.0"
13  }
14}

This code is a sample index.js file.

1import { getCurrentData } from "yahoo-stock-prices";
2
3export default async function (event, context, logger) {
4  logger.info("I'm logging stuff!");
5  return getCurrentData("CRM");
6}

Interfaces 

Type Aliases 

Product Retirement Announcement

Salesforce Functions is no longer available for purchase or renewal. To preserve the capabilities that Salesforce Functions provided to your org, deploy an alternative solution before your existing order term ends. See Salesforce Functions Retirement for more information on migrating your functions. Contact your Salesforce Account Executive for more information on Heroku.