Party
Transaction Entity
Low-level entity for POs, Invoices, Shipments. OpenBoxes-style.
Partner
Operational Management
SCM-native partner with addresses, contacts, and locations.
Partnership
Cross-Organization
Formal B2B relationships between separate Organizations.
OrganizationRelation
Hierarchy
Structural relationships (Subsidiary, Division, Partner).
1. Party Model (Transaction Entities)
Purpose: Low-level transactional entity for Purchase Orders, Invoices, Shipments.Key Usage
PurchaseOrder.supplierPartyId→ references a PartyProductSupplier.supplierId→ links products to their suppliersInvoice.partyId→ billing party
Party Roles
2. Partner Model (Operational Management)
Purpose: SCM-native partner management with addresses, contacts, locations.Partner Types
- SUPPLIER: Vendors you purchase from
- CUSTOMER: Organizations you sell to
- CARRIER: Shipping/logistics providers
- MANUFACTURER: Product manufacturers
- DISTRIBUTOR: Distribution partners
- INTERNAL: Internal divisions
- OTHER: Misc partners
Key Features
- Addresses: Billing, shipping, returns addresses per partner
- Contacts: Named contacts with roles (Sales, Support, Accounting)
- Locations: Link partners to shared Location records (warehouses, stores)
- Central Purchasing: Allow parent to purchase on behalf of children
3. Partnership Model (Cross-Organization)
Purpose: Formal B2B relationships between separate Organizations.Partnership Workflow
Relationship Types
- BUYER_SELLER: Standard procurement relationship
- LOGISTICS: 3PL/shipping partnership
- MANUFACTURING: Contract manufacturing
- DISTRIBUTION: Distribution agreement
- FRANCHISE: Franchise relationship
4. OrganizationRelation (Org Hierarchy)
Purpose: Define structural relationships between organizations (including PARTNER role).Relation Roles
How They Work Together
Scenario: Creating a Purchase Order
- User selects
Supplier→ Party record (type:SUPPLIER) - System loads → Partner record (for payment terms, addresses)
- PO is created →
supplierPartyId=Party.id - Supplier org may have → Partnership (if cross-org visibility needed)
API Flow (/api/partners)
The partners API aggregates from 3 sources:
Key Flags on Organization
isSupplier=true→ Appears in supplier dropdowns for POsisCustomer=true→ Appears in customer dropdowns for Sales OrderspartnershipTier→ Controls what partnership features are available