Skip to content

Instantly share code, notes, and snippets.

View hdkhanhkhtn's full-sized avatar

Duy Khanh hdkhanhkhtn

View GitHub Profile
http://development-ap01-tomorrowland.demandware.net/dw/image/v2/BJFC_DEV/on/demandware.static/-/Sites-tomorrowland-master-catalog/default/dw9f438a07/images/
/**
* Learn Salesforce Commerce Cloud
*
* @author HDK
* Import inventory from the WebDav Directory
*
* @input WorkingFolder : String Local folder relatively to IMPEX/src.
* @input FilePattern : String Input File pattern to search in local folder relatively to IMPEX/ (default is "^Inventory_(\d){14}\.xml$").
* @input ImportMode : String The import mode (DELETE|MERGE|REPLACE|UPDATE)
* @input ImportFailedStatus : String Import status object after import failed.
{
"step-types": {
"script-module-step": [
{
"@type-id": "custom.HDK.ImportInventory",
"module": "app_storefront_controllers/cartridge/scripts/importInventory",
"function": "importInventory",
"parameters": {
"parameters": [
{
@hdkhanhkhtn
hdkhanhkhtn / import-inventory-example1.js
Created May 25, 2019 16:34
Salesforce Commerce Cloud - SFCC - Simple code import inventory by job
/**
* Learn Salesforce Commerce Cloud
*
* @author HDK
* Import inventory from the WebDav Directory
*/
importPackage( dw.system );
importPackage( dw.io );
function execute( args : PipelineDictionary ) : Number {