+Must return what you think of as the best matching discount in your
+C<available_discounts>. This does not have to be the highest discount, but it
+will be compared later to other price sources, and the highest will be set.
+
+=item C<price_from_source SOURCE, SPEC>
+
+Must recreate the price or discount from C<SPEC> and return. For reference, the
+complete C<SOURCE> entry from C<record_item.active_price_source> or
+C<record_item.active_discount_source> is included.
+
+Note that constraints from the rest of the C<record> do not apply anymore. If
+information needed for the retrieval can be deleted elsewhere, then you must
+guard against that.
+
+If the price for the same conditions changed, return the new price. It will be
+presented as an option to the user if the record is still editable.
+
+If the price is not valid anymore or not reconstructable, return a price with
+C<price_source> and C<spec> set to the same values as before but with
+C<invalid> or C<missing> set.
+
+=back
+
+=head1 TRAPS AND CORNER CASES
+
+=over 4
+
+=item *
+
+Be aware that all 8 types of record will be passed to your algorithm. If you
+don't serve some of them, just return empty lists on C<available_prices> and
+C<best_price>
+
+=item *
+
+Information in C<record> might be missing. Especially on newly or automatically
+created records there might be fields not set at all.
+
+=item *
+
+Records will not be calculated. If you need tax data or position totals, you
+need to invoke that yourself.
+
+=item *
+
+Accessor methods might not be present in some of the record types.
+
+=item *
+
+You do not need to do price factor and row discount calculation. These will be
+done automatically afterwards. You do have to include customer/vendor discounts
+if your price interacts with those.
+
+=item *
+
+The price field in purchase records is still C<sellprice>.
+
+=item *
+
+C<source> and C<spec> are tainted. If you store data directly in C<spec>, sanitize.