Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

add a split-transaction charge-centric mode #25

Open
yanowitz opened this issue Jan 10, 2021 · 4 comments
Open

add a split-transaction charge-centric mode #25

yanowitz opened this issue Jan 10, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@yanowitz
Copy link

(I'm happy to do this work, I just wanted to open an issue first to make sure it was friendly to the project).

All my Amazon spend is on a single credit card. What I want to do is have a transaction for the credit card charge, not the individual order items. The transaction can have a split for every transaction associated with the charge (right now, if there's a charge with three items and a coupon, we get 4 transactions. in this mode, you have one transaction with four splits sub-transactions.

I think the schema of the two files (Items and Orders & Shipments) allows for this, though I need to check various edge cases.

@yanowitz yanowitz changed the title add a split-transaction order-centric mode add a split-transaction charge-centric mode Jan 10, 2021
@starsprung
Copy link
Owner

Hi @yanowitz,

I'm not certain, but it might be tricky to know which items belong to each credit card charge? A single order can be split in unpredictable ways.

@yanowitz
Copy link
Author

yeah, I fear you are correct. i don't need it to always be right (I don't think we can get anything that is, absent a report that presents the data exactly as we want it) though -- just mostly right would be a huge time saver. I suppose I could also do a shipping-centric view (roll up by tracking id) -- that's likely to match the cc charge. I guess the changes are:

  1. add a split-transaction creation mechanism to YNAB api (starting in ynab.ts)
  2. allow for grouping transactions by arbitrary keys (in amazon.ts)
  3. specify a group key via config
  4. wire all this up together

does that sound reasonable?

@starsprung
Copy link
Owner

I think that would work most of the time since both items and orders & shipments reports have tracking numbers, but there are some edge cases where it wouldn't work, so there'd need to be some fallback behavior. In particular:

  • Digital items
  • Physical items which only have the name of the carrier in the tracking field (with no parenthesized tracking ID). Pretty common for overseas shipments
  • Physical items which have a name and a parenthesized value, but the parenthesized value isn't really a tracking number and just says something like "No tracking number". This is pretty rare, I've only see it a few times and I think it's a result of Marketplace sellers using the platform incorrectly.

@starsprung starsprung added the enhancement New feature or request label Jan 13, 2021
@dlardo
Copy link

dlardo commented Nov 1, 2021

I found this link which should address the "what items went into what credit card charge" issue: https://www.amazon.com/cpe/yourpayments/transactions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants