Conditional mapping with Feeds Using Feeds, I am trying to import products from a source CSV.  One of the CSV columns contains the quantity of items in stock.  The goal is to map it to a product 'Stock Status' field.  If the quantity field is greater than zero, 'Stock Status' is 'In Stock'; if zero, 'Stock Status' is 'Out of Stock'.

I didn't see a Feeds Tamper plugin or combination of plugins that would work and my attempts to use Rules so far have failed.

Thank you in advance for any help.
The easiest is to just put a formula into a spreadsheet and alter your source csv.

Else you could write your own feeds tamper plugin.

Create an empty file called 'stock.inc' and place it into the feeds_tamper/plugins directory. Add this to it:

&lt;?php
$plugin = array(
  'form' =&gt; 'feeds_tamper_stock_form',
  'callback' =&gt; 'feeds_tamper_stock_callback',
  'name' =&gt; 'Calculate stock',
  'multi' =&gt; 'direct',
  'category' =&gt; 'Other',
);

function feeds_tamper_stock_form($importer, $element_key, $settings) {
  return array(
    'help' =&gt; array(
      '#markup' =&gt; t('Sets the stock status'),
    ),
  );
}

function feeds_tamper_stock_callback($result, $item_key, $element_key, &amp;$field, $settings, $source) {
  $field = $result-&gt;items[$item_key] &gt; 0 ? 'In Stock' : 'Out of Stock' ;
}


Clear your cache.

I have not tested this but I believe it will get you close.