Transaction Name Resolution#
Transaction display names are resolved at import time by provider-specific Processor classes, each implementing a name method with its own fallback chain. The resolved name is then stored on Entry#name via Account::ProviderImportAdapter#import_transaction, which calls entry.enrich_attribute(:name, name, source: source) — meaning user edits always win: once a user manually renames a transaction, provider syncs will not overwrite it .
Provider Fallback Chains#
Enable Banking (EnableBankingEntry::Processor)#
The most complex resolution. See the name method:
- Counterparty name —
creditor.name/creditor_namefor debits;debtor.name/debtor_namefor credits . - Technical card placeholder check — if the counterparty matches
/\ACARD-\d+\z/i(e.g.CARD-1234), it is treated as a placeholder and skipped . - Remittance information (for CARD-* transactions) — some providers (e.g. Wise) put the real merchant label here .
bank_transaction_code.description.- Remittance information (general fallback) — first non-blank item from the
remittance_informationarray/string, truncated to 100 chars . - Direction label —
"Incoming Transfer"(CRDT) or"Outgoing Transfer"(DBIT) as a last resort .
The same technical_card_counterparty? check is applied when resolving the merchant name: if counterparty is a CARD-* placeholder, remittance_information is used as the merchant candidate instead .
Plaid (PlaidEntry::Processor)#
Two-level fallback :
merchant_nameoriginal_description
SimpleFin (SimplefinEntry::Processor)#
Four-level fallback :
- Combined
payee - description(when both present and different) payeealonedescriptionalonememo, orI18n.t("transactions.unknown_name")
Storage & Enrichment#
Entry#name is a required string column with a case-insensitive index (lower(name)) for efficient search . All providers funnel through Account::ProviderImportAdapter#import_transaction, which applies the Enrichable concern to protect user edits. Attributes can be locked; a locked name will not be overwritten by subsequent provider syncs .
Key Files#
| File | Purpose |
|---|---|
app/models/enable_banking_entry/processor.rb | Enable Banking name resolution, technical_card_counterparty?, merchant candidate |
app/models/plaid_entry/processor.rb | Plaid name resolution |
app/models/simplefin_entry/processor.rb | SimpleFin name resolution |
app/models/account/provider_import_adapter.rb | Central import handler; applies enrichment pattern |
app/models/concerns/enrichable.rb | Enrichment + locking logic (user edits protected) |