I am converting a pipeline into a site genesis controller version in sfcc b2c. But unfortunately, that pipeline has multiple pipelines inside it. and there are also multiple pipelines are being used in its child. That is too lengthy to convert. IS there is any way in SiteGensis Controllers to use Pipeline inside Controller. e.g I want to call a pipeline inside the SiteGensis controller. Thanks.
1 Answer
You can do it like this:
let Pipeline = require('dw/system/Pipeline');
let pdict = Pipeline.execute('MyPipeline-Start', {
MyArgString: 'someStringValue',
MyArgNumber: 12345,
MyArgBoolean: true
});
let result = pdict.MyReturnValue;
The original documentation: