Column lead_types.priority present Vocabulary bands in force purchase_requirement high floor 40 keeps band from 50 quotation_request high floor 45 keeps band from 55 pricing_request high floor 50 keeps band from 60 demo_request high floor 50 keeps band from 60 meeting_request medium floor 55 keeps band from 65 renewal_upsell high floor 50 keeps band from 60 product_enquiry medium floor 60 keeps band from 70 Derivation [ok] pricing_request @ 90 got 'high' want 'high' [ok] purchase_requirement @ 95 got 'high' want 'high' [ok] renewal_upsell @ 80 got 'high' want 'high' [ok] meeting_request @ 90 got 'medium' want 'medium' [ok] product_enquiry @ 95 got 'medium' want 'medium' [ok] pricing_request @ 52 (floor 50) got 'medium' want 'medium' [ok] product_enquiry @ 62 (floor 60) got 'low' want 'low' [ok] quotation_request @ 45 (floor 45) got 'medium' want 'medium' [ok] quotation_request @ 55 (floor 45) got 'high' want 'high' [ok] product_enquiry unscored got 'medium' want 'medium' [ok] pricing_request unscored got 'high' want 'high' [ok] alias "rfq" @ 90 got 'high' want 'high' [ok] alias "rate_card" @ 51 got 'medium' want 'medium' [ok] not a lead got NULL want NULL [ok] unknown type got NULL want NULL [ok] demote high got 'medium' want 'medium' [ok] demote low stays low got 'low' want 'low' Sort order (band first, certainty within it) [ok] a High outranks any Medium got true want true [ok] surest High first got true want true [ok] unknown band above a non-lead got true want true SQL filter agrees with the PHP derivation, over every type and score probe holds 794 rows: 36 vocabulary words x 22 scores, plus a non-lead and an unknown type [ok] high sql 307 / php 307 got 307 want 307 [ok] medium sql 342 / php 342 got 342 want 342 [ok] low sql 143 / php 143 got 143 want 143 [ok] every banded row in exactly one band got 792 want 792 [ok] the non-lead and the unknown type get no band got 2 want 2 The real mailbox 59 lead(s) stored. high 45 medium 9 low 5 All checks passed.