Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Fee/Fine Data Structures

In Folio, fee/fine information is stored as accounts and actions

  • Accounts are where the core charge is held and created when a fee/fine is created and applied to a user account.
    • The associated JSON schema is accountdata.json (https://github.com/folio-org/mod-feesfines/blob/master/ramls/accountdata.json)
    • An individual account record has a required userId - that's how it's linked to the user record
    • An individual user may have zero, one, or more accounts - e.g., if they've never had a fine charged, they would have no account records.
    • Accounts have feeFineId and ownerId - this links to the fee fine owner, and the type of fee/fine that was charged. Types of fines are configurable for manual charges in Settings → Users → Fee Fines. For automatic charges, they are configured in FOLIO itself. Types of fee/fines in the system can be retrieved via an API call (GET /feefines)
    • Hardcoded attributes (with allowed values) include:
      • Status
        • Open
        • Closed 
      • Payment Status
        • Outstanding
        • Paid partially
        • Paid fully
        • Waived partially
        • Waived fully
        • Transferred partially
        • Transferred fully
        • Refunded partially
        • Refunded fully
        • Cancelled as error
  • Actions are where transactions are kept on the account
    • The associated JSON schema is feefineactiondata.json (https://github.com/folio-org/mod-feesfines/blob/master/ramls/feefineactiondata.json)
    • Accounts will always have at least one action, created when the account was created
    • A feefineactiondata record has a required attribute of accountId which links it to the account.
    • Hardcoded attributes (with allowed values) include
      • TypeAction
        • Outstanding
        • Paid partially
        • Paid fully
        • Waived partially
        • Waived fully
        • Transferred partially
        • Transferred fully
        • Refunded partially
        • Refunded fully
        • Cancelled as error
        • Staff info only

Considerations for Migration

Migrating as a manual charge versus an automatic chargeSee Fee/Fines - Data Structures for more information.

If you are transferring charges to FOLIO using the APIs, and you want the action, to properly update the account, you must post the action to the appropriate API endpoint.

  • staff info - POST /feefineactions
  • payments - POST /accounts/{accountId}/pay
  • waives - POST /accounts/{accountId}/waive
  • refunds - POST /accounts/{accountId}/refund
  • transfers - POST /accounts/{accountId}/transfer
  • cancelled - POST /accounts/{accountId}/cancel


Considerations for Migration

Migrating as an account, versus an account plus fee fine actions

Depending on your source data, you may want to explore transferring fines from your old ILS to FOLIO only as accounts rather than trying to also bring over historical transactions.

This approach essentially treats your migration from your source ILS as a point in time - e.g., this is where this fee fine is right now - and then FOLIO generates transactions as the fee/fine is handled going forward. This simplifies your migration approach. 

Note that migrating only as an account and not also creating JSONs does break some functionality (as of Honeysuckle) - you are not able to see the Staff Info Only button, for example. 

Migrating feefines as manual instead of automatic charges

You could consider migrating fee/fines from your system as manual instead of automatic charges. If you do so, the recommendation is to create a charge type for each fee/fine owner that can help you identify which fee/fines were migrated from your old system.