AccountingKitDocs

Automations

Durable accounting recipes and their execution model.

Queue a recipe with POST /v1/automations:

{
  "connection_id": "00000000-0000-0000-0000-000000000000",
  "recipe": "quote.accept_and_create_invoice",
  "input": {
    "quote_resource_id": "00000000-0000-0000-0000-000000000000",
    "external_reference": "deal_814"
  }
}

Recipes

RecipeResult
contact.upsertCreates or reconciles a contact
quote.draftCreates a draft quote
quote.accept_and_create_invoiceAccepts a quote, then creates a linked draft invoice
invoice.createCreates an invoice
invoice.record_paymentRecords a payment against an invoice
purchase_order.createCreates a purchase order
document.fetchFetches an invoice, quote, or purchase-order PDF

Operations are claimed with row locks and leases, retried with bounded exponential backoff, and moved to dead_letter when attempts are exhausted. The Railway MVP runs an embedded worker that claims work directly from PostgreSQL. An in-process signal minimizes latency, while periodic polling recovers missed signals, retries, and interrupted deployments. Cloud Tasks can own delivery later without changing the operation ledger or processing path.

An automation run is metered once after successful completion. Failed attempts do not create duplicate usage events.

On this page