View sfcc-import-inventory-example2-importInventtory.js
/** | |
* 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. |
View sfcc-import-inventory-example2-steptypes.json.js
{ | |
"step-types": { | |
"script-module-step": [ | |
{ | |
"@type-id": "custom.HDK.ImportInventory", | |
"module": "app_storefront_controllers/cartridge/scripts/importInventory", | |
"function": "importInventory", | |
"parameters": { | |
"parameters": [ | |
{ |
View import-inventory-example1.js
/** | |
* Learn Salesforce Commerce Cloud | |
* | |
* @author HDK | |
* Import inventory from the WebDav Directory | |
*/ | |
importPackage( dw.system ); | |
importPackage( dw.io ); | |
function execute( args : PipelineDictionary ) : Number { |