Skip to main content

Data Model

Documentation Map

Data Model

Scope

This repository extends ERPNext with custom DocTypes and workflow-specific persistence. ERPNext standard doctypes remain the base system of record.

Key Custom Objects

Integration Event

  • purpose: append-only integration ingress/egress evidence
  • key concerns: idempotency, processing state, source tracking

Revenue Event

  • purpose: normalized staged revenue intake from payment-provider webhooks
  • linked outcomes: draft Sales Invoice, reporting, recurring billing context

Supplier Intake

  • purpose: staged supplier invoice and onboarding intake
  • linked outcomes: Purchase Invoice, onboarding, approvals

Approval Packet

  • purpose: persistent approval contract between ERP action and external review/decision systems
  • linked outcomes: approved/rejected ERP state transitions

Dispatch Job

  • purpose: outbound dispatch evidence and callback-aware delivery lifecycle
  • linked outcomes: accepted/delivered/failed delivery states plus operator explanation

Agent Notification

  • purpose: operator-visible warnings, blocked flows, stale work, and scheduled-operation notices

Sync Cursor

  • purpose: replay and integration progress markers

Dead Letter

  • purpose: exhausted retry backlog for resilience handling

Business Identity

  • purpose: canonical business-facing identity record for users, service accounts, and agents
  • key concerns: stable business_identity_id, canonical principal_type, tenant semantics, company scope, lifecycle state, ownership role semantics, and separation from technical IdP subjects
  • role-binding expectation: business_role_profile_json carries explicit owner, sponsor, approver, and custodian facts when applicable; agent_identity requires sponsor_business_identity_id

Identity Account Binding

  • purpose: explicit binding between business identity truth and technical IdP/OIDC accounts
  • key concerns: issuer drift, subject correlation, and revocation-safe reconciliation

Agent Registry Entry

  • purpose: business-owned metadata and lifecycle tracking for agent identities
  • key concerns: owning system, environment scope, lifecycle status (draft|active|disabled|revoked|retired), legal hold, owner accountability, allowed domains, and permitted scopes

Department / Team / Business Role Profile

  • purpose: stable business-organization structure and role-context truth for identity assignment
  • key concerns: stable business IDs, many-to-many assignment posture, and strict separation from technical role semantics

ID / Key Expectations

  • DocType names remain the canonical persistent identifiers
  • selected coordination keys and unique fields protect high-risk orchestration paths
  • callback and dispatch flows may additionally use idempotency keys
  • identity and agent registry records use stable unique business keys, not transient token values

Persistence Assumptions

  • MariaDB is the canonical persistent store
  • Frappe migrations own schema evolution
  • direct external DB writes are out of scope

Integrations Relevance

  • these objects are the repo-owned contract evidence for approvals, dispatch, resilience, and integration state
  • external tools should consume them through repo-owned APIs, MCP summaries, or docs/contracts, not through direct DB access

License notice: AGPLv3 (GNU Affero General Public License v3.0)
Website: https://helpifyr.com