DEV Community

Ujjwal Dubey
Ujjwal Dubey

Posted on

Keep an Approval Audit Log Your Support Team Can Actually Read

When a customer says "nobody approved that", you need a log a support lead can read without a debugger.

A practical human-in-the-loop approval audit log for support stores:

record = {
  "action_id": action_id,
  "payload_hash": sha256(payload),
  "approver": user_id,
  "decision": "approve_with_edits",
  "edited_fields": ["body"],
  "decided_at": ts,
  "ran_at": ts2,
  "result": "sent",
}
Enter fullscreen mode Exit fullscreen mode

Rules

  • Write the record before the side effect.
  • Never overwrite; append corrections.
  • Show the same record in the CRM note when the channel is customer-facing.

For how approval fits a wider build, see the audit-log aware services path. At NxFlowAI the first audit takes 72 hours.

NxFlowAI is not affiliated with NexFlow AI or Nexusflow.

Top comments (0)