An audit trail for a browser automation bot answers four questions after the fact: who or what acted, on which account and target, what step ran, and what the outcome was, with evidence that lets a reviewer verify it. Audit logging in a China-built deployment should be a designed deliverable, not a default console output that the vendor keeps on its own servers. The trail supports reconciliation, incident review, compliance checks, and later handover to another engineering team. This article sets out what the trail must record, the record specification that separates a usable log from a vague summary, the two specs that decide trail quality, and how the source code handover preserves the logic behind every logged action.
What an audit trail for a browser bot must record
The trail starts with identity context. Which bot deployment or worker ran the session, which portal account was used, which target portal, and which business record or source batch the job concerns. For cross-border deployments, the hosting region and the data path the record traveled are part of the identity context, because later review may need to verify where session data rested. Account references should identify the account without storing its credentials in the log.
Next come the action sequence. Each meaningful step is recorded: navigation, field entry, selection, attachment handling, validation read-back, confirmation click, and the portal’s response. Steps carry timestamps in UTC and the buyer’s local zone, so sequences can be reconstructed across time zones. The log records the expected action and the actual outcome, so a reviewer can tell whether the bot did what it intended or diverged partway through.
Outcome and evidence close the record. A succeeded entry carries the portal reference number or confirmation state; a failure carries the failure class, portal message, and a reference to screenshots, traces, or page state captured at the step. Records that were held, escalated, or retried show the state transitions and the retry count. Without outcome and evidence, a log of steps cannot explain what actually happened, and an audit review has to rebuild the session from memory.
The audit record specification table
| Record field | What it contains | Why review needs it |
|---|---|---|
| Deployment and worker | Bot instance, worker or session identifier | Locates which process acted when multiple workers run |
| Account and target | Portal account reference, portal or system name | Attributes the action to the authorized account |
| Record reference | Source batch, invoice, booking, or record identifier | Ties the session back to the business record for reconciliation |
| Step sequence | Each action, expected state, timestamp UTC and local | Reconstructs the flow and locates where it diverged |
| Outcome | Succeeded, failed, held, retried, escalated; portal reference or message | Shows the final result and any portal response |
| Evidence reference | Link to screenshot, trace, page dump, or attachment preview | Verifies the state behind the outcome without re-running the session |
| State transition history | Queue states and retry counts over the session | Explains how a record moved through pending, held, and resolved |
| Data path and region | Hosting region, log store location, retention | Supports residency and access review for sensitive records |
Records should be structured rather than free-text prose, so filters and reports can group by portal, account, failure class, or time range. A prose summary per session is hard to reconcile against internal records; a structured record with named fields can be matched against invoices, bookings, or orders without manual sorting.
Two specs that decide trail quality: action granularity and evidence retention
Action granularity decides how much detail the trail keeps. Too coarse, and the log says only “entered invoice” without which fields, which check failed, or what the portal returned. Too fine, and every DOM interaction floods the record with noise that buries the meaningful steps. The right granularity records business-meaningful actions and their validation states, not every internal mouse or network event. Buyers should review a sample real session log and check that each decision point in the flow appears as a distinct recorded step.
Evidence retention decides how long the supporting material stays available. Screenshots, traces, and page dumps consume storage, so retention should follow the review and compliance window the buyer requires: short for routine low-risk entries, longer for finance, contractual, or regulated records. Evidence older than the retention window moves to archive or is deleted on schedule, with the retention rule written into the design rather than left to the vendor’s default. The trail record itself should outlive the evidence it references, so a later audit can see that evidence existed even after raw captures are purged.
These two specs interact. Fine granularity without retained evidence leaves steps without proof; retained evidence without granular steps leaves captures without context. A usable trail has both: recorded business steps and the evidence attached to the steps that matter.
Session, credential, and data-path records
Session records show login and logout, expiry detection, and any reauthorization. A session that expired mid-batch should show when expiry was detected, which records were held, and how reauthorization completed. Challenge or refusal states are recorded as stops with escalation, routed through the exception queue with their evidence attached; the trail records the stop and handoff, not any bypass attempt. The failure-class routing behind these records follows the recovery pattern described in failure recovery and exception queues in RPA bots.
Credential handling appears in the trail as access events, not as secret values. The log records that a credential was pulled from the secrets store for a session, who has access to the store, and any credential rotation at handover. It must never record passwords, tokens, or session cookies in plaintext. Secrets storage and access controls for automation deployments are covered in security and secrets management for workflow bots; the audit trail complements those controls by showing how stored credentials were used.
Data-path records document where session logs and business records rest, who can read them, and how deletion works. For cross-border work, this field supports residency review: whether records stayed in the required jurisdiction, whether vendor staff accessed them, and whether exports followed the approved route. The trail should distinguish bot-generated session evidence from the business records the bot produced, since the two often carry different retention and access rules.
Source code handover and the trail the repository preserves
The source code handover matters to the audit trail because the logged steps only make sense against the scripts that produced them. A repository the buyer can access holds the flow logic, selector map, state machine, and logging configuration, so a reviewer can compare what the bot was designed to do against what the trail records. If the code lives only in the vendor’s internal panel, the trail cannot be audited independently, and any repair or review routes back through the original team.
The handover package should include the logging configuration itself: what fields are recorded, how evidence is stored, retention rules, and the report queries used to review the trail. Version control tags releases, so the code version that produced a given audit record can be identified later. The runbook explains how to read the trail, where evidence lives, and how to export records for an audit review. The handover and credential transfer mechanics are detailed in runbooks and credentials handover with Chinese automation vendors; the audit configuration is one of the artifacts that should transfer in that session.
Ownership of the trail follows the same handover logic. Logs and evidence should rest in the buyer’s own store or an arrangement the buyer controls, with vendor access revocable. A vendor-held log store means the buyer cannot inspect the trail after the relationship ends, and cannot retain records required for its own compliance obligations.
Review, retention, and deletion in production operation
Production review uses the trail on a regular cadence: daily exception review, weekly failure and aging review, and periodic reconciliation against internal records. Reports group failures by class and portal, surface records held past their resolution window, and confirm evidence exists for succeeded and failed outcomes. The trail should expose gaps, such as a session missing an evidence reference or a record without a final state, so those gaps are fixed rather than accumulating.
Reconciliation compares bot-produced records against the buyer’s internal ledger, orders, or invoices, using the record reference carried in each audit entry. A match confirms the bot’s outcome aligns with what the internal system shows; a mismatch triggers a review of the trail and evidence to locate where the two diverged. This comparison is where a structured trail pays off: free-text logs make matching slow and error-prone, while named fields let the review run as a routine check rather than a manual investigation. Periodic sample audits spot-check a handful of succeeded records against their evidence, confirming that confirmation states and reference numbers were recorded accurately rather than assumed.
Retention and deletion follow a written schedule. Active evidence covers the current review window; archived material moves to cheaper storage; expired material is deleted with a record of the deletion. Access reviews confirm who can read logs and evidence, and access that no longer serves a purpose is revoked. For regulated or finance records, the retention period matches the buyer’s own obligations, not the vendor’s default setting.
Governance ties the trail to change control: script changes, selector repairs, and configuration updates are recorded alongside the audit records they affect, so a later review can trace a logged outcome back to the code version that produced it. A bot whose trail records identity, steps, outcomes, and evidence, whose code and configuration transfer to the buyer, and whose retention and deletion follow a written rule can be reviewed, defended, and maintained long after the original build team’s involvement ends.
Leave a Reply