Skip to content

Organizations

An Organization is the top-level tenant in MIDDAG Account. It represents a company, institution, or business entity that is your customer. Every piece of data in the system -- entitlements, collaborators, invoices, contracts, licenses, orders, services -- belongs to an Organization.

If you are used to WooCommerce treating every buyer as an individual user, this is the shift: MIDDAG Account treats every buyer as a company. People belong to companies. Companies buy products. Products create entitlements.

What an Organization contains

When you open an Organization in the admin interface, you see everything about that customer relationship in one place:

  • Collaborators -- the people who belong to the organization, each with their own role and permissions
  • Entitlements -- what the organization has access to (software licenses, managed environments, services, courses)
  • Orders -- purchase history, including subscriptions
  • Invoices -- financial records and payment status
  • Quotes -- commercial proposals, accepted or pending
  • Contracts -- service agreements with terms and SLA
  • Licenses -- software licenses with activation details
  • Environments -- managed hosting installations
  • Services -- ongoing or project-based work
  • Documents -- shared files, certificates, reports

No need to check Stripe for payments, HubSpot for contacts, and WooCommerce for orders separately. The Organization is the single view.

Organization fields

Every Organization has the following information:

FieldPurpose
NameThe trade name (how you refer to the customer day-to-day)
Legal nameThe official registered name (appears on invoices and tax documents)
Tax IDCNPJ (Brazil), EIN (US), VAT number, or equivalent -- label adapts by country
AddressFull address: street, city, state, ZIP, country
CountryDetermines currency defaults, tax rules, and billing entity routing
CurrencyPreferred currency (BRL or USD) -- used for quotes and invoices
Billing entityWhich MIDDAG entity bills this customer: middag_br or middag_global
Stripe IDsSeparate Stripe Customer IDs for the BR and GLOBAL accounts
HubSpot IDsSeparate HubSpot Company IDs for the BR and GLOBAL accounts

The dual Stripe and HubSpot IDs exist because MIDDAG operates as two legal entities (Brazil and US). Each Organization is routed to the correct entity for billing and CRM. Admins can override this per transaction if needed.

Verification states

Before an Organization can make purchases, accept quotes, or receive tax documents, it must be verified. Verification confirms that the business is real and its tax ID is valid.

StateWhat it means
pendingOrganization was just created. No documentation submitted yet.
under_reviewCustomer submitted documentation. Waiting for admin review.
verifiedAdmin approved. Organization can purchase, accept quotes, and receive invoices.
rejectedAdmin rejected. Customer can resubmit documentation.

Automatic verification is supported for some tax IDs. For example, a Brazilian CNPJ can be validated against the Federal Revenue API. If validation passes, the organization goes directly to verified without manual review.

When an organization becomes verified, MIDDAG Account fires a hook that syncs the data to HubSpot and sends a welcome email.

Parent-child organizations

Organizations can be arranged in a hierarchy: a holding company at the top, with subsidiaries underneath. This supports corporate structures where one parent entity manages several child companies.

Rules:

  • Hierarchy supports up to 3 levels deep (holding, subsidiary, branch).
  • Each level must be a billable entity with its own tax ID.
  • Depth is not recursive -- the maximum is fixed and configurable by the admin.
  • A subsidiary can belong to only one parent at a time.

Multi-entity routing

MIDDAG operates two legal entities: MIDDAG BR (Brazil) and MIDDAG GLOBAL (US LLC). Every transaction -- order, invoice, quote -- is automatically routed to the correct entity based on:

  1. The Organization's tax ID type (CNPJ routes to BR, EIN/VAT routes to GLOBAL)
  2. The Organization's billing entity setting
  3. The product's entity tag
  4. The preferred currency as a fallback

Admins can override the routing for any individual transaction. The routing determines which Stripe account processes the payment, which HubSpot account records the deal, and which tax rules apply.

When to create an Organization

Create an Organization when:

  • A new customer signs up through the portal (self-service)
  • A sales team closes a deal and needs to onboard the customer
  • An admin manually sets up a customer from the WordPress admin
  • A deal is synced from HubSpot and requires a matching Organization record

Do not create an Organization for individual consumers purchasing a single product. For B2C scenarios, MIDDAG Account supports standalone entitlements that are not tied to any Organization (see Entitlements for details on sovereign entitlements).

What admins see

In the WordPress admin, the Organizations list shows:

  • Organization name and legal name
  • Tax ID
  • Verification status (with color indicators)
  • Number of collaborators
  • Number of active entitlements
  • Billing entity (BR or GLOBAL)
  • Creation date

Admins can filter by verification status, billing entity, or date range. Clicking an Organization opens its full detail view with tabs for collaborators, entitlements, orders, invoices, and all other related records.

Admins can also:

  • Approve or reject verification (with a required justification note)
  • Suspend an Organization (blocks portal access for all members without deleting data)
  • Link or unlink Stripe and HubSpot IDs manually
  • Set up parent-child relationships
  • Create Organizations directly for customers who did not self-register
  • Merge duplicate Organizations that represent the same legal entity

Data isolation

Organization data is strictly isolated. Every query in the system filters by organization_id. Data from one Organization never leaks into another Organization's view -- not in the admin interface, not in the REST API, not in exports. This is enforced at the middleware level, not just at the UI level.