Salesforce Marketing Cloud node SDK
The Fuel SDK for Node provides easy access to Salesforce Marketing Cloud's API endoints.
API´s supported REST & SOAP SFMC
npm install --save sfmc-easy-connect
// require mode
const { easyConnectSFMC } = require("sfmc-easy-connect");
// module mode
import { easyConnectSFMC } from "sfmc-easy-connect";
const urlTenant = id_tenant; // https://id_tenant.auth.marketingcloudapis.com
const apiKey = "YOUT-API-KEY";
const connection = new easyConnectSFMC(
idClient,
secretId,
account,
urlTenant,
apiKey
);
You can use the functionalities keeping in mind that they are all asynchronous
//Promise
const token = connection.auth
.getAuth()
.then((token) => token)
.catch((err) => err);
//async await
try {
const data = await connection.auth.getAuth();
} catch (err) {
// todo err
}
- Auth (token, refreshToken, getActualUser, getUserInfo)
- dataFolder (create, delete, update, getFolder, getFolders)
- dataExtension (create, addColumn, clearInfo, delete, getByKey, getByName, datasByKey, datasByName)
- journey (getById, deleteUser)
- contact (getActiveJourneys, create, update, delete, deletionProcess)
- DataRows
- Automations
- Automation Activities
- Jouneys
- Subscribers
- Contacts (update atributes)