Find the best product per ingredient
find_ingredientsFind suitable Picnic products for each recipe ingredient by amount and preference, rank matches, and return packs, total cost, and alternatives without changing the cart.
Instructions
Find the best Picnic product for each ingredient of a recipe or shopping list, by a preference. Per item it searches, keeps products whose name contains every query word, and ranks them. Preferences: 'cheapest' (lowest total cost for the amount, so a 250 g pack beats a 1 kg pack when 200 g is needed), 'best_value' (lowest price per kg or litre), 'organic' (only Bio products, cheapest first), 'conventional', 'smallest_pack', 'largest_pack'. Give amount like '300 g', '0.5 l' or '3' (pieces) to get the packs to buy, the total cost and the leftover. Organic is recognised from the product name (Bio, Bioland, Demeter, Naturland). Set preference per item to mix, for example organic vegetables and cheapest pasta. exclude drops products whose name contains a word, such as 'mix' or 'stifte'. Returns best and a few alternatives per item and does not touch the cart: confirm the choices, then call add_to_cart with packs as count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| preference | No | cheapest |