List of change views
Section | Event example | Audit log query |
---|---|---|
Customer profile (includes address, contact, survey) Also includes Subscriptions Also includes ID cards | email changed, address changed |
or
or
|
Customer documents | document added, document verified, document removed |
|
Main account | account name changed, account status changed, account frozen, amount blocked |
|
Pocket | pocket locked |
|
Loans | Loan taken |
|
Overdraft | Top-up |
|
Card | card limit changes |
|
Tickets | N/A managed by Jira | - |
Notes
No changes view needed for transactions
The “changes” will come from Audit log Audit log message examples
Activities
Activity is a common data type for displaying details about any kinds of changes or events. We generate descriptions for activities and display details (including an optional comparison to current data, relevant for pending back-office Change
s only).
There are several kinds of entities that we convert to Activities:
Change
- a pending back-office change object that is part of the maker-checker flow.AuditLogEvent
- an event returned byauditlog-manager
; these further divide intoEvents about BO
Change
s getting accepted, rejected or failing to be applied - these are audit logs frombackoffice-manager
Events about general changes from other managers - this can be the accepted BO
Change
getting applied OR the customer making a change themselves in the mobile app.Events about things happening that don’t change anything such as customer being searched or sensitive customer information being unmasked.
Activities are used mainly in ChangesGrid
(“My changes” and “Pending approvals” page) and HistoryView
(the bottom of most customer pages)
ChangesGrid
converts onlyChange
s toActivities
HistoryView
converts onlyAuditLogEvent
s toActivities
.
The Activity TypeScript types are in src/components/business/ActivityView/types.ts
.
Activity can be flagged with isSimple
if the text description gives enough information about the event - in that case, no details modal in HistoryView
will be available for that event.
The Activity.type
and Activity.details
props are tied together, that way when TS knows an activity is of a certain type it will also know what the details look like. The isSimple
flag can also be mandated for certain activities by defining it as isSimple: true
in ActivitySpecifics
.
Example PRs
simple activity (+ maker-checker) #7719
Checklist for adding new activity
Types
src/components/business/ActivityView/types.ts
- a newtype
needs to be added - either in theActivitySpecifics
together with thedetails
or inSimpleActivitySpecifics
Routes
src/components/business/ActivityView/routes.ts
- only relevant forChange
activities; when listing changes in a grid (My changes/Pending approvals) there is a link to the relevant page that the change is about.Descriptions
src/components/business/ActivityView/descriptions.ts
- brief text descriptions of the activity, mainly used for one-line description in the lists/girds; this means adding a newcase
and also a new translation keyConversions
Event → Activity
src/components/business/HistoryView/eventConversion.ts
The main function there is
getEventActivity
which uses different other functions to piece together theActivity
putting together the non-type specific information (nature
,customerId
,entityId
...), and thetype
+detail
fromgetChangeEventSpecifics
and other functions.getChangeEventSpecifics
is the biggest one, used for BO change events and BO changes being appliedThe file is currently huge it would be nice to somehow split it further, simplify it at some point
Change → Activity
src/components/business/ActivityView/changes.ts
- a bit simpler as TS knows much more about theChange
type and the naming often matches the naming in the activitydetails
Usually, when adding a new BO change we need to take care of converting the new
Change
, the BO change event and the events of that change being applied
ActivityView
src/components/business/ActivityView/ActivityView.tsx
Used in details modal for
Change
s andAuditLogEvent
sFor each activity
type
it uses a more specific component to display details about the changes in that event - therefore you’ll need to add a newcase
for your new activitytype
and may also need to add a new*View
component or alter an existing oneIt has the option to show the changed attributes side by side with the current data (relevant for current pending BO
Changes
as “before” and “after”)It will also automatically display the entity name and the activity description for activities with the
isSimple
flag so for such events, there is no need to add a newcase
Activity list
For how the event is handled, see:
app-bo/src/components/business/HistoryView/eventConversion.ts
Domain event [column 3] is an event from another domain (like when customer-manager emits an event about changing customer’s email)
Change event [column 4] is an event from backoffice-manager (like when it emits an event about customer email change being approved/rejected)
For how the change is handled [column 5], see:
app-bo/src/components/business/ActivityView/changes.ts
TODO: Fill all empty cells
Actvity type (FE) | Activity | Handled domain event
| Handled BO change event | Handled BOFE change |
---|---|---|---|---|
| Communication occurs |
| N/A | N/A |
| Search customers |
| N/A | N/A |
| User logs in |
TODO: IAM should emit this kind of events (for BO users and customer) | N/A | N/A |
| User logs out |
TODO: IAM should emit this kind of events (for BO users and customer) | N/A | N/A |
Customer | ||||
| Customer signed up/finished onboarding/activated, offboarded etc. |
|
|
|
| Update “bank employee” flag |
| same as domain |
|
| Update profile |
| same as domain |
|
| Update preferences |
| N/A | N/A |
| Update address |
| same as domain |
|
| Update declaration data |
| N/A | N/A |
| Update survey answers |
|
Update to match domain |
|
| Update phone or email |
|
|
|
| Unmask attribute |
| N/A | N/A |
Subscription | ||||
| Freeze | ?? Ask account squad if/how they log freeze ( |
|
|
| Waive fee |
|
Update to match domain |
|
| Update plan |
Ask account squad to send only relevant data in event, e.g. |
|
|
[not handed by FE yet] | Reset usage | Not handled by FE, do we want it? (see Also there is no way to distinguish form other subscription events - the detail should only include relevant data (or use a dedicated | N/A | N/A |
[not handed by FE yet] | Revert operation usage |
As above, see | N/A | N/A |
Free subscription | ||||
[not handed by FE yet] | Create |
Should BOFE display this? Where? No such events in the system yet. | N/A | N/A |
[not handed by FE yet] | Use |
| ||
[not handed by FE yet] | Block |
| ||
Subscription plan | ||||
[not handed by FE yet, not needed] | Create |
| N/A | N/A |
[not handed by FE yet, not needed] | Update |
| N/A | N/A |
Bonus operation | ||||
[not handed by FE yet] | Create |
| N/A | N/A |
[not handed by FE yet] | Invalidate |
| N/A | N/A |
Document | ||||
[not handed by FE yet, not needed] | Search documents | [not handed by FE yet, not needed] | N/A | N/A |
| Create |
|
|
|
| Delete | Ask customer squad if/how they log this. |
|
|
| Update name |
Ask customer squad if/how they log this. ( |
|
|
| Verify/Reject | Ask customer squad if/how they log this. Ensure they do not log the whole document, only what is relevant for the event - in this case the verification result. |
|
|
ID card | ||||
| Create |
| |
|
| Delete | Ask customer squad if/how they log this. ( |
|
|
| Update name |
|
Update to match domain |
|
| Verify/Reject | Ask customer squad if/how they log this. ( |
|
|
Main account | ||||
| Create |
| N/A | N/A |
| Activate |
| N/A | N/A |
| Deactivate |
| N/A | N/A |
| Update name |
| same as domain |
|
| Block/unblock by bank or customer | Ask accounts squad if/how they log this. |
|
|
Saving account | ||||
| Create (locked/unlocked) |
| N/A | N/A |
| Close |
| N/A | N/A |
| Deactivate |
| ||
| Lock/unlock |
| Update to match domain |
|
| Update “Date locked” attribute |
| N/A | N/A |
| Updated lock parameters |
| N/A | N/A |
| Updated target date and/or amount |
| N/A | N/A |
Card | ||||
|
| |||
| Freeze/Unfreeze/Block |
The |
|
|
Transaction | ||||
|
| |||
|
| |||
Known limitations
For changes (like an update of customer email) we do not store the original values in the audit log, so the log entry will only say “Customer email changes to X by user Y because of ticket Z at time T” but not what the email value was before.
The granularity of logs is based on the BE granularity. For example, when a customer’s
firstName
is changed on FE, the BE is updating the whole customer profile and not caring what attributes have actually changed. Therefore the BE is logging the full profile as changed and that’s what the FE history will then display, “Customer profile changed” + list of the values, there is no way to know which of them were the same as before.