Skip to Content

Activity Logs

  • Code: SET-LOG
  • Module: Settings
  • Type: System Record

1. Overview

Activity Logs record every data change in the tenant: who did what, when, on which data, and what changed. There are two views: one combined cross-module timeline in Settings, and a dedicated panel in each feature that only shows the logs of that feature’s data.

Expected outcome: owners and auditors can trace any change without help from the technical team.

2. Problem

Without automatically recorded traces, tracking down who changed what can only rely on memory or verbal reports. As a result:

  • Data errors (prices, statuses, access) are hard to trace to their cause without a change trail.
  • Owners need to make sure there are no unauthorized changes to important settings.
  • One action can change several records at once; related changes need to be visible together.

3. Goals & Non-goals

3.1 Goals

  • The cause of a data error can be traced back to who changed it and when.
  • Changes to important settings can be checked at any time without help from the technical team.
  • Changes that happen within one action are visible as one sequence, not as separate fragments.
  • Tracing can be narrowed down to a specific period, actor, or data type when investigating an incident.

3.2 Non-goals

  • Editing or deleting logs from within the app.
  • Exporting logs to external files.
  • Automatic alerts when certain changes occur.

4. Business Rules

Business rules are the set of provisions and constraints that apply to Activity Logs throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.

  • BR-01 Logs can only be appended. There is no action to edit or delete them.
  • BR-02 Logs are created automatically on every data change, never created or edited manually.
  • BR-03 Changes that occur within one action are grouped as one parent log along with its child logs.
  • BR-04 Logs are displayed in order from newest and loaded incrementally as they are browsed.
  • BR-05 Filter options follow the log data that has actually been recorded, not a fixed list.

5. Flow

5.1 Main Flowchart

  1. Log Timeline — All changes are shown in order from newest, each containing the actor, the data type, and the time it occurred.
  2. Narrow the Search — Browsing is narrowed by activity type, data type, actor, or date range. The filtered result can be shared via the page link.
  3. Load Next Logs — Older logs are loaded incrementally as needed.
  4. Change Detail — A log is opened to see its old and new values, along with other changes that occurred in the same action.

6. Document Structure

6.1 General

FieldTypeRequiredDefaultRules
Log IdText—Generated by the systemLog identifier
Log NameText—Module of the changed dataSet by the system
EventEnum—The type of change that occurredFor example created, updated, deleted
Title & MessageText—Composed by the system from the changeText shown in the list
ActorRef. User—The user who made the changeUser name, email, and photo
Related DataRef. Data—The data that changedIts data type and identifier
ChangesObject, multiple—The difference before and afterList of fields with their old and new values
MetadataObject—Recorded when the change occursIP address and device used
TimeDate & Time—When the change occurredDisplayed both absolute and relative
Child LogsRef. Log, multiple——Other logs within the same action, with an identical structure (BR-03)

7. UI Structure

This section defines how Activity Logs are displayed and operated: the feed layout and filters along with their option sources. This section only governs display and interaction; content and value rules still follow Document Structure.

7.1 Feed

Not a table, but a single-column list loaded incrementally, newest at the top.

PartSample ValueComponent
ActorBudi SantosoAvatar, Text
MessageChanged the purchase price of product Cooking Oil 2LText
Log Name & EventProduct · updatedBadge
Time5 minutes agoText, absolute and relative
ChangesPurchase Price: Rp 12,000 → Rp 12,500Table of old value to new value, expandable
Child Logs3 related changesAccordion, only if any

7.2 Advance Filter

FieldControlOptions SourceDefault
EventMulti SelectEvents that have been recorded (BR-05)Empty
Log NameMulti SelectLog names that have been recorded (BR-05)Empty
ActorMulti SelectUsers who have been recorded as actors (BR-05)Empty
DateDate Range Picker—Empty

8. User Stories

US-01 - View all activity logs

As an owner, I want to see all data changes in the tenant in one place, so that they are easy to audit.

IDAcceptance criteria
AC-01.1The page can only be opened by users with the activity log list permission; others are redirected to unauthorized.
AC-01.2Each log shows the actor, message, log name, event, and time.
AC-01.3Logs are loaded incrementally with a load more button; the button is hidden when there is no more data.
AC-01.4Field changes are shown as a table of old value → new value; empty values are marked as having no value.
AC-01.5A log with child logs shows a “view related changes” accordion.
AC-01.6The actor has been deleted — the log must still be displayable (BR-01).
AC-01.7A change value that is an object or array — displayed in a structured way, not as raw text.

US-02 - Filter logs

As an auditor, I want to filter logs, so that I can quickly find the change I am looking for.

IDAcceptance criteria
AC-02.1The event, log name, and actor filters are multi-select options that follow the log data that has been recorded (BR-05).
AC-02.2Date range filter: a single date or a range; sent as start_date and end_date (yyyy-MM-dd). A single date means start_date = end_date.
AC-02.3Filters are stored in the URL and restored when the page is reopened.
AC-02.4Filters can be reset to empty.
AC-02.5The URL contains invalid filters — filters revert to the empty default.

US-03 - Per-feature logs

As an admin, I want to see logs directly from a feature page, so that I do not have to filter manually.

IDAcceptance criteria
AC-03.1The Activity Logs button on a list page shows the logs of all the feature’s data; on a detail page it shows the logs of that record only.
AC-03.2The panel uses the same display format as the global page, with event, actor, and date range filters.
AC-03.3Features without activity logs — Roles & Permissions and File Manager do not have a log panel in the UI yet.

9. User Scenarios

RoleScenario
OwnerFinds out who changed a product’s purchase price last week
AuditorFilters all changes made by one user within a specific date range
OwnerChecks role and permission changes after an incident
AdminShares a link to a filtered log result with a colleague (filters are stored in the URL)

10. Permissions & Actions

10.1 Permission by Action

ActionPermissionCondition
View Activity Logs
(Global)
settings:activity-log:list:any—
View Activity Logs
(Per Feature)
The list or detail view permission of the related featureFollows the page where the panel is opened

11. Notifications

This feature does not trigger any notifications.

12. Dependencies

Related PRDs

  • All audited features (Appearance, Company, Stores, Entities, Employees, Users, Purchase Order, and others).
  • Users — log actors are users.
Last updated on