Tables you can query
Every table you can query, grouped by area. Each shows its label, the name you write in a statement, what it holds, its key where it has one, and every field with its kind, named as you write it and as the answer returns it. Tables by area: Sales and orders (13), Customers (2), Products and pricing (8), Inventory and purchasing (9), Suppliers (2), Finance and accounting (7), Loyalty and gift cards (10), Quotes (4), Staff (2), Support (3), Blockchain ledger (schema chain) (7), Reports (mv_, read only) (33), Content store (4).
Field kinds
Each field below shows its kind: what it holds, and how you write and read it.
| Kind | The column holds | Written and read as |
|---|---|---|
text | Words, codes and JSON | A string |
number | Counts, quantities and measures | A number |
money | An amount of money | A major-unit amount such as 12.50; the engine converts |
bps | A percentage or rate | A plain number; the engine converts |
boolean | Yes or no | true or false |
timestamp | A date or a moment | A date or date and time |
id | A record's identifier | A string |
Sales and orders
Orders and everything that happens to them: the lines, the profit, where the order came from, the fees paid, and what is refunded, returned or charged back.
Orders (orders)
All sales orders. Key: orderId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | id | orderNumber | text |
customerId | id | currency | text |
subtotal | money | discount | money |
tax | money | shipping | money |
total | money | financialStatus | text |
channel | text | sourceType | text |
state | text | zipCode | text |
country | text | staffId | id |
createdAt | timestamp | postedToLedger | boolean |
accountingPeriodId | id | totalRefunded | money |
externalId | text | externalLocationId | text |
isUtm | boolean | quoteId | id |
numId | number |
Order line items (order_lines)
Individual products on each order. Key: orderId, lineId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | text | variantId | text |
sku | text | productId | text |
vendor | text | productType | text |
category | text | title | text |
quantity | number | unitPrice | money |
lineDiscount | money | lineTotal | money |
unitCost | money | lineRevenue | money |
lineCost | money | grossProfit | money |
margin | bps | currency | text |
status | text | orderItemVersion | number |
createdAt | timestamp | updatedAt | timestamp |
dutyAmount | money | dutyRate | bps |
dutyType | text | dutySource | text |
harmonizedSystemCode | text | inboundFreight | money |
customsClearanceCost | money | insuranceCost | money |
landedCostTotal | money | lineType | text |
accountingPeriodId | id | taxRate | bps |
taxAmount | money | unitPriceExTax | money |
externalLocationId | text | lineId | id |
lineShippingCost | money | shippingAllocationMethod | text |
isPrivateLabel | boolean | isTrafficDriver | boolean |
isMarginBuilder | boolean | isUtm | boolean |
estimatedUtmCost | money | inventoryItemId | text |
numId | number |
Order profit breakdown (order_profit_breakdown)
Per-order profit, fees, refunds, COGS. Key: orderId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | id | revenue | money |
discount | money | cogs | money |
shippingCost | money | gatewayFees | money |
refunds | money | netProfit | money |
marginPercent | bps | createdAt | timestamp |
accountingPeriodId | id | externalLocationId | text |
discountLeakage | money | shippingLeakage | money |
marketingAlloc | money | saasAlloc | money |
fixedCostAlloc | money | contribution | money |
trueProfit | money | channelType | text |
grossProfit | money | settingsVersion | number |
shippingCostSource | text | overheadAllocationMethod | text |
fulfilmentCost | money | fulfilmentRatio | bps |
accountingRevenue | money | estimatedUtmCost | money |
numId | number |
Order attribution (order_attribution)
Marketing source per order. Key: orderId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | id | campaignId | id |
attributedAmount | money | externalLocationId | text |
numId | number |
Order cost audits (order_line_cost_audits)
Cost-of-goods checks per order line. Key: orderLineCostAuditId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | text | sku | text |
fieldName | text | oldValue | money |
newValue | money | source | text |
changedAt | timestamp | orderLineCostAuditId | id |
Payment fees (payment_fees)
Processing fees per transaction. Key: orderId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | id | provider | text |
feeAmount | money | currency | text |
createdAt | timestamp | accountingPeriodId | id |
externalLocationId | text | amount | money |
numId | number |
Price-match discounts (price_match_discounts)
Competitor price-match adjustments. Key: orderId, lineItemExternalId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | text | lineItemExternalId | text |
variantId | text | sku | text |
title | text | discountType | text |
source | text | detectedBy | text |
competitorName | text | competitorPrice | money |
originalPrice | money | delta | money |
quantity | number | totalDelta | money |
currency | text | createdAt | timestamp |
accountingPeriodId | id | externalLocationId | text |
Refunds (refunds)
Customer refunds. Key: refundId.
| Field | Kind | Field | Kind |
|---|---|---|---|
refundId | id | orderId | id |
customerId | id | amount | money |
currency | text | reason | text |
state | text | zipCode | text |
country | text | createdAt | timestamp |
accountingPeriodId | id | externalLocationId | text |
numId | number |
Refund line items (refund_line_items)
Refunded items per refund. Key: refundId, lineItemExternalId.
| Field | Kind | Field | Kind |
|---|---|---|---|
refundId | id | lineItemExternalId | text |
sku | text | quantity | number |
restocked | boolean | restockType | text |
subtotal | money | tax | money |
unitCost | money | createdAt | timestamp |
variantId | text | numId | number |
Returns (returns)
Returned merchandise. Key: returnId.
| Field | Kind | Field | Kind |
|---|---|---|---|
returnId | id | orderId | id |
status | text | totalQuantity | number |
refundId | id | createdAt | timestamp |
updatedAt | timestamp | numId | number |
Return line items (return_line_items)
Returned items per return. Key: returnId, lineId.
| Field | Kind | Field | Kind |
|---|---|---|---|
lineId | text | returnId | id |
variantId | text | quantity | number |
reason | text | reasonNote | text |
restockType | text | subtotal | money |
tax | money | unitCost | money |
createdAt | timestamp | customerNote | text |
Chargebacks (chargebacks)
Disputed payments by customers. Key: chargebackId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chargebackId | id | orderId | id |
customerId | id | amount | money |
currency | text | reason | text |
status | text | state | text |
zipCode | text | country | text |
createdAt | timestamp | accountingPeriodId | id |
externalLocationId | text | numId | number |
Advertising channels (advertising_channels)
Marketing channels and ad spend. Key: externalLocationId.
| Field | Kind | Field | Kind |
|---|---|---|---|
channelId | text | advertiser | text |
advertiserOther | text | currency | text |
targetScope | text | targetProducts | text |
startDate | timestamp | endDate | timestamp |
createdAt | timestamp | updatedAt | timestamp |
archivedAt | timestamp | category | text |
externalLocationId | id | avgMonthlyCost | money |
numId | number |
Customers
The people who buy, and the month each one first bought.
Customers (customers)
All customers and their profiles. Key: customerId.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | country | text |
state | text | city | text |
zip | text | firstOrderAt | timestamp |
lifetimeValue | money | totalOrders | number |
totalRefunds | money | fraudWarnCount | number |
totalChargebacksCount | number | createdAt | timestamp |
initialLtv | money | initialTotalOrders | number |
metafields | text | contactHash | text |
numId | number |
Customer cohorts (customer_cohorts)
Customers grouped by acquisition period. Key: cohortMonth, customerId.
| Field | Kind | Field | Kind |
|---|---|---|---|
cohortMonth | timestamp | customerId | id |
numId | number |
Products and pricing
What you sell, how it is organised, and what it costs and sells for.
Products (products)
Your full product catalog. Key: productId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | id | tags | text |
launchDate | timestamp | expiryDate | timestamp |
title | text | status | text |
createdAt | timestamp | updatedAt | timestamp |
metafields | text | handle | text |
numId | number |
Product variants (product_variants)
SKU variants of each product. Key: variantId.
| Field | Kind | Field | Kind |
|---|---|---|---|
variantId | id | productId | text |
sku | text | price | money |
barcode | text | createdAt | timestamp |
updatedAt | timestamp | title | text |
metafields | text | weightGrams | number |
lengthMm | number | widthMm | number |
heightMm | number | cubicMm3 | number |
weightSource | text | cost | money |
currency | text | isMargin | boolean |
marginPriorityScore | number | supplierId | text |
weightedAvgBuyPriceExTax | number | markupTargetPct | bps |
maxDiscountPct | bps | rrpIncTax | number |
freightCostIncTax | number | directCostExTax | number |
cogsExTax | number | lastPurchasePriceExTax | number |
leadTimeDays | number | tracked | boolean |
numId | number |
Product prices (product_prices)
Price history per variant. Key: productPriceId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | marketId | text |
price | money | currency | text |
recordedAt | timestamp | productPriceId | id |
numId | number |
Product Types (product_types)
The product types a catalogue is organised by. Key: productTypeId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productTypeId | id | title | text |
createdAt | timestamp | updatedAt | timestamp |
numId | number |
Product classifications (product_classifications)
Tax and shipping product classes. Key: sku.
| Field | Kind | Field | Kind |
|---|---|---|---|
variantId | text | sku | text |
externalProductId | text | title | text |
productType | text | vendor | text |
marginStatus | text | avgMargin | bps |
avgUnitCost | money | avgUnitPrice | money |
currency | text | portfolioQuadrant | text |
demandVelocity | number | isTrafficDriver | boolean |
isOwnBrand | boolean | priceMatchCount | number |
priceMatchTotalDelta | money | isInsurance | boolean |
orderCount | number | confidence | number |
lastComputedAt | timestamp | source | text |
strategyTag | text | daysOnHand | number |
daysToExpiry | number | strategyLastComputedAt | timestamp |
competitiveFlag | text | priceDeviation | bps |
attachRate | bps | gmroi | number |
inventoryRoic | number | capitalLocked | money |
autoTargetPrice | money | riskScore | number |
basketLift | money | lossMinimisationMode | boolean |
Product Edge (product_edge)
Links each product to its vendor, product type and collection. Key: edgeId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | vendorId | id |
productTypeId | id | collectionId | id |
createdAt | timestamp | edgeId | text |
Collections (collections)
Product collections and groupings. Key: collectionId.
| Field | Kind | Field | Kind |
|---|---|---|---|
collectionId | id | title | text |
createdAt | timestamp | updatedAt | timestamp |
numId | number |
Vendors (vendors)
The vendors whose products you sell. Key: vendorId.
| Field | Kind | Field | Kind |
|---|---|---|---|
vendorId | id | title | text |
createdAt | timestamp | updatedAt | timestamp |
numId | number |
Inventory and purchasing
Stock on hand and every movement of it, transfers between locations, and the purchase orders that replenish it.
Stock levels (inventories)
Current stock by product and location. Key: sourceId, locationId.
| Field | Kind | Field | Kind |
|---|---|---|---|
sourceId | id | locationId | text |
available | number | incoming | number |
outgoing | number | soh | number |
adjustmentQty | number | minStock | number |
autoReplenish | boolean | safetyStock | number |
stockCoverageDays | number | dailySalesVelocity | number |
sellThroughRate | bps | incomingQuantity | number |
reorderQuantity | number | poStatus | text |
version | number | createdAt | timestamp |
updatedAt | timestamp | variantId | text |
cost | money | lastPurchasedAt | timestamp |
inventoryValue | money | numId | number |
Stock movements (inventory_movements)
All stock changes: sales, transfers, receipts. Key: sourceTopic, originId.
| Field | Kind | Field | Kind |
|---|---|---|---|
movementId | text | sourceId | text |
locationId | text | quantityDelta | number |
previousAvailable | number | available | number |
reason | text | sourceTopic | text |
originId | text | createdAt | timestamp |
accountingPeriodId | id | previousIncoming | number |
incoming | number | previousOutgoing | number |
outgoing | number | previousSoh | number |
soh | number | variantId | text |
productId | text | cost | money |
inventoryValue | money | dailySalesVelocity | number |
sellThroughRate | bps | stockCoverageDays | number |
Stock transfers (inventory_transfer_orders)
Stock moved between stores. Key: transferId.
| Field | Kind | Field | Kind |
|---|---|---|---|
transferId | id | sourceLocationId | text |
destinationLocationId | text | status | text |
createdByStaff | text | createdAt | timestamp |
updatedAt | timestamp | numId | number |
Transfer line items (inventory_transfer_lines)
Items inside each stock transfer. Key: transferId, variantId.
| Field | Kind | Field | Kind |
|---|---|---|---|
transferId | text | variantId | text |
quantity | number | cost | money |
Transfer recommendations (inventory_transfer_decisions)
Suggested stock transfers between stores. Key: decisionId.
| Field | Kind | Field | Kind |
|---|---|---|---|
decisionId | text | variantId | text |
sourceLocationId | text | destinationLocationId | text |
availableStock | number | incomingStock | number |
demandVelocitySource | number | demandVelocityDestination | number |
daysOfCoverSource | number | daysOfCoverDestination | number |
transferCost | money | procurementCost | money |
opportunityLoss | money | decision | text |
quantity | number | version | number |
createdAt | timestamp |
Goods receipts (goods_receipts)
Stock received from suppliers. Key: receiptId.
| Field | Kind | Field | Kind |
|---|---|---|---|
receiptId | id | poId | id |
variantId | id | quantityReceived | number |
damagedQty | number | qualityFlag | text |
receivedBy | id | receivedAt | timestamp |
accountingPeriodId | id | numId | number |
Purchase orders (purchase_orders)
Orders placed with suppliers. Key: poId.
| Field | Kind | Field | Kind |
|---|---|---|---|
poId | id | supplierId | id |
currency | text | status | text |
totalAmount | money | createdByStaff | id |
approvedByStaff | id | locationId | id |
createdAt | timestamp | updatedAt | timestamp |
version | number | accountingPeriodId | id |
numId | number |
Purchase order lines (purchase_order_lines)
Items on each purchase order. Key: poId, variantId.
| Field | Kind | Field | Kind |
|---|---|---|---|
poId | id | variantId | id |
quantity | number | unitCost | money |
receivedQty | number | damagedQty | number |
currency | text | accountingPeriodId | id |
Purchase order shipments (purchase_order_shipments)
Inbound shipments from suppliers. Key: shipmentId.
| Field | Kind | Field | Kind |
|---|---|---|---|
shipmentId | id | poId | id |
carrierName | text | trackingNumber | text |
incoterm | text | freightCost | money |
insuranceCost | money | dutiesCost | money |
customsCost | money | otherLanding | money |
currency | text | fxRateLocked | number |
expectedDeparture | timestamp | expectedArrival | timestamp |
actualArrival | timestamp | shipmentStatus | text |
accountingPeriodId | id | createdAt | timestamp |
numId | number |
Suppliers
Who supplies what, and how the supplier is rated.
Suppliers (suppliers)
Vendor and supplier directory. Key: supplierId.
| Field | Kind | Field | Kind |
|---|---|---|---|
supplierId | id | name | text |
status | text | defaultCurrency | text |
paymentTermsDays | number | creditLimit | money |
riskScore | number | createdAt | timestamp |
updatedAt | timestamp | version | number |
exposureStatus | text | contractStatus | text |
sfrsComposite | number | cr | number |
cdv | number | cse | number |
lti | number | sff | number |
csi | number | concentrationFreeze | boolean |
marginShock | boolean | currencyCorridor | boolean |
capitalExposure | boolean | revenueDependency | number |
substitutionElasticity | number | numId | number |
Product suppliers (product_suppliers)
Supplier links per product. Key: productId, supplierId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | supplierId | text |
isPrimary | boolean | leadTimeDays | number |
minOrderQuantity | number | lastCostExTax | number |
currency | text | createdAt | timestamp |
updatedAt | timestamp |
Finance and accounting
The journals every sale and refund is posted to, prepaid costs, profit leakage and the apps you pay for.
Journals (journals)
Accounting journal headers. Key: journalId, createdAt.
| Field | Kind | Field | Kind |
|---|---|---|---|
journalId | id | aggregateId | id |
version | number | currency | text |
reference | text | createdAt | timestamp |
hash | text | accountingPeriodId | id |
externalLocationId | text | txHash | text |
blockHeight | number |
Journal entries (journal_entries)
Accounting entries (debit/credit lines). Key: entryId.
| Field | Kind | Field | Kind |
|---|---|---|---|
entryId | id | journalId | id |
accountId | id | side | text |
amount | money | currency | text |
functionalAmount | money | functionalCurrency | text |
createdAt | timestamp | accountingPeriodId | id |
externalLocationId | text |
Journal references (journal_references)
Links between journals and source records. Key: referenceType, referenceId.
| Field | Kind | Field | Kind |
|---|---|---|---|
referenceType | text | referenceId | id |
journalId | id | createdAt | timestamp |
sourceDomain | text | sourceHash | text |
reference | text | orderId | id |
quoteId | id | policyId | id |
ruleId | id | customerId | id |
staffId | id | country | text |
state | text | zipCode | text |
sourceType | text | sourceId | id |
refundId | id | returnId | id |
variantId | id | locationId | id |
accountId | id | campaignId | id |
supplierId | id |
Prepaid expenses (prepaid_expenses)
Costs paid up front, amortised over time. Key: expenseId.
| Field | Kind | Field | Kind |
|---|---|---|---|
expenseId | id | totalValue | money |
amortized | money | startDate | timestamp |
endDate | timestamp | accountingPeriodId | id |
description | text | category | text |
amortizationMethod | text | remainingBalance | money |
updatedAt | timestamp | status | text |
createdAt | timestamp | numId | number |
Prepaid expense allocations (prepaid_expense_allocations)
Monthly amortisation of prepaid costs. Key: allocationId.
| Field | Kind | Field | Kind |
|---|---|---|---|
allocationId | text | expenseId | id |
accountingPeriodId | id | allocatedAmount | money |
status | text | createdAt | timestamp |
Leakage scores (leakage_scores)
Revenue leakage risk by source. Key: aggregateId.
| Field | Kind | Field | Kind |
|---|---|---|---|
aggregateId | id | scope | text |
leakageScore | number | normalizedImpact | bps |
maxSeverityWeight | number | totalFinancialImpact | money |
transactionRevenue | money | assessmentCount | number |
exceedsAlertThreshold | boolean | weightedAverageScore | number |
policyHash | text | computedAt | timestamp |
externalLocationId | text | numId | number |
Installed apps (installed_paid_apps)
Paid Shopify apps and subscriptions. Key: appId.
| Field | Kind | Field | Kind |
|---|---|---|---|
appId | text | appName | text |
category | text | monthlyCost | money |
currency | text | fxRate | number |
installedDate | timestamp | status | text |
archivedAt | timestamp | createdAt | timestamp |
updatedAt | timestamp |
Loyalty and gift cards
Loyalty members, their points and tiers, the guardrails that govern the programme, and gift card balances.
Loyalty members (loyalty_members)
Enrolled loyalty program customers. Key: loyaltyMemberId.
| Field | Kind | Field | Kind |
|---|---|---|---|
loyaltyMemberId | id | customerId | text |
memberStatus | text | tier | text |
currency | text | pointsBalance | number |
totalPointsEarned | number | totalPointsRedeemed | number |
totalPointsExpired | number | totalPointsReserved | number |
currentMultiplier | bps | annualSpend | money |
lastPurchaseAt | timestamp | dormantSinceAt | timestamp |
tierQualifiedAt | timestamp | version | number |
createdAt | timestamp | updatedAt | timestamp |
numId | number |
Loyalty accounts (loyalty_accounts)
Customer loyalty point balances. Key: customerId.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | pointsBalance | number |
capturedMultiplier | number | createdAt | timestamp |
state | text | zipCode | text |
country | text | updatedAt | timestamp |
numId | number |
Loyalty transactions (loyalty_transactions)
Points earned and redeemed. Key: transactionId.
| Field | Kind | Field | Kind |
|---|---|---|---|
transactionId | id | customerId | id |
pointsDelta | number | reason | text |
state | text | zipCode | text |
country | text | createdAt | timestamp |
accountingPeriodId | id | numId | number |
Loyalty point batches (loyalty_point_batches)
Issued points with expiry tracking. Key: batchId.
| Field | Kind | Field | Kind |
|---|---|---|---|
batchId | text | customerId | text |
orderId | text | status | text |
pointsOriginal | number | pointsRemaining | number |
marginWeight | bps | currency | text |
earnedAt | timestamp | availableAt | timestamp |
expiresAt | timestamp | reservedAt | timestamp |
redeemedAt | timestamp | reversedAt | timestamp |
version | number | createdAt | timestamp |
policyId | text | sourceOpId | text |
pointValue | money |
Loyalty tiers (loyalty_tier_thresholds)
Spend thresholds for tier upgrades. Key: tier.
| Field | Kind | Field | Kind |
|---|---|---|---|
tier | text | annualSpendMin | money |
defaultMultiplier | bps | sortOrder | number |
annualSpendMax | money |
Loyalty guardrails (loyalty_guardrail_thresholds)
Limits that prevent loyalty abuse. Key: loyaltyGuardrailThresholdId.
| Field | Kind | Field | Kind |
|---|---|---|---|
liabilityRatioCeiling | bps | marginFloor | bps |
frequencyCeiling | bps | maxEarnMultiplier | bps |
settlementDelayDays | number | defaultExpiryDays | number |
breakageHealthyFloor | bps | breakageHealthyCeiling | bps |
updatedAt | timestamp | loyaltyGuardrailThresholdId | id |
numId | number |
Loyalty risk scores (loyalty_risk_scores)
Fraud risk per loyalty account.
| Field | Kind | Field | Kind |
|---|---|---|---|
score | number | band | text |
lir | number | rvr | number |
mes | number | bcr | number |
crl | number | w1 | number |
w2 | number | w3 | number |
w4 | number | w5 | number |
computedAt | timestamp |
Loyalty family pools (loyalty_family_pools)
Shared family loyalty accounts. Key: loyaltyFamilyPoolId.
| Field | Kind | Field | Kind |
|---|---|---|---|
poolId | text | householdId | text |
status | text | poolBalance | number |
currency | text | version | number |
createdAt | timestamp | updatedAt | timestamp |
loyaltyFamilyPoolId | id | numId | number |
Loyalty family members (loyalty_family_members)
Customers in shared loyalty pools. Key: poolId, customerId.
| Field | Kind | Field | Kind |
|---|---|---|---|
poolId | text | customerId | text |
personalBalance | number | joinedAt | timestamp |
Gift card balances (gift_card_liabilities)
Outstanding gift card values. Key: giftCardId.
| Field | Kind | Field | Kind |
|---|---|---|---|
giftCardId | id | initialValue | money |
balance | money | currency | text |
createdAt | timestamp | updatedAt | timestamp |
expiresOn | timestamp | deactivatedAt | timestamp |
cardState | text | numId | number |
Quotes
Quotes made for customers, their lines, their expected margin, and the orders they became.
Quotes (quotes)
Customer quotes (draft orders). Key: quoteId.
| Field | Kind | Field | Kind |
|---|---|---|---|
quoteId | id | customerId | id |
currency | text | subtotal | money |
totalDiscount | money | estimatedCogs | money |
estimatedProfit | money | state | text |
zipCode | text | country | text |
staffId | id | status | text |
createdAt | timestamp | validUntil | timestamp |
approvedBy | text | riskScore | number |
evImpact | money | governanceStatus | text |
governanceNotes | text | updatedAt | timestamp |
email | text | phone | text |
sourceName | text | tags | text |
metafields | text | acceptAutomaticDiscounts | boolean |
appliedDiscountValue | money | appliedDiscountType | text |
appliedDiscountTitle | text | appliedDiscounts | text |
note | text | aiNarrative | text |
locationId | text | lockPrices | boolean |
numId | number |
Quote line items (quote_items)
Items on each quote. Key: quoteId, variantId.
| Field | Kind | Field | Kind |
|---|---|---|---|
quoteId | id | variantId | id |
quantity | number | unitPrice | money |
unitCost | money | appliedDiscountValue | money |
competitorName | text | competitorPrice | money |
landedCost | money | dutyAmount | money |
shippingAllocation | money | contributionMargin | money |
title | text | variantTitle | text |
appliedDiscountType | text | appliedDiscountTitle | text |
appliedDiscountDescription | text | appliedDiscounts | text |
customAttributes | text | taxLines | text |
taxable | boolean | requiresShipping | boolean |
isGiftCard | boolean | sku | text |
lineTotal | money | discountedTotal | money |
imageUrl | text |
Quote margin snapshots (quote_margin_snapshot)
Margin snapshot at quote acceptance. Key: quoteId.
| Field | Kind | Field | Kind |
|---|---|---|---|
quoteId | id | expectedRevenue | money |
expectedCogs | money | expectedProfit | money |
marginPercent | bps | createdAt | timestamp |
Quote conversions (quote_conversions)
Quotes that became orders. Key: quoteId.
| Field | Kind | Field | Kind |
|---|---|---|---|
quoteId | id | orderId | id |
staffId | id | convertedAt | timestamp |
shopifyOrderId | text |
Staff
The people who work in the business and the commission they earn.
Staff (staff)
Sales staff and team members. Key: staffId.
| Field | Kind | Field | Kind |
|---|---|---|---|
staffId | id | tenantRoles | id |
locationRoles | text | isActive | boolean |
createdAt | timestamp | updatedAt | timestamp |
version | number | isSuperAdmin | boolean |
staffName | text | externalId | text |
email | text |
Staff commissions (staff_commissions)
Commission earned per sale. Key: orderId, staffId.
| Field | Kind | Field | Kind |
|---|---|---|---|
orderId | id | staffId | id |
commissionAmount | money | accountingPeriodId | id |
externalLocationId | text |
Support
Support tickets, their history, and the service log entries they come from.
Support Tickets (support_tickets)
Support tickets raised from errors, with severity, status and resolution. Key: ticketId.
| Field | Kind | Field | Kind |
|---|---|---|---|
ticketId | id | ticketNumber | text |
sourceLogId | id | severity | text |
status | text | shopDomain | text |
errorCode | text | service | text |
correlationScope | text | title | text |
merchantMessage | text | internalSummary | text |
assignedTo | text | requiresTenantNotification | boolean |
tenantNotifiedAt | timestamp | tenantAcknowledgedAt | timestamp |
fixRequired | boolean | fixStatus | text |
gitBranch | text | gitPrUrl | text |
gitCommitSha | text | occurrenceCount | number |
lastLogAt | timestamp | resolvedAt | timestamp |
resolvedBy | text | resolutionSummary | text |
createdAt | timestamp | updatedAt | timestamp |
kind | text | category | text |
createdBy | text | githubIssueNumber | number |
githubIssueUrl | text | numId | number |
Support Ticket Events (support_ticket_events)
The history of each support ticket: who did what and when. Key: eventId.
| Field | Kind | Field | Kind |
|---|---|---|---|
eventId | id | ticketId | id |
eventType | text | actorType | text |
actorId | text | message | text |
metadataJson | text | createdAt | timestamp |
Reactive Logs (reactive_logs)
Service log entries, with their severity, service and error code. Key: logId.
| Field | Kind | Field | Kind |
|---|---|---|---|
logId | id | timestamp | timestamp |
level | text | status | text |
service | text | ddsource | text |
environment | text | correlationId | text |
requestId | text | traceId | text |
shopDomain | text | scope | text |
errorCode | text | errorMessage | text |
message | text | merchantImpact | text |
actionRequired | text | requiresTicket | boolean |
requiresTenantNotification | boolean | trace | text |
metadataJson | text | createdAt | timestamp |
count | number | dedupHash | text |
Blockchain ledger (schema chain)
The ledger's chains and the transactions, receipts and consensus, governance, treasury and trust records written to them. These tables live in the schema chain, so name them with it: chain.transactions.
Chains (chain.chains)
The ledger chains, with their height, state hash and status. Key: chainId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chainId | text | chainName | text |
chainType | text | genesisBlockHash | text |
currentHeight | number | currentStateRootHash | text |
status | text | createdAt | timestamp |
updatedAt | timestamp | numId | number |
Transactions (chain.transactions)
Transactions submitted to a chain, with their signer, hash and status. Key: chainTxId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chainTxId | text | chainId | text |
blockId | text | txHash | text |
txType | text | signerPrincipalId | text |
payloadHash | text | nonce | number |
signature | text | txStatus | text |
submittedAt | timestamp | finalizedAt | timestamp |
numId | number |
Transaction Receipts (chain.transaction_receipts)
The execution result of each chain transaction. Key: receiptId.
| Field | Kind | Field | Kind |
|---|---|---|---|
receiptId | text | chainTxId | text |
executionStatus | text | executionHash | text |
resultHash | text | gasUsed | number |
errorCode | text | createdAt | timestamp |
Consensus Votes (chain.consensus_votes)
Validator votes cast in a chain's consensus rounds. Key: consensusVoteId.
| Field | Kind | Field | Kind |
|---|---|---|---|
consensusVoteId | text | consensusRoundId | text |
validatorId | text | voteType | text |
voteHash | text | signature | text |
createdAt | timestamp | numId | number |
Governance Events (chain.governance_events)
Governance events recorded on the chain, with their evidence and vote hashes. Key: chainGovernanceEventId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chainGovernanceEventId | text | chainTxId | text |
governanceEventId | text | eventHash | text |
evidenceRootHash | text | voteRootHash | text |
resolutionHash | text | createdAt | timestamp |
Treasury Events (chain.treasury_events)
Treasury events recorded on the chain, with their approval and ledger hashes. Key: chainTreasuryEventId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chainTreasuryEventId | text | chainTxId | text |
treasuryTransactionId | text | treasuryEventHash | text |
approvalRootHash | text | ledgerEntryRootHash | text |
createdAt | timestamp |
Trust Events (chain.trust_events)
Trust events recorded on the chain, with the trust hash before and after. Key: chainTrustEventId.
| Field | Kind | Field | Kind |
|---|---|---|---|
chainTrustEventId | text | chainTxId | text |
trustEventId | text | trustEventHash | text |
previousTrustHash | text | newTrustHash | text |
createdAt | timestamp |
Reports (mv_, read only)
Reports are tables the platform keeps up to date for you. Their names start with mv_, you read them like any table, and you cannot write to them.
Cash flow (daily) (mv_cash_flow_daily)
Daily cash inflow and outflow.
| Field | Kind | Field | Kind |
|---|---|---|---|
flowDate | timestamp | currency | text |
externalLocationId | text | operatingInflows | money |
operatingOutflows | money | investingOutflows | money |
refundOutflows | money | chargebackLosses | money |
gatewayFees | money | financingFlows | money |
CFO dashboard (mv_cfo_dashboard_summary)
Top-line metrics for executive review.
| Field | Kind | Field | Kind |
|---|---|---|---|
totalRevenue | money | totalExpense | money |
grossProfit | money | giftcardLiability | money |
loyaltyLiability | money |
Channel P&L (daily) (mv_channel_daily_pnl)
Profit & loss by marketing channel.
| Field | Kind | Field | Kind |
|---|---|---|---|
pnlDate | timestamp | channel | text |
currency | text | externalLocationId | text |
netSales | money | cogs | money |
gatewayFees | money | refundTotal | money |
orderCount | number |
Cohort retention (mv_cohort_retention)
Customer retention by acquisition month.
| Field | Kind | Field | Kind |
|---|---|---|---|
cohortMonth | timestamp | cohortSize | number |
month0 | number | month1 | number |
month2 | number | month3 | number |
month6 | number | month12 | number |
Competitor price pressure (mv_competitor_price_pressure)
SKUs under competitor pricing pressure.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | avgPriceIndex | number |
minPriceIndex | number | competitorCount | number |
freshestScrape | timestamp |
Customer concentration (mv_customer_concentration)
Revenue concentration risk by customer.
| Field | Kind | Field | Kind |
|---|---|---|---|
currency | text | dayOfWeek | number |
hourOfDay | number | orderCount | number |
totalRevenue | money | totalDiscount | money |
Customer economics (mv_customer_economics)
LTV, AOV and frequency per customer.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | currency | text |
orderCount | number | revenueTotal | money |
cogsTotal | money | grossMarginTotal | money |
refundCount | number | refundTotal | money |
chargebackCount | number | chargebackTotal | money |
Digital cost per order (mv_digital_cost_per_order)
Marketing spend per acquired order.
| Field | Kind | Field | Kind |
|---|---|---|---|
accountingPeriodId | text | totalDigitalOperatingCost | money |
digitalCostPerOrder | money | createdAt | timestamp |
Product graph (inbound) (mv_graph_inbound_degree)
Most-bought-with product connections.
| Field | Kind | Field | Kind |
|---|---|---|---|
gid | text | entityType | text |
inboundEdges | number | labelDiversity | number |
uniqueSources | number | activeEdges | number |
Product graph metrics (mv_graph_metrics)
Cross-sell and substitution graph stats.
| Field | Kind | Field | Kind |
|---|---|---|---|
gid | text | entityType | text |
outboundEdges | number | labelDiversity | number |
avgWeight | number | uniqueTargets | number |
activeEdges | number |
Stock valuation (mv_inventory_valuation)
Current inventory value by SKU and location.
| Field | Kind | Field | Kind |
|---|---|---|---|
variantId | text | locationId | text |
quantity | number | costPerUnit | money |
currency | text | totalValue | money |
updatedAt | timestamp |
Store performance (mv_location_performance)
Sales and margin by store.
| Field | Kind | Field | Kind |
|---|---|---|---|
locationKey | text | locationName | text |
orderCount | number | revenue | money |
cogs | money | grossProfit | money |
marginRate | number | pgAnomaly | number |
Monthly revenue (mv_monthly_revenue)
Revenue trend by month.
| Field | Kind | Field | Kind |
|---|---|---|---|
revenueMonth | timestamp | externalLocationId | text |
totalRevenue | money | totalOrders | number |
Daily order lines (mv_order_lines_daily)
Order line totals rolled up daily.
| Field | Kind | Field | Kind |
|---|---|---|---|
metricDay | timestamp | variantId | text |
sku | text | title | text |
vendor | text | productType | text |
category | text | currency | text |
locationKey | text | totalRevenue | money |
totalCost | money | totalDiscount | money |
totalNetRevenue | money | totalGrossProfit | money |
orderCount | number | unitsSold | number |
Price simulations (mv_price_simulation_results)
Modelled impact of price changes.
| Field | Kind | Field | Kind |
|---|---|---|---|
skuId | text | simulationId | text |
predictedDemand | number | predictedRevenue | money |
predictedMargin | money | revenueChange | money |
marginChange | money | elasticityUsed | number |
createdAt | timestamp |
Product complements (mv_product_complements)
Products often bought together.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | relatedProductId | text |
relationshipScore | number | complementType | text |
blendedMarginImpact | number |
Product intelligence (mv_product_intelligence)
Sales velocity, margin, ABC class per SKU. Key: productId.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | title | text |
isOwnBrand | boolean | isMarginProduct | boolean |
tags | text | unitsSold90d | number |
revenue90d | money | orders90d | number |
avgUnitPrice | money | avgUnitCost | money |
avgLandedCost | money | grossMarginPct | bps |
unitsSold30d | number | unitsSoldPrior30d | number |
velocityTrend | text | trendPctChange | number |
inventoryOnHand | number | daysOfStock | number |
inventoryStatus | text | paidChannelPct | bps |
organicPct | bps | adDependent | boolean |
priceElasticity | number | performanceClass | text |
discountNecessity | number | bundleCandidate1 | text |
bundleCandidate2 | text | bundleCandidate3 | text |
deadStockAlt1 | text | deadStockAlt2 | text |
deadStockAlt3 | text | updatedAt | timestamp |
expiryDate | timestamp | vendor | text |
productType | text |
Product substitutions (mv_product_substitutions)
Substitutes bought when out of stock.
| Field | Kind | Field | Kind |
|---|---|---|---|
productId | text | relatedProductId | text |
relationshipScore | number |
Promotion simulations (mv_promotion_simulation_results)
Modelled impact of promo campaigns.
| Field | Kind | Field | Kind |
|---|---|---|---|
skuId | text | simulationId | text |
promoRoi | number | incrementalSales | money |
discountCost | money | predictedRevenue | money |
predictedMargin | money | promotionIsViable | boolean |
createdAt | timestamp |
App spend by category (mv_saas_cost_by_category)
App spend grouped by function.
| Field | Kind | Field | Kind |
|---|---|---|---|
accountingPeriodId | text | category | text |
sourceType | text | allocatedAmount | money |
sourceCount | number |
App spend by store (mv_saas_cost_by_store)
App spend allocated per store.
| Field | Kind | Field | Kind |
|---|---|---|---|
accountingPeriodId | text | externalLocationId | text |
sourceType | text | allocatedAmount | money |
allocationCount | number |
App spend summary (mv_saas_cost_summary)
Total app and platform spend.
| Field | Kind | Field | Kind |
|---|---|---|---|
accountingPeriodId | text | totalPlatformCost | money |
totalAppCost | money | totalSubscriptionCost | money |
totalPaymentInfraCost | money | totalLogisticsOverhead | money |
totalFulfilmentCost | money | totalDigitalOperatingCost | money |
digitalCostPerOrder | money | digitalCostRatio | bps |
marginErosion | bps | createdAt | timestamp |
App spend margin impact (mv_saas_margin_erosion)
How app costs eat into margin.
| Field | Kind | Field | Kind |
|---|---|---|---|
accountingPeriodId | text | totalDigitalOperatingCost | money |
digitalCostRatio | bps | marginErosion | bps |
createdAt | timestamp |
Signal: customer discounts (mv_signal_customer_discount_profile)
Discount usage patterns per customer.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | statMonth | timestamp |
accountingPeriodId | text | externalLocationId | text |
totalOrderCount | number | discountedOrderCount | number |
totalRevenue | money | totalCost | money |
totalDiscount | money | grossProfit | money |
totalRefundAmount | money | contributionMargin | money |
discountRatio | bps | firstOrderAt | timestamp |
lastOrderAt | timestamp |
Signal: customer geography (mv_signal_customer_geo_profile)
Customer location and shipping patterns.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | homeCountry | text |
historicOrderCount | number | registeredCountry | text |
registeredZip | text | recentOrderCountry | text |
recentOrderZip | text |
Signal: customer refunds (mv_signal_customer_refund_stats)
Refund frequency per customer.
| Field | Kind | Field | Kind |
|---|---|---|---|
customerId | id | statMonth | timestamp |
accountingPeriodId | text | externalLocationId | text |
refundCount | number | orderCount | number |
totalRefundAmount | money | refundRate | bps |
fraudWarnCount | number | firstRefundAt | timestamp |
lastRefundAt | timestamp |
Signal: daily velocity (mv_signal_daily_velocity)
Daily sales velocity per SKU.
| Field | Kind | Field | Kind |
|---|---|---|---|
statDate | timestamp | accountingPeriodId | text |
externalLocationId | text | dailyOrderCount | number |
dailyOrderValue | money | dailyRefundCount | number |
dailyRefundValue | money |
Signal: geographic clusters (mv_signal_geo_cluster_stats)
Sales clustered by region.
| Field | Kind | Field | Kind |
|---|---|---|---|
country | text | state | text |
zipCode | text | statMonth | timestamp |
accountingPeriodId | text | externalLocationId | text |
clusterCustomerCount | number | refundingCustomerCount | number |
totalRefundAmount | money | refundRate | bps |
latestRefundAt | timestamp |
Signal: monthly periods (mv_signal_period_monthly_stats)
Monthly comparative period stats.
| Field | Kind | Field | Kind |
|---|---|---|---|
yearMonth | timestamp | accountingPeriodId | text |
externalLocationId | text | monthlyRevenue | money |
monthlyDiscount | money | monthlyGrossMargin | money |
monthlyContributionMargin | money | monthlyRefunds | money |
monthlyOrderCount | number |
Signal: refund details (mv_signal_refund_enriched)
Refunds with enriched context.
| Field | Kind | Field | Kind |
|---|---|---|---|
refundId | id | customerId | id |
orderId | id | refundAmount | money |
orderTotal | money | accountingPeriodId | id |
externalLocationId | text | orderCountry | text |
orderZip | text | refundCountry | text |
refundZip | text | countryDiffers | boolean |
zipDiffers | boolean | orderCreatedAt | timestamp |
refundCreatedAt | timestamp | daysToRefund | number |
fraudWarnCount | number | customerTotalOrders | number |
customerLifetimeValue | money | gcRedemptionCount | number |
gcLineTotal | money |
Signal: staff refunds (mv_signal_staff_refund_stats)
Refund stats per staff member.
| Field | Kind | Field | Kind |
|---|---|---|---|
staffId | id | statMonth | timestamp |
accountingPeriodId | text | orderCount | number |
refundCount | number | totalRefunded | money |
staffRate | bps | tenantAvgRate | bps |
lastRefundAt | timestamp |
SKU P&L (daily) (mv_sku_daily_pnl)
Daily profit & loss per SKU.
| Field | Kind | Field | Kind |
|---|---|---|---|
pnlDate | timestamp | variantId | text |
currency | text | externalLocationId | text |
revenue | money | cogs | money |
gatewayFees | money | refunds | money |
chargebacks | money | orderCount | number |
Tenant P&L (daily) (mv_tenant_daily_pnl)
Daily profit & loss across the whole tenant.
| Field | Kind | Field | Kind |
|---|---|---|---|
pnlDate | timestamp | currency | text |
externalLocationId | text | revenue | money |
cogs | money | operatingExpenses | money |
orderCount | number |
Content store
These four tables are the content store: the entries, types, files and version history that hold a site's pages and records. They live in the schema content. Money does not appear in them; an entry's fields is JSON, read with e.fields.name.
Entries (entries)
The content store's entries: each is a record of a content type, its fields held as JSON. Key: id.
| Field | Kind | Field | Kind |
|---|---|---|---|
id | text | contentType | text |
slug | text | fields | text |
published | boolean | version | number |
createdAt | timestamp | updatedAt | timestamp |
publishedAt | timestamp | createdBy | text |
updatedBy | text | archived | boolean |
Content types (content_types)
The content store's types: the name and field definitions each entry follows. Key: id.
| Field | Kind | Field | Kind |
|---|---|---|---|
id | text | name | text |
displayField | text | fields | text |
createdAt | timestamp | updatedAt | timestamp |
Assets (content.assets)
The content store's files and images, each with its title and file details. Key: id.
| Field | Kind | Field | Kind |
|---|---|---|---|
id | text | title | text |
description | text | file | text |
published | boolean | createdAt | timestamp |
updatedAt | timestamp |
Entry versions (entry_versions)
Earlier versions of each entry, snapshotted when it changes. Key: id, versionNo.
| Field | Kind | Field | Kind |
|---|---|---|---|
id | text | versionNo | number |
contentType | text | slug | text |
fields | text | published | boolean |
snapshottedAt | timestamp |