WaiveCar / Waivecar

Waivecar
https://waivecar.com
0 stars 0 forks source link

Valvoline integration #1581

Open kristopolous opened 4 years ago

kristopolous commented 4 years ago

There's a few tasks:

  1. Add a field "last_oil_change" to the cars table.
  2. Have a task that runs every X number of days, say between 3-7. It does this:
if current_mileage > last_oil_change + oil_change_constant:
  remind_user_to_get_oil_change
  1. Have a way of getting the PDF receipts (either through an email address that fires a script or some SMTP module or some email service with a CRUD api), a. run it prior to the other task b. have it do something like this
    for each object in parsed_pdf:
    update_last_oil_change_for_car
    thank_user_for_getting_oil_change

some notes:

  1. Have the pdf sent to another email address in case we somehow need to rerun things
  2. Since the last_oil_change information is destroyed and replaced we need to log that we're doing this along with the car/value that is about to be replaced in case we somehow screw up and need to fix things.
  3. The pdf parsing approach is both idempotent and re-entrent. All it would do is just replace the column value with the new one. The first task isn't of course since we aren't tracking whether we already notified the user or not ... but that's not the complicated line of action, so I don't really care.
kristopolous commented 4 years ago

Push data to airtable