What was at stake

Money added without opening the app must be exactly what the person meant.

Finely is a personal budget app. People can add a transaction without opening it: by asking Siri, from a Shortcut, or automatically after paying with Apple Pay. The app is not on screen at that moment. A guessed amount, or a “done” for a save that failed, would put wrong numbers in someone’s budget without them noticing.

My responsibility — the Siri and Shortcuts actions, and the store they save to. I am Finely’s only engineer. I built the actions, the rules that turn a sentence into a transaction, and the store every transaction goes through.

Two ways in, one store

Siri has phrases for three Finely actions: add a transaction, check the balance, and hear the next three payments due. They also appear in Spotlight and the Shortcuts app. A fourth action, “Log an Apple Pay payment”, is made for automations. This article follows the two that add money.

The first three write or read someone’s money, so they ask for the iPhone to be unlocked first. Logging an Apple Pay payment also runs while it is locked, because the automation fires right after the payment.

Adding a transaction from Siri or Shortcuts builds a draft only when there is an amount, then reads it back with three choices: yes saves it, Edit lets the person fix a field first, Cancel saves nothing. Apple Pay tracking always builds an expense on the Apple Pay account and asks nothing. Both save through one store, and Siri says it was added only when the save worked.

1. Read the sentence, never guess the amount

“Add a transaction in Finely” starts the add action. A free account holds 20 transactions, where a recurring series that is still running counts once. When it is full, Finely first asks StoreKit (Apple’s purchase framework) what this Apple ID has bought, because Siri may have started the app before it checked. A Pro owner is not turned away just because the app had not looked yet.

Siri then asks: “What should I record? For example “12.50 at the bakery”.” Say the person answers “24 at the bakery”. Finely reads it with fixed rules, not a language model:

  • A date such as “yesterday” or “March 3” is taken out first, so its number is never read as the amount.
  • The first number left is the amount. “12.50” and “12,50” both work, and so do thousands: “1 250”, “1,250”, and “1.250” all read as 1,250.
  • Words such as “salary” or “refund” make it income. Otherwise, it is an expense. A loan repayment stays an expense: in French, “remboursement prêt” is money going out, even though “remboursement” alone usually means a refund.
  • The rest, without fillers like “at” or “the”, becomes the title: “bakery”. When nothing is left, Siri asks “What title?”, because the app never saves an untitled transaction.
No amount, no draft
amount = the Amount field if it is filled in,
otherwise the first number in the sentence
if there is no amount, or it is zero:
make no draft, and ask "How much is it?"
keep the amount as a size: the type says which way the money goes

A Shortcut can pass −12 for a 12 € expense. Finely keeps 12, and the type decides the sign, so a minus sign can never turn an expense into income.

The category comes from the person’s own habit (their latest transaction with the same title), then a list of known brands for expenses, then keywords: “bakery” is Groceries. When nothing matches, an expense is filed under “Other” and income under “Other Income”. The account follows the same habit, or is “Checking Account”.

2. Let Shortcuts fields win

In the Shortcuts app, the same action has fields: Transaction (the sentence), Amount, Title, Date, Category, and Account. A filled-in field wins over the sentence.

Finely's New transaction form: Income, Expense, and Subscription at the top, an empty amount, a title field, Category set to Other, Account set to Checking Account, Date set to Today, a Repeats switch, a note field, and an Add expense button.

Finely’s add form. Siri and Shortcuts fill the same fields.

One exception: Shortcuts lists every category, so someone can pick “Salary” for what reads as an expense. Finely drops a category that goes the wrong way and uses its own suggestion.

3. Read it back before saving

Siri reads the draft back, with its title, category, account, amount, and day, and asks whether to add it. This happens on every run, from Siri or a Shortcut. Three answers are offered: “Yes, add it”, “Edit”, and “Cancel”.

“Yes, add it” comes first, so a spoken yes saves the transaction. “Cancel” ends the action, and nothing is saved. “Edit” lists every field: “Tap a line to change it.”

Edit lists every field
read the draft back and offer: "Yes, add it", "Edit", "Cancel"
if the person picks Edit:
repeat:
show "✓ Add it, everything is right",
then one line per field: Amount, Type, Title, Date, Category, Account
if the person picks the first line: stop repeating
ask again for the field they picked
save the transaction

Changing the Type from expense to income, or back, also picks a new category for the new side, since a category belongs to one side only.

4. Let Apple Pay tracking run without questions

Apple Pay tracking is a Finely Pro feature. In Profile, a short guide gives the person Finely’s ready-made shortcut and shows how to create a Wallet automation set to Run Immediately; iOS does not let an app create one itself. Each in-store contactless payment then hands Finely its amount and merchant.

This action asks nothing: the person chose to log every payment, and a question would stop the automation. So the checks are strict. It needs Pro (“Finely Pro only.”) and an amount above zero (“Payment amount not found.”). It always records an expense on the Apple Pay account, dated now, titled with the merchant, and categorized from it the same way. A payment without a merchant name is titled “Payment”. The merchant name never goes through the sentence reader, so a café called “Bar 12” never becomes a payment of 12.

Siri and Shortcuts pass amounts as floating-point numbers, which hold most cents only approximately. Both actions round the number to two decimals, as text, before turning it into an exact amount.

5. Confirm only what was saved

Both actions save through the same store as the rest of the app, described in The Ledger Behind Finely. If the database (SwiftData) refuses a save, the store undoes it, reloads what is on disk, and answers “not saved”. Both actions read that answer first.

Only confirm what was saved
ask the store to save the transaction
if the store answers "not saved":
say "Couldn't save that one. Try again."
otherwise:
say what was added: the title, the amount, and the day

When things do not go to plan

What happensWhat the person hears or sees
The sentence has no amount”How much is it?”
Nothing is left to use as a title”What title?”
The free plan is full”You’ve used your 20 free transactions…”
A Shortcut picks a category that goes the wrong wayFinely suggests one instead
The person taps Edit during the read-backA list of every field, to fix one and save
The person taps CancelNothing is saved
Apple Pay tracking without Pro”Finely Pro only.”
The save fails”Couldn’t save that one. Try again.” (for Apple Pay: “Couldn’t save that payment. Try again.”)

Trade-offs

  • Fixed rules, not a language model. The sentence reader cannot invent an amount, but it understands fewer ways of speaking. Mistakes can be fixed in the list of fields before saving.
  • Rules are tested, the conversation is not. Tests cover reading sentences, fields winning, dropped categories, category suggestions, Apple Pay drafts, and Siri’s sentences. The Siri conversation itself and the rounding of amounts have no automated tests.
  • Apple Pay tracking trusts the automation. It saves without asking and does not look for duplicates: every run adds one expense.

History

  1. Updated for Siri's Edit and Cancel choices, the Type field, and the latest reading rules.
  2. Rewritten in plain language.
  3. Published