A list of possible messages sent to the Audit Log, per domain.
Current consumers of the Audit Log need to
Be able to access change history for main entities (customer, account, loan, card, transaction, …)
See who did the change, where, and what was changed
Ideally, also, why did the change happen (a link to the Jira ticket should be sufficient)
All needed data are expected to be in the Audit log DB
Event History
This is an incomplete list of possible audit log mesages and their proposed payloads.
It’s not expected to cover all audit log events in the system. Is serves mainly a source of examples to get the domain squads started when sending their events to audit log.
Domain | Event | Business data |
---|---|---|
IAM | Customer logged in | action: "LOGGED_IN" targetType: "SYSTEM" targetMetaAttributes: {} detail: {} Note that the details about WHO logged in would be in |
IAM | Customer logged out | action: "LOGGED_OUT" targetType: "SYSTEM" targetMetaAttributes: {} detail: {} |
IAM | Backoffice user logged in | action: "LOGGED_IN" targetType: "SYSTEM" targetMetaAttributes: {} detail: {} |
IAM | Backoffice user logged out | action: "LOGGED_OUT" targetType: "SYSTEM" targetMetaAttributes: {} detail: {} |
Backoffice | Call center searches for a customer | action: "SEARCHED" targetType: "SYSTEM" targetMetaAttributes: {} detail: { // search criteria search.phoneNumber: ... // results results.count: 2 results.0.id: <uuid> results.1.id: <uuid> } |
Backoffice | Change is approved by checker | action: "PENDING_CHANGE_APPROVED" targetType: <based on the type of the change> targetMetaAttributes: <approver user info> <info based on the type of the change> detail: { change.id: "<uuid>" change.ticketId: "BOSD-56" change.makerId: "<uuid>" change.entityType: <based on the type of the change> <the detail from the change> // e.g. "customer.preference.language": "ENGLISH" } |
Backoffice | Change is rejected by checker | action: "PENDING_CHANGE_REJECTED" targetType: <based on the type of the change> targetMetaAttributes: <rejecter user info> <info based on the type of the change> detail: { change.id: "<uuid>" change.ticketId: "BOSD-56" change.makerId: "<uuid>" change.entityType: <based on the type of the change> <the detail from the change> // e.g. "customer.preference.language": "ENGLISH" } |
Backoffice | Ticket is created by the system | action: "CREATED" targetType: "TICKET" targetMetaAttributes: <ticket info> detail: { "ticket.boRootRequestTypeName" to boRootRequestTypeName, "ticket.boSubRequestTypeName" to boSubRequestTypeName, "ticket.summary" to ticket.summary, "ticket.customerId" to ticket.customerId, "ticket.customerChannel" to ticket.customerChannel, "ticket.customerType" to ticket.customerType, "ticket.productType" to ticket.productType, "ticket.interactionId" to ticket.interactionId, "ticket.webLink" to ticket.webLink, "ticket.agentLink" to ticket.agentLink, "ticket.priorityName" to ticket.priorityName, "ticket.responsibleTeam" to ticket.responsibleTeam, "ticket.createdAt" to ticket.createdAt(ISO format) } |
Backoffice | Masked customer data is unmasked | action: "UNMASKED" targetType: "CUSTOMER" targetId: <customer ID> targetMetaAttributes: <customer info> detail: { customer.unmasked to <"dateOfBirth" or "phone number"> } |
Onboarding | Customer registered | - |
Onboarding | Customer (onboarding) status changed | new status value |
Onboarding | ||
Customer | User searches for a customer | action: "SEARCHED" targetType: "SYSTEM" targetMetaAttributes: {} detail: { // search criteria search.email: "abc@mail.com" // results results.count: 2 results.0.id: <uuid> results.1.id: <uuid> } |
Customer | Customer activated | action: "ACTIVATED" targetType: "CUSTOMER" targetMetaAttributes: <customer info> detail: {} |
Customer | Customer deactivated | action: "DEACTIVATED" targetType: "CUSTOMER" targetMetaAttributes: <customer info> detail: {} |
Customer | Customer attribute changed (e.g. email)
| action: "ATTRIBUTE_CHANGED" targetType: "CUSTOMER" targetMetaAttributes: <customer info> detail: { "customer.preference.language": "ENGLISH" "customer.preference.toneOfVoice": "FORMAL } // OR detail: { "customer.address.country" to "Brazil" } // etc. |
Customer | Document attribute changed | action: "ATTRIBUTE_CHANGED" targetType: "DOCUMENT" targetMetaAttributes: <document info> + <customer info> detail: { TBD attribute name, new value } |
Customer | Document uploaded | action: "CREATED" targetType: "DOCUMENT" targetMetaAttributes: <document info> + <customer info> detail: { TBD } |
Customer | Document verified | document id, document name |
Product | Subscription created/activated/upgraded/downgraded | action: based on what happened // There is no subscription ID - use customer ID instead targetId: customer ID targetType: "SUBSCRIPTION" targetMetaAttributes: <subscription plan info> + <customer info> detail: { // mimics what was changes "subscription.customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "subscription.subscriptionPlanId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "subscription.createdAt": "2022-09-14T10:55:05.287Z", "subscription.updatedAt": "2022-09-14T10:55:05.287Z", "subscription.autodebitDate": "2022-09-14", "subscription.activationDate": "2022-09-14", "subscription.usageResetAt": "2022-09-14T10:55:05.288Z" } |
Accounts | Account attribute changed (e.g. account name) | action: "ATTRIBUTE_CHANGED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: { "account.name.country" to "Abc" } |
Accounts | Account opened/closed | action: "ACTIVATED" / "DEACTIVATED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: {} |
Accounts | Account blocked/unblocked | action: "BLOCKED" / "UNBLOCKED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: { // TBD blocking scope } |
Accounts | Account amount blocked/unblocked | account id, amount, reason? |
Accounts | Account frozen/unfrozen | account id, reason?, frozen until ?? |
Accounts | Pocket created | action: "CREATED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: {} |
Accounts | Locket locked/unlocked | action: "ATTRIBUTE_CHANGED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: { account.locked: "true"/"false" } |
Accounts | Pocked closed | action: "DELETED" targetType: "ACCOUNT" targetMetaAttributes: <account info> + <customer info> detail: {} |
Loans | Loan created | action: "CREATED" targetType: "LOAN" targetMetaAttributes: <loan info> + <customer info> detail: { "loan.principalAmount", "loan.interestRate", "loan.interestRate", "loan.initialFee", "loan.initialFeePercentage" } |
Loans | Loan partial and full repayments | action: "ATTRIBUTE_CHANGED" targetType: "LOAN" targetMetaAttributes: <loan info> + <customer info> detail: { "loan.repaymentAmount" } |
Loans | Request new Overdraft | action: "CREATED" targetType: "OVERDRAFT" targetMetaAttributes: <account info> + <customer info> detail: { "loan.principal", "loan.fee", "loan.penaltyInterestRate" } |
Loans | Repay overdraft | action: "ATTRIBUTE_CHANGED" targetType: "OVERDRAFT" targetMetaAttributes: <account info> + <customer info> detail: { "loan.principal" } |
Transactions | N/A | |
Cards | Card ordered/order cancelled | action: "CREATED" targetType: "CARD" targetMetaAttributes: <card info> + <customer info> detail: { card.id: ... card.cardType ... card.embossName ... // full entity including card.cardDelivery.* card.cardlimit.* } |
Cards | Card limit updated | action: "ATTRIBUTE_CHANGED" targetType: "CARD" targetMetaAttributes: <card info> + <customer info> detail: { card.cardlimit.limitAmountCardTransaction: "5" ... } |
Cards | Card delivery status changed | action: "ATTRIBUTE_CHANGED" targetType: "CARD" targetMetaAttributes: <card info> + <customer info> detail: { card.cardDelivery.status: ... // whatever else has changed } |
Cards | Card dispute/chargeback filed | |
Cards | Card blocked/unblocked | reason?, blocking scope (no credit/no debit/no nothing) |
Cards | Card amount blocked/unblocked | mount, reason? |
Communication history | Communication record added to communication history | action: "COMMUNICATED" sourceId: <customer ID if inbound, otherwise SYSTEM ID> [we do not have a concept of system ID yet] sourceType: <"CUSTOMER" if inbound, otherwise "SYSTEM"> sourceMetaAttributes: <customerInfo> if INbound, <system info> otherwise targetId: <communicationRecordId> targetType: "COMMUNICATION" targetMetaAttributes: <customerInfo> if OUTbound, <system info> otherwise detail: { communicationRecord.id: ..., communicationRecord.direction: ..., communicationRecord.communicatedAt: ..., communicationRecord.channel: ..., communicationRecord.domain: ..., communicationRecord.customerId: ..., communicationRecord.customerHandle: ..., communicationRecord.interactionId: ..., communicationRecord.purpose: ..., communicationRecord.title: ..., } |
Source/Target metadata
In general you should fill in the info for your domain and should not need to call other domains to get their info-audit log will do that for you.
E.g. for “main account rename event” we need <account info> + <customer info>
account-manager
should fill inaccountId
,accountName
,accountNumber
andcustomerId
audit-log-manager
can then fill in missingcustomerName
based oncustomerId
Context | Data |
---|---|
<customer info> | customerId customerName |
<bank user info> | bankUserId bankUserName |
<document info> | documentId documentName |
<ID card info> | idCardId idCardNumber idCardType |
<account info> | acconutId accountName accountNumber |
<subscription plan info> | subscriptionPlanId subscriptionPlanName |
<loan info> | loanId |
<overdraft info> | overdraftId |
<card info> | cardId cardType embossName maskingCardNo |
<ticket info> | ticketId ticketKey |
<system info> | systemId // ??? systemName // Meiro/Genesys/... |