18 ms·
> Like I said, this is a very simplistic way of viewing how to do billing. Sure, today you only have the hour dimension when choosing a price. But then sales as
by Maxion 4y ago
> Like I said, this is a very simplistic way of viewing how to do billing. Sure, today you only have the hour dimension when choosing a price. But then sales asks you to give a discount to a specific, very large, customer. For only a single resource. For only the first three months. Suddenly, and very predictably, your billing is not so simple any more.
I'm not sure if I'm missng some part of the complexity here, but with the solution jiggawatts proposed, wouldn't the above scenario be fairly trivial to solve?
Just implement a new SKU for this special one-time (more like first time...) discount that the account manager applies to the account.
If you want to be fancy, you could code in (or leverage one of the dozen cloud tools, depending on where you're deployed) to enable the SKU for the customer at period X and remove it at period Y and replace with the previous SKU.
To ease reporting, in your main SKU table you could have a parent_sku column and a sku_type column explaining that this row is a special discount child SKU of the parent_sku. Add basic databse restrictions and validations.
Billing is complex and requires lots of domain knowledge, but IMO it's not really THAT hard from my experience.
EDIT:
IMO a harder scenario for any billing system to deal with is account manager A made a sweetheart deal to make customer B less angry, removing one SKU completely from last months bill, giving them a 25% discount for the next invoice, and giving them some freebie.
These types of requests usually end up with a lot of issues unless the business logic promised to the customer already exists.
- doctor_eval 4y agoWell, the problem with the first scenario is that if the discount is percentage based (say, 10% off), then it's going to require code to calculate. It's no longer just an SKU - it's an SKU which does a calculation, which is presumably not part of the platform already. And so we have a new "discount" SKU - but which line items should the SKU apply to? How do we know when to stop using that SKU when the discount runs out? And anyway, why should an SKU have a discount % field on it? Why do we get different behaviours based on some magic SKU field? It's a breakdown in cohesion... and so the spaghetti begins... You can also argue that we can just "get someone" to apply discounts manually, but isn't that the job of the billing system? Manual labour doesn't scale too well, and a lot of mistakes get made - asking a customer to return an accidentally applied discount is a very, very difficult conversation, and I've worked with companies who simply had to absorb years of incorrect discounts because doing so was the only way to keep the customer.
- donavanm 4y agoDont forget co-selling discounts. First 100 messages free with a monthly resource. And is that per monthly resource, or each monthly resource?
- AnhTho_FR 4y agoAlso, here is an example of 'looks simple' but 'raises many question' 1/ Should it be a discount on future invoices, or a refund (an angry customer will ask for a real refund: aka $$ on their bank account)? 2/ Do you want to keep track of how much has been discounted/refunded to which customer (so that you can identify deeper trends: if a segment is being discounted many times: maybe you can adjust things, or maybe it's fraud?)? In that case, just erasing a line doesn't help 3/ If you refund, how do you deal with taxes that have been paid already? Btw, we've written a quick primer on Refunds, Coupons, and Credit Notes: to lay out the pros/cons https://github.com/getlago/lago/wiki/A-Primer-on-Refunds,-Coupons-&-Credit-Notes https://github.com/getlago/lago/wiki/A-Primer-on-Refunds,-Co...
- doctor_eval 4y ago#3 is an absolutely classic example of unanticipated complexity. Tax might differ depending on individual line items on an invoice, so if you’re refunding $50 on a $100 invoice, how do you compute the tax payable for the invoice? If memory serves, we ended up solving this by pro-rating the tax against the refund amount, on a per-item basis. And, I think, some smart accounting. Oh and then you have the problem of when tax is becomes payable. Is it when the invoice is raised (accrual based)? or when it is paid (cash based)? And if memory serves, it depends on the size of your company. :head asplode:
- donavanm 4y agoWhere is the SKU (equivalent) applied? IME the metering data is sourced from or near to the service. We cant move these per-customer-per-period variants there. So instead you have a fixed usage type/metering and use arbitrary “pricing plans” that have differential pricing to be applied post hoc.