0

函数 abc(){

var Site = require('dw/system/Site');
var utils= require('app_nars/cartridge/scripts/util/utils.js');
var mySite : String = (Site.getCurrent().getID() == "a") ? "" : "-" + Site.getCurrent().getID();
var customerGroupName : String ; 
if (mySite == "A") {
    customerGroupName = "A";
} else { 

    customerGroupName = "B";
}
var grpNam= utils.getGroup(customerGroupName);
var grpFileName = 'test';
/* No script api available for pipelet ExportCustomerGroups*/
var Pipelet = require('dw/system/Pipelet');
var PipeletExecutionResponse = new dw.system.Pipelet('ExportCustomerGroups').execute({
    CustomerGroups: grpNam.iterator(),
    ExportFile  : grpFileName,
    OverwriteExportFile:true
});
app.getView().render('path/templateName');

}

我们如何在这里替换 Pipelet ExportCustomerGroups,我可以在文档中看到我们可以使用作业步骤并且没有脚本替换

4

1 回答 1

0

您必须使用自己的代码创建,在解析客户时构建所需的 xml。[在此处输入图像描述][1]

或者,如果那里不需要自定义代码,您可以在配置作业时使用此步骤:[1]:https ://i.stack.imgur.com/s1VQa.png

于 2021-07-13T12:35:25.740 回答