The Billing Cycle 

What's the Billing Cycle?

Group of twelve tasks that are executed every month, in sequential order, to collect the money from customers for the usage of our service

1. Create invoices

2. Send invoices

3. Send credit notes

4. First charge attempt

5. Send reminders

6. Send credit notes

7. Second charge attempt

8. Send reminders

9. Send credit notes

10. Third charge attempt

11. Send credit notes

12. Encash

1.

2. Send invoices

3. Send credit notes

4. First charge attempt

5. Send reminders

6. Send credit notes

7. Second charge attempt

8. Send reminders

9. Send credit notes

10. Third charge attempt

11. Send credit notes

12. Encash

Create invoices

Make Invoice Generation

Great Again

Problems

- Consistency

- Relieability

- Speed

- Visibility

duplicated invoices, wrong amount of invoices

duplicated invoices, wrong amount of invoices

process takes too much time

There is no way to understand what it the state of the process. Completed? Errors? In progress?

Invoice Numbers

  • Generated sequentially per company
  • If an invoice number exists, all previous consecutive numbers should also exists!

N = 100

1, 2, 3, 4, 5, ..., 99

Too much talk, let's draw something

Consistent
Reliable
Fast

Visible

*

*

  • fixed time deadline

 

  • limited human resources

Consistency

  • Ensure no duplicated invoices can be created per company, year, month and customer.
  • Ensure each ride is charged only once.

Reliability

  • Ensure number of generated invoices don't change per billing period.
  • Generation of single invoice idempotent

Speed ⚡️

The "Draft" Invoice

Like an Invoice but without the invoice number 😏

1. Invoice creation (draft).

 

2. Invoice number assignment (invoice).
 

let's draw a bit more...

Visibility 👁‍🗨

Invoice Generation

October 2019

  • 33,792 invoices generated in around 1 hour and 15 minutes
  • Draft invoices creation took less than 15 minutes.
  • Invoice number assignment took around 1 hour.

Learnings...

Avoid at all cost, fixed strong deadlines. They are evil.

👿

  • Burn people out.
  • Increase stress level.
  • Open the door to low quality  work.

Further Optimization

Let's burn it and use an external provider

Made with Slides.com