Zipping and Unzipping Files Using Salesforce B2C Commerce Script

If you have large files, it's recommended that you zip them for file transfer. You can automate the zip process if you are using a pipeline to transfer files by creating scripts.

The B2C Commerce API supports the creation and extraction of .zip files.


var catalog: File = new File('/catalog');'/temp/');
var catalogZip : File = new File('/temp/');
catalogZip.unzip('/temp/catalog'); // /temp/catalog created to store unzipped contents.