Something like that.
I use the accountid session variable (id of current login) to identify which discountaccountid to use, (the same discountaccountid may apply to several accounts).
I use this discountaccountid to filter my discount recordset,
When the 'add to cart' is triggered, the discountgroup of the selected item is used in a lookup query, which returns one row, with all of the min/max parameters and associated discounts
I have 36 different discount groups, I suppose once I have filtered my recordset by discountaccountid i could put them into an array, store the array as a session and try to use the array values in my calculation