-
Notifications
You must be signed in to change notification settings - Fork 2
B2B Accounts
Note: total_price = service_fee + (gas_price * (gallons - referral_gallons_used)) - coupon_value
B2B accounts have a total_price = 0 in the db which follow scheme 2 and 3. This allows for B2B accounting that is separate from that in the main app.
There are four ways that B2B accounts make orders:
-
Like a normal customer
Thus some B2B accounts are mixed with normal customers.
-
Using app, but with a lot of referral gallons and subscription ID 3 (no delivery fees)
referral_gallons of user is set to large number, e.g. 1000. referral_gallons are automatically deducted from gallons in the app, thus the (gas_price * (gallons - referral_gallons_used)) term goes to 0.
The user.subscription_id = 3 allows for an inifinite amount of free 1 and 3 hr deliveries. Thus the service_fee term goes to 0. There shouldn't be any coupon_codes with these accounts.
-
Using app, but with a lot of referral gallons and custom coupons to remove or lower delivery fees
Before we used the subscription ID 3 to handle delivery fees, we used coupon_codes to credit the user for their delivery fees. Thus, service_fee = coupon_value for these accounts.
-
Via email or other communication with Brandon (completely outside our tech system).
Users of the referral gallons hack (#2 and #3) are these accounts: evU83hVPIbccvZE0C2uL, nszMr7cDRfRrbTksXaEC, k4KTi1xmes8LLd9ZZhsH