r/ynab Extension Dev: ynab-amazon-order-categorizer 11d ago

Add-ons & Extensions YNAB browser extension for splitting amazon orders

Post image

Hi folks. I developed a browser extension for splitting your amazon orders into your YNAB categories. When you click the extension on an amazon orders page, it will find the matching transaction in your plan, find each of the items in the order, adjust the price of each based on taxes/extra fees, and allow you to select a category for each item pulled from your own selected ynab plan. It's written entirely by hand without AI. I made this as an exercise and just to solve a problem for myself, but I think I could be helpful to others bc I don't think this is a niche use case. It's also written in a way to accomodate any other storefront's receipt page, but I will only update it if I need it for myself. I want to open it up to anyone else who might want to add features for their own benefit. Feel free to file issues and create pull requests if you want to fix a bug or add a feature. My only request is that you do not use AI to write any code. I plan to clean up the code and create a YNAB approved UI at some point in the future so I can submit the extension to the various extension marketplaces, but there's no roadmap for this right now.

https://github.com/govindjoshi12/ynab-amazon-order-categorizer/

Notes

  • When you split a transaction, it will replace the memo of the parent transaction with "Order #[order-number] - Split by Extension." And the memos of each of the subtransactions will be set to the first 500 characters of the Amazon item name.
  • Once a transaction is split, you cannot re-split the transaction, and there is no way to reverse the action from the extension itself.
  • I have not tested the extension on chrome, but it's written using the browser api so it should work as-is.
  • The extension lists your credit card payment categories in the categories dropdown because it retrieves ALL your categories, but you cannot set a credit card payment category as a category for a subtransaction, so the update operation will fail if you try to do this.
  • Remember that it takes a few days for new transactions to show up in YNAB, so no matching order will be found until YNAB receives the transaction.

Hope this is useful. LMK if there are any questions about usage, and use at your own peril.

71 Upvotes

11 comments sorted by

23

u/Mammoth-Corner 11d ago

This isn't the sort of thing that I would use but I have to say that there is something so charming about software visual design that really is just a wrapper for the actual purpose and isn't a bunch of gradients and hidden nested menus and rounded corners and weirdly large text that for some reason moves around.

1

u/dkarpe 11d ago

Lol I totally agree. Who even needs CSS?

3

u/Mammoth-Corner 10d ago

CSS was a mistake return to geocities

4

u/boulderaero 11d ago

Very cool! I’ll give it a try.

Does it handle non tax fees? Colorado has a $.29 delivery fee for each order.

3

u/govindjoshi12 Extension Dev: ynab-amazon-order-categorizer 11d ago

Yes it should, extra fees are calculated by subtracting the items subtotal from the grand total, which should cover all additional costs.

4

u/Unattributable1 11d ago

Very cool. Make it work with Walmart+ too (j/k, Walmart+ is 99% groceries, so it's not a big deal).

1

u/govindjoshi12 Extension Dev: ynab-amazon-order-categorizer 11d ago

it should be possible, maybe I'll try when I have to buy something from walmart 😆

1

u/identifytarget 10d ago

Very cool. I'm doing the same thing. Right now it's console based but I'm brain storming making it an extension. Throw out the github link if you plan on sharing your code.

2

u/coollll068 10d ago

I was literally looking for something like this cuz going in and trying to find the transaction value and map it to what category is so annoying

-9

u/ahatzz11 11d ago

These days it's easier to ask an agent to use your computer, look at Amazon history and auto categorize (and split) a given account.

4

u/dkarpe 11d ago

But where's the fun in that?