All Docs
FeaturesDepositClearUpdated March 13, 2026

Negotiation Thread Auto-Close on Release Resolution

Negotiation Thread Auto-Close on Release Resolution

Overview

When a deposit release reaches a terminal state — either released or disputed — the platform automatically closes the associated negotiation thread if it is still open. This keeps thread state consistent with the underlying deposit lifecycle without requiring any manual intervention from landlords, agents, or tenants.


How It Works

Trigger Events

The workflow is event-driven and fires on either of the following transitions:

EventDescription
deposit/release.releasedThe deposit has been successfully released to one or more parties
deposit/release.disputedThe deposit release has entered a formal dispute state

Processing Steps

  1. Locate the negotiation thread.
    The system queries negotiationThreads where releaseId matches the ID of the deposit release that triggered the event.

  2. Check thread status.
    If the matched thread has a status of open, the auto-close logic proceeds. If the thread is already closed or does not exist, no changes are made to thread data.

  3. Close the thread.
    For an open thread, the system writes:

    • statusclosed
    • closedAt → current UTC timestamp
    • A system-generated note is appended to the thread explaining the reason for automatic closure (release resolved or disputed).
  4. Notify org admins.
    A notification is sent to all administrators in the organisation:

    • Success — thread was found and closed successfully.
    • ⚠️ Warning — no open thread was found (it may have already been closed, or no thread was linked to this release).
  5. Write to audit log.
    The auto-close event is recorded in the auditLog for compliance and traceability purposes.


Affected Data Entities

EntityRoleFields Modified
negotiationThreadsPrimary targetstatus, closedAt, system note
depositReleasesTrigger sourceRead-only (status transition detected)
notificationsOutputNew record created for org admins
auditLogOutputNew entry recording the auto-close action

Notification Behaviour

Org admins receive an in-platform notification whenever this workflow runs:

  • Success notification confirms the thread ID that was closed and the event that triggered it.
  • Warning notification indicates that no open thread was found for the resolved release, prompting admins to investigate if unexpected.

Notifications are created regardless of which terminal state triggered the workflow (released or disputed).


Important Notes

  • Idempotent on closed threads. If a negotiation thread was already closed before the release resolved, the workflow takes no action on it and simply issues a warning notification.
  • No user action required. The entire workflow is automated. Landlords, agents, and tenants do not need to manually close threads.
  • Audit trail. Every auto-close is logged, making it straightforward to reconstruct the history of a thread closure during a compliance review.
  • System note visibility. The system note appended to the closed thread is visible to participants in the thread, providing transparency about why it was closed.

Related Features