diff -dur uc_affiliate2.ca.inc.orig uc_affiliate2.ca.inc
--- uc_affiliate2.ca.inc.orig	2010-06-09 06:42:16.000000000 -0700
+++ uc_affiliate2.ca.inc	2010-07-03 22:41:04.000000000 -0700
@@ -23,6 +23,10 @@
     '#title' => t('Affiliate Commission'),
     '#type' => 'object',
   );
+  $entities['uc_affiliate2_identifier'] = array(
+    '#title' => t('Affiliate Identifier'),
+    '#type' => 'integer',
+  );
 
   return $entities;
 }
@@ -161,11 +165,23 @@
     '#entity' => 'uc_order',
     '#title' => t('Order'),
   );
+  $affiliate_identifier = array(
+    '#entity' => 'uc_affiliate2_identifier',
+    '#title' => t('Affiliate identifier'),
+  );
   $affiliate_commission = array(
     '#entity' => 'uc_affiliate2_commission',
     '#title' => t('Affiliate commission'),
   );
 
+  $triggers['uc_affiliate2_pre_apply_commission'] = array(
+    '#title' => t('Affiliate commission about to be applied'),
+    '#category' => t('Affiliate2'),
+    '#arguments' => array(
+      'order' => $order,
+      'affiliate_identifier' => $affiliate_identifier,
+    ),
+  );
   $triggers['uc_affiliate2_apply_commission'] = array(
     '#title' => t('Affiliate commission being applied'),
     '#category' => t('Affiliate2'),
diff -dur uc_affiliate2.module.orig uc_affiliate2.module
--- uc_affiliate2.module.orig	2010-06-08 07:28:51.000000000 -0700
+++ uc_affiliate2.module	2010-07-03 23:57:04.000000000 -0700
@@ -653,6 +653,8 @@
     return;
   }
 
+  ca_pull_trigger('uc_affiliate2_pre_apply_commission', $order, is_null($affiliate_id) ? -1 : (int)$affiliate_id);
+
   $context = array(
     'revision' => 'altered',
     'type' => 'order_product',
