title: Specifying actions for programmatically created coupon code
body: <p>Based off information found in a couple of posts online (<a href="http://www.magentocommerce.com/boards/viewthread/178767/" rel="nofollow noreferrer">http://www.magentocommerce.com/boards/viewthread/178767/</a> and <a href="http://marius-strajeru.blogspot.co.uk/2010/04/create-bulk-discount-rules.html" rel="nofollow noreferrer">http://marius-strajeru.blogspot.co.uk/2010/04/create-bulk-discount-rules.html</a>), I am putting some code together to generate some coupon codes.</p>
  
  <p>One piece I am stuck on is how to write the code to specify the "actions" specific conditions for the coupons use. That would be specified in the "Apply the rule only to cart items matching the following conditions" section of the Actions tab in the Magento admin system.</p>
  
  <p>In the Magento admin system, I would build the following line:</p>
  
  <p>Category  is not one of  10,20,30</p>
  
  <p>What I need to know is how to replicate this in code.
  I currently have the following, which doesn't appear to be working - at least, when I check the generated coupon code, the action values I require are missing.</p>
  
  <pre><code>    $actions = array();
      $actions[1] = array(
      'type' =&gt; 'salesrule/rule_condition_category',
      'aggregator' =&gt; 'all',
      'value' =&gt; 1,
      'new_child' =&gt; ''
      );
      $actions['1--1'] = array(
          'type' =&gt; 'salesrule/rule_condition_category',
          'attribute' =&gt; 'category_ids',
          'operator' =&gt; '!()',
          'value' =&gt; '932,341,800',
          'is_value_processed' =&gt; 0,
      );
      $model-&gt;setData('actions',$actions);
  </code></pre>
  
  <p>I am assuming that the code is simply wrong, although not tripping up the system.
  How I might achieve what I need?</p>