Custom evaluator for a column in the data feed
I’d like to create a custom evaluator that I’ll use in the product product. The evaluator will get the remaining stock/quantity count from the data feed, and from there I plan on showing a certain message.
What’s the script to get such value?
-
Hi Al Lee,
- First, you need to have the stock level numeric value in a separate column.
- You can then use the getSocialProof/getProductsData API with includeProductData parameter.
- https://support.dynamicyield.com/hc/en-us/articles/360017575533-API-Reference
- It will return all the SKU that including the stock column.
- You can do all of it in an evaluator or Custom Code Action
API example -
DY.ServerUtil.getProductsData(["1217282-400", "1217282-600"], ['daily', 'twoDays'], 'view', true, function(err, res) { console.log(res)})
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire