Skip to content

B2B Accounts

James Borden edited this page Jun 15, 2016 · 5 revisions

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:

  1. Like a normal customer

    Thus some B2B accounts are mixed with normal customers.

  2. 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.

  3. 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.

  4. 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

Clone this wiki locally