Skip to content

Playbooks

Playbooks are standard operating procedures (SOPs) for Accounting (ACCT). Use calls.md for payload shape and required fields.

Surface availability (explicit)

  • API Gateway: Available.
  • Direct Lambda: Not offered.
  • CLI: Available (g3n accounting ..., API Gateway).
  • MCP: Available.

Playbook: Record financial events + export batch

Goal: Record financial events and produce export batches for ERP integration.

Why this sequence:

  • Events are the source of truth for downstream exports.
  • Export batches provide consistent snapshots for external systems.

Preconditions

  • Org is verified and has a session/API key.

SOP (happy path)

  1. Record event (POST /event/record).
    • Reason: captures financial activity with source references.
  2. Get/list events (POST /event/get, /event/list).
    • Reason: verify ingestion and retrieve for audit.
  3. Create export batch (POST /export/batch/create or /export/create).
    • Reason: groups events for export.
  4. Set batch status (POST /export/batch/status/set) as it progresses.
    • Reason: tracks export lifecycle.
  5. List/get batches (POST /export/batch/list, /export/batch/get).
    • Reason: audit readiness and outcomes.
  6. Generate reconcile report (POST /reconcile/report).
    • Reason: validate export completeness and lineage.

Outputs

  • Financial events recorded and export batch ready for downstream systems.

Failure modes / remediation

  • not-found: verify event or batch IDs before status updates.
  • conflict: re-read batch and retry with current revision.

Cross-service relationships

  • SCM/PCM/PPM/CRM/Influencer: emit events that ACCT records.

Playbook: Storage usage + daily rollups

Goal: Track storage usage and produce daily rollup metrics.

Why this sequence:

  • Usage rollups enable billing and operational reporting.

Preconditions

  • Usage sources identified and scoped to org/cccode as applicable.

SOP (happy path)

  1. Record usage (POST /storage/usage/record).
    • Reason: captures raw usage entries.
  2. Reconcile window (POST /storage/usage/reconcile).
    • Reason: closes the window and produces a consistent ledger.
  3. Get/list usage (POST /storage/usage/get, /storage/usage/list).
    • Reason: verify raw entries and reconciled status.
  4. Get/list rollups (POST /usage/rollup/get, /usage/rollup/list).
    • Reason: consume daily summaries.

Outputs

  • Usage entries reconciled with daily rollups available.

Failure modes / remediation

  • invalid-state: ensure usage window is open before reconcile.

Cross-service relationships

  • All services: feed usage metrics into accounting rollups.