The Organisations domain handles supplier management, transaction processing, and organisation data enrichment.
Entity Description Organisation Company/supplier in the supply chain. Can be a stub (placeholder) or fully enriched. Transaction Financial transaction with an organisation (spend or revenue). Identifier External ID like LEI, ABN, or tax ID for matching/verification. Aquila1 Industry classification used for footprint calculations. Product Product or service associated with a transaction.
Organisations exist in two states:
Type Description Neo4j Label Provisional User-created, unverified :ProvisionalCanonical Verified organisation, may have enrichment None (default)
User can't find existing org, creates provisional
Admin reviews the provisional org
Admin either promotes to canonical, merges with existing, or rejects
AI agents enrich organisations with web-sourced data:
Data Type Description Description Company description and overview Website Official website URL Logo Company logo Identifiers LEI, tax IDs, etc. (with source URL citations) Country Country of primary operation NAICS / Aquila1 Industry classifications Related entities Parent and subsidiary organisations
The orchestrator application/jobs/organisation/enrich.ts chains the four agents (search → enrich → match → verify) behind the organisation.enrich Inngest event.
Enrichment has two lifecycles:
Phases When it runs Identity profile + match + verify (the pipeline above) Once , at intake (search-select or transaction upload). Re-run only by an explicit "Enrich now" / admin — never by a routine spotlight/analyst, and never by re-uploading to an already-enriched org.Intel statements (modern-slavery) + issues (negative-news) Refreshed when a user deliberately runs a spotlight (issues) or analyst (statements + issues), via the organisation.ensure-enriched action orchestrator.
match / verify live inside enrich.ts, so gating that job on profile status is what keeps identity to a single run. See ADR-0006 for the full action → ensure-enriched → pure-snapshot report model.
Type Description spend Money paid to supplier revenue Money received from customer
No duplicate canonical organisations allowed
Transactions belong to exactly one account
Amounts converted to USD for footprint calculations
Industry (Aquila1) required for footprint calculation
Origin country required for footprint calculation
Transaction types: spend or revenue
import { CreateTransaction } from '@repo/core' ;
const useCase = new CreateTransaction ();
const transaction = await useCase. execute ({
organisationId: 'org-123' ,
amount: 50000 ,
currency: 'AUD' ,
type: 'spend' ,
date: new Date ( '2024-01-15' ),
products: [ 'product-1' ],
country: 'AU' ,
});
import { OrganisationRepository } from '@repo/core' ;
// By ID
const org = await OrganisationRepository. findById ( 'org-123' );
// By identifier (LEI, ABN, etc.)
const org = await OrganisationRepository. findByIdentifier ({
type: 'LEI' ,
value: '549300EXAMPLE000001' ,
});
// Search by name
const results = await OrganisationRepository. search ({
query: 'Acme Corp' ,
limit: 10 ,
});
import { PromoteProvisionalOrganisation } from '@repo/core' ;
const useCase = new PromoteProvisionalOrganisation ();
await useCase. execute ({
provisionalId: 'prov-123' ,
aquila1Codes: [ '111' , '112' ], // Industry codes
});
Type Description Example LEI Legal Entity Identifier 549300EXAMPLE000001ABN Australian Business Number 51 824 753 556TAX_ID Generic tax identifier Various formats DUNS Dun & Bradstreet number 12-345-6789
Type Location GraphQL Schema packages/core/src/infrastructure/neo4j/schemas/organisation.graphqlRepository packages/core/src/infrastructure/repositories/organisation-repository.tsUse Cases packages/core/src/application/use-cases/organisation/AI Agents (search/match/enrich/verify) packages/core/src/application/ai/agents/Enrichment Orchestrator packages/core/src/application/jobs/organisation/enrich.ts