A sleek and powerful library for faster and easier development in Salesforce Marketing Cloud ©.
Explore the Docs
·
Get in touch
·
email360 Blog
.
email360 Youtube
This library is open source and free to use for the community. If you find this library helpful and want to support me, please feel free to grab me a coffee for the late night grinds. Your support is greatly appreciated.
To install the Email360 ssjs-lib into your project create a Cloudpage and insert the following code:
%%=TreatAsContent(HTTPGet('https://raw.githubusercontent.com/email360/ssjs-lib/master/setup/setup.ssjs'))=%%
Please watch the following video for a full guide on the installation of the SSJS Library.
All steps are optional and if you experience a timeout refresh the page.
Details of the script that is run for installation can be found at https://raw.githubusercontent.com/email360/ssjs-lib/master/setup/setup.ssjs
After the installation add the following code at the top of your script to get started.
Change the prefix and version as desired. Default is email360 and version 1.0.1
Platform.Load("Core", "1");
Platform.Function.ContentBlockByKey('[prefix]-ssjs-lib-[version]');
After executing the installation process you'll find the following directories and files, logically grouping common assets.
Marketing Cloud/
├── Data Extensions/
│ └── [BRAND NAME]/
│ └── SSJS Lib/
│ └── [VERSION]
│ ├── SSJS Lib - Auth Users - [VERSION]_[BRAND NAME]
│ ├── SSJS Lib - Authentication - [VERSION]_[BRAND NAME]
│ ├── SSJS Lib - Log Error - [VERSION]_[BRAND NAME]
│ ├── SSJS Lib - Log Warning - [VERSION]_[BRAND NAME]
│ ├── SSJS Lib - SFMC Api Token - [VERSION]_[BRAND NAME]
│ └── SSJS Lib - WSProxy Cols - [VERSION]_[BRAND NAME]
│
└── Content Builder/
└── [BRAND NAME]/
└── SSJS Lib/
└── [VERSION]
├── CloudPages/
│ ├── Error/
│ │ └── Error Page
│ └── Login/
│ └── Login Page
└── Lib/
├── SSJS Lib - settings
├── SSJS Lib - cloudpage
├── SSJS Lib - amp
├── SSJS Lib - wsproxy
├── SSJS Lib - core
├── SSJS Lib - polyfill
├── SSJS Lib - einstein
└── SSJS Lib - sfmcapi
Version 1.01
- Introducing versions. Versions will be added to customer keys and DataExtension names. This will allow you to install newer versions of the library without any possible issues on existing code due to backward compatibility.
- Added JWT support. A new
script
has been added:var jwt = new jwt();
- jwt.encode();
- jwt.decode();
- jwt.verify();
- Introducing log4ssjs to the SSJS library. Similar to log4js but different...
var log = new logger('name')
;log.level = "DEBUG"
;- Additionally you can set appenders.
log.configure = {appenders:[ {type:"dataExtension",level:"INFO"}, {type:"console",level:"TRACE"}]}
- Currently supported
- console
- json
- html
- DataExtension
- HTTPRequest
- TriggeredSend
- Removed script tags from library files for better lint support in vs-code
- Introduce a setup wizard to assist with installation
Email360's SSJS Lib documentation can be found at https://docs.email360.io
For any tips and tricks please head over to the email360 youtube channel
Email360's SSJS Lib can be found at https://github.com/email360/ssjs-lib
We welcome all who want to contribute to this repository, to contribute please follow these guidelines.
-
Fork the repo and create your branch from
master
. A guide on how to fork a repository can be found here. -
Make your changes, test where/if possible.
-
If your changes alter the behaviour of any of the code, update the corresponding comments within the codebase. The updated comment will then be used to update the documentation found within our docs
-
Open a pull request against the
master
branch at https://github.com/email360/ssjs-lib. -
Leave a comment on the pull request stating the reason for the change.
-
One of the administrators of
email360/ssjs-lib
will review your code, merge it or ask for changes.
This library would not have been possible without the Salesforce Marketing Cloud © community. Ohana!
Special thanks to the following people for their active contribution to the community:
Ivan Razine, Adam Spriggs, Zuzanna Jarczynska, Eliot Harper, Mateusz Dąbrowski, Gregory (Gortonington) Gifford
Code and documentation copyright 2020 the email360 SSJS Lib under the MIT License.