Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@basetime/bldr-sfmc-sdk
Advanced tools
Readme
SDK for core BLDR functionality
const bldrSDK = require('@basetime/bldr-sfmc-sdk')
// OR
Import { bldrSDK } from '@basetime/bldr-sfmc-sdk'
const authObject = {
client_id: 'xxxxxxxxxx',
client_secret: 'xxxxxxxxxx',
auth_url: 'https://xxxxxxxxxx-xxxxxxxxx.auth.marketingcloudapis.com/',
account_id: 'xxxxxxxxx'
}
const bldr = new bldrSDK(authObject)
const { sfmc } = bldr
Folder functionality is based on the DataFolder SOAP API object unless otherwise documented.
const request = await sfmc.folder.search({
contentType: 'asset',
searchKey: 'Name',
searchTerm: 'bldr-sfmc'
})
const request = await sfmc.folder.getFolder({
contentType: 'asset',
categoryId: 3134
})
const request = await sfmc.folder.getSubfolders({
contentType: 'dataextension',
parentId: 3134
})
const request = await sfmc.folder.createFolder({
contentType: 'dataextension';
name: 'new bldr folder';
parentId: 3134;
})
const request = await sfmc.folder._updateAllowChildren({
contentType: 'dataextension';
categoryId: 3134;
});
const request = await sfmc.asset.getByAssetId(8272);
const request = await sfmc.asset.getAssetByLegacyId(8272);
const request = await sfmc.asset.getAssetsByFolderArray([3134, 8373, 8727]);
const request = await sfmc.asset.getAssetByNameAndFolder({
assetName: 'bldr_api';
assetFolderName: 'ssjs_functions';
});
const request = await sfmc.asset.searchAsset({
searchKey: 'name';
searchTerm: 'bldr_api';
});
const request = await sfmc.asset.postAsset({
"name": "Asset Name",
"data": {
"email": {
"options": {
"characterEncoding": "utf-8"
}
}
},
"views": {
"html": {
"content": "<!DOCTYPE html>.....</html>"
}
},
"text": {},
"subjectline": {
"content": "%%First_Name%% this is my subject line"
},
"preheader": {
"content": "updated the preheader too!"
},
"assetType": {
"name": "htmlemail",
"id": 208
}
})
const request = await sfmc.asset.putAsset({
"name": "Asset Name",
"data": {
"email": {
"options": {
"characterEncoding": "utf-8"
}
}
},
"views": {
"html": {
"content": "<!DOCTYPE html>.....</html>"
}
},
"text": {},
"subjectline": {
"content": "%%First_Name%% this is my subject line"
},
"preheader": {
"content": "updated the preheader too!"
},
"assetType": {
"name": "htmlemail",
"id": 208
}
})
const request = await sfmc.asset.getImageData(3837)
FAQs
SDK for BLDR SFMC Core Functionality
The npm package @basetime/bldr-sfmc-sdk receives a total of 5 weekly downloads. As such, @basetime/bldr-sfmc-sdk popularity was classified as not popular.
We found that @basetime/bldr-sfmc-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.