0

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 1

0

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:

https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/DWAPI/scriptapi/html/api/class_dw_system_Pipeline.html?resultof=%22%70%69%70%65%6c%69%6e%65%22%20%22%70%69%70%65%6c%69%6e%22%20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .