Skip to content

OutboxEntry

Outbox entry for a pending Book-Keeper call.

Attributes:
operation: The external operation to perform.
payload_json: JSON-serialised arguments for the call.
status: Current lifecycle state.
retry_count: Number of failed attempts so far.
error: Last error message (if any).
created_at: When this entry was created.
processed_at: When the relay successfully processed the entry.
reference_doctype: Source document type (e.g. ``"PaymentVoucher"``).
reference_id: Source document identifier.

Source: doctype.py

Field Type Required Description Validators
outbox_id str Unique outbox entry ID (UUID) -
operation str (
"Operation to dispatch: post_gl_entry | cancel_gl_entry | "
"post_journal_entry | cancel_journal_entry | sync_account"
) | - |

| payload_json | str | | JSON-serialised call arguments | - | | status | str | | Lifecycle state: Pending | Sent | GL Rejected | Dead | - | | retry_count | int | | Number of failed relay attempts | - | | error | None | | Last error message from Book-Keeper or transport | - | | created_at | datetime | | UTC timestamp when the entry was created | - | | processed_at | None | | UTC timestamp when the relay processed the entry | - | | reference_doctype | str | | Source document type (e.g. PaymentVoucher, JournalEntry, Account) | - | | reference_id | str | | Source document identifier | - |

Role Create Delete Read Write
All
Setting Value
Submittable False
Track Changes True

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting