Build UI
Modify Response
Examples
3min
modify response below are some common uses of modifying the query response you can find guides for more elaborate customizations within the how to section of the template js documentation please review the modify response overview docid\ k usia fv m380bqcaw7p for complete details on the syntax used for modifying the incoming query response modify datapoints product datapoints can be modified before it goes into templating klevu modifyresponse("landing", function(data, scope){ klevu each(data template query productlist result, function(indx, product) { if (indx === 5) { product saleprice = '999 00'; } }); }); additional datapoints custom datapoints can be added to the product response before it goes into templating these additional points are commonly used in display or other rendering logic klevu modifyresponse("landing", function(data, scope){ klevu each(data template query productlist result, function(indx, product) { if (indx === 5) { product myflag = true; } }); });