Skip to content

FluentCart Database Schema ​

FluentCart uses custom database tables to store all the e-commerce data. Here are the list of database tables and their schema to understand overall database design and related data attributes of each model.

Core Entity Relationships ​

🔍 Interactive ER Diagram

Click on the diagram below to zoom in for better readability. The diagram shows the relationships between all FluentCart database tables.

Schema Overview ​

The FluentCart database schema is built around these core concepts:

  • Orders & Transactions: Complete order lifecycle management with payment tracking
  • Customers & Addresses: Customer relationship management with multiple address support
  • Products & Variations: Flexible product catalog with inventory management
  • Subscriptions: Recurring billing and subscription lifecycle management
  • Coupons & Discounts: Advanced discount system with conditions and stacking
  • Shipping & Tax: Configurable shipping zones and tax rate management
  • Activity & Logging: Comprehensive audit trail for all operations
  • Email Notifications: Automated email templates and delivery system
  • Background Jobs: Scheduled actions for automated processing
  • Cart Management: Shopping cart persistence and checkout flow
  • Attributes & Labels: Flexible product attributes and object tagging system
  • Webhooks: External integration logging and delivery tracking
  • Licensing (Pro): Software license management with activation tracking
  • Promotions (Pro): Order promotion tracking and statistics

Key Design Principles ​

  1. Currency Precision: All monetary values stored as BIGINT in cents to avoid floating-point precision issues
  2. Flexible Configuration: JSON columns used for extensible configuration data
  3. Audit Trail: Comprehensive activity logging for all important operations
  4. Referential Integrity: Enforced in model code and application services. The migrations declare no SQL FOREIGN KEY constraints, so cascades and orphan cleanup are handled by FluentCart, not the database
  5. Performance Optimization: Strategic indexing on frequently queried columns
  6. Multi-tenancy Ready: UUID-based public identifiers for external integrations

Database Tables ​

fct_customers Table ​

This table stores customer information and purchase history

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
user_idBIGINT UNSIGNED NULLWordPress user ID
contact_idBIGINT UNSIGNED NOT NULL DEFAULT '0'Contact ID
emailVARCHAR(192) NOT NULL DEFAULT ''Customer email
first_nameVARCHAR(192) NOT NULL DEFAULT ''First name
last_nameVARCHAR(192) NOT NULL DEFAULT ''Last name
statusVARCHAR(45) NULL DEFAULT 'active'active, inactive, archived
purchase_valueJSON NULLPurchase value data
purchase_countBIGINT UNSIGNED NOT NULL DEFAULT '0'Total number of purchases
ltvBIGINT NOT NULL DEFAULT '0'Lifetime value in cents
first_purchase_dateDATETIME NULLFirst purchase date
last_purchase_dateDATETIME NULLLast purchase date
aovDECIMAL(18,2) NULLAverage order value
notesLONGTEXT NOT NULLCustomer notes
uuidVARCHAR(100) NULL DEFAULT ''Unique identifier
countryVARCHAR(45) NULLCountry
cityVARCHAR(45) NULLCity
stateVARCHAR(45) NULLState
postcodeVARCHAR(45) NULLPostal code
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • email
  • user_id

fct_orders Table ​

This table stores the basic information of an order

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
statusVARCHAR(20) NOT NULL DEFAULT 'draft'draft / pending / on-hold / processing / completed / failed / refunded / partial-refund
parent_idBIGINT UNSIGNED NULLParent order
receipt_numberBIGINT UNSIGNED NULL
invoice_noVARCHAR(192) NULL DEFAULT ''
fulfillment_typeVARCHAR(20) NULL DEFAULT 'physical'physical, digital, service, mixed
typeVARCHAR(20) NOT NULL DEFAULT 'payment'payment, renewal, refund
modeENUM('live', 'test') NOT NULL DEFAULT 'live'live / test
shipping_statusVARCHAR(20) NOT NULL DEFAULT ''unshipped / shipped / delivered / unshippable
customer_idBIGINT UNSIGNED NULL
payment_methodVARCHAR(100) NOT NULL
payment_statusVARCHAR(20) NOT NULL DEFAULT ''
payment_method_titleVARCHAR(100) NOT NULL
currencyVARCHAR(10) NOT NULL
subtotalBIGINT NOT NULL DEFAULT '0'Amount in cents
discount_taxBIGINT NOT NULL DEFAULT '0'Amount in cents
manual_discount_totalBIGINT NOT NULL DEFAULT '0'Amount in cents
coupon_discount_totalBIGINT NOT NULL DEFAULT '0'Amount in cents
shipping_taxBIGINT NOT NULL DEFAULT '0'Amount in cents
shipping_totalBIGINT NOT NULL DEFAULT '0'Amount in cents
fee_totalBIGINT NOT NULL DEFAULT '0'Amount in cents
tax_totalBIGINT NOT NULL DEFAULT '0'Amount in cents
total_amountBIGINT NOT NULL DEFAULT '0'Amount in cents
total_paidBIGINT NOT NULL DEFAULT '0'Amount in cents
total_refundBIGINT NOT NULL DEFAULT '0'Amount in cents
rateDECIMAL(24,12) NOT NULL DEFAULT '1.000000000000'Base to presentment exchange rate, frozen at order time
tax_behaviorTINYINT(1) NOT NULL DEFAULT 00 => no_tax, 1 => exclusive, 2 => inclusive
noteTEXT NOT NULL DEFAULT ''
ip_addressTEXT NOT NULL DEFAULT ''
completed_atDATETIME NULL DEFAULT NULL
refunded_atDATETIME NULL DEFAULT NULL
uuidVARCHAR(100) NOT NULL
configJSON DEFAULT NULL
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • invoice_no (191)
  • type
  • customer_id
  • created_at, completed_at

fct_coupons Table ​

This table stores coupon definitions and rules

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
titleVARCHAR(200) NOT NULLCoupon title
codeVARCHAR(50) NOT NULL UNIQUECoupon code (unique)
priorityINT DEFAULT NULLCoupon priority
typeVARCHAR(20) NOT NULLCoupon type
conditionsJSON NULLCoupon conditions
amountdouble NOT NULLDiscount amount
use_countINT DEFAULT 0Usage count
statusVARCHAR(20) NOT NULLCoupon status
notesLONGTEXT NOT NULLCoupon notes
stackableVARCHAR(3) NOT NULL DEFAULT 'no'Stackable flag (yes/no)
show_on_checkoutVARCHAR(3) NOT NULL DEFAULT 'yes'Show on checkout (yes/no)
start_dateTIMESTAMP NULLStart date
end_dateTIMESTAMP NULLEnd date
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • code
  • status

fct_order_items Table ​

This table stores individual items within orders

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
order_idBIGINT UNSIGNED NOT NULL DEFAULT '0'Reference to order
post_idBIGINT UNSIGNED NOT NULL DEFAULT '0'WordPress post ID (product)
fulfillment_typeVARCHAR(20) NOT NULL DEFAULT 'physical'physical, digital, service
payment_typeVARCHAR(20) NOT NULL DEFAULT 'onetime'onetime, subscription, signup_fee
post_titleTEXT NOT NULLProduct title
titleTEXT NOT NULLItem title (variation)
object_idBIGINT UNSIGNED NULL DEFAULT NULLVariation ID
cart_indexBIGINT UNSIGNED NOT NULL DEFAULT '0'Position in cart
quantityINT NOT NULL DEFAULT '1'Item quantity
unit_priceBIGINT NOT NULL DEFAULT '0'Price per unit in cents
costBIGINT NOT NULL DEFAULT '0'Cost in cents
subtotalBIGINT NOT NULL DEFAULT '0'Line subtotal
tax_amountBIGINT NOT NULL DEFAULT '0'Tax amount for this line
shipping_chargeBIGINT NOT NULL DEFAULT '0'Shipping charge
discount_totalBIGINT NOT NULL DEFAULT '0'Discount amount
line_totalBIGINT NOT NULL DEFAULT '0'Total line amount
refund_totalBIGINT NOT NULL DEFAULT '0'Refunded amount
rateBIGINT NOT NULL DEFAULT '1'Exchange rate
other_infoJSON NULLAdditional item data
line_metaJSON NULLLine-specific metadata
fulfilled_quantityINT NOT NULL DEFAULT '0'Quantity fulfilled
referrerTEXT NULLReferral information
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • order_id, object_id
  • post_id

fct_subscriptions Table ​

This table stores subscription information and billing cycles

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
uuidVARCHAR(100) NOT NULLUnique identifier
customer_idBIGINT(20) UNSIGNED NOT NULLReference to customer
parent_order_idBIGINT(20) UNSIGNED NOT NULLInitial order ID
product_idBIGINT(20) UNSIGNED NOT NULLWordPress post ID
item_nameTEXT NOT NULLSubscription item name
quantityINT NOT NULL DEFAULT '1'Subscription quantity
variation_idBIGINT(20) UNSIGNED NOT NULLProduct variation ID
billing_intervalVARCHAR(45) NULLBilling interval (day, week, month, year)
signup_feeBIGINT UNSIGNED NOT NULL DEFAULT 0Signup fee in cents
initial_tax_totalBIGINT UNSIGNED NOT NULL DEFAULT 0Initial tax in cents
recurring_amountBIGINT UNSIGNED NOT NULL DEFAULT 0Recurring amount in cents
recurring_tax_totalBIGINT UNSIGNED NOT NULL DEFAULT 0Recurring tax in cents
recurring_totalBIGINT UNSIGNED NOT NULL DEFAULT 0Total recurring in cents
bill_timesBIGINT(20) UNSIGNED NOT NULL DEFAULT 0Total billing cycles
bill_countINT UNSIGNED NOT NULL DEFAULT 0Current billing count
expire_atDATETIME NULLExpiration date
trial_ends_atDATETIME NULLTrial end date
canceled_atDATETIME NULLCancellation date
restored_atDATETIME NULLRestoration date
collection_methodENUM('automatic', 'manual', 'system') NOT NULL DEFAULT 'automatic'Payment collection method
next_billing_dateDATETIME NULLNext billing date
trial_daysINT(10) UNSIGNED NOT NULL DEFAULT 0Trial period in days
vendor_customer_idVARCHAR(45) NULLPayment gateway customer ID
vendor_plan_idVARCHAR(45) NULLPayment gateway plan ID
vendor_subscription_idVARCHAR(45) NULLPayment gateway subscription ID
statusVARCHAR(45) NULLactive, canceled, expired, pending, trialing
original_planLONGTEXT NULLOriginal plan data
vendor_responseLONGTEXT NULLPayment gateway response
current_payment_methodVARCHAR(45) NULLCurrent payment method
configJSON DEFAULT NULLSubscription configuration
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • parent_order_id

fct_order_transactions Table ​

This table stores payment transactions for orders

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
order_idBIGINT UNSIGNED NOT NULL DEFAULT '0'Reference to order
order_typeVARCHAR(100) NOT NULL DEFAULT ''
transaction_typeVARCHAR(192) DEFAULT 'charge'charge, refund, etc.
subscription_idINT(11) NULLReference to subscription
card_last_4VARCHAR(4) NULLLast 4 digits of card
card_brandVARCHAR(100)Card brand
vendor_charge_idVARCHAR(192) NOT NULL DEFAULT ''Payment gateway transaction ID
payment_methodVARCHAR(100) NOT NULL DEFAULT ''
payment_modeVARCHAR(100) NOT NULL DEFAULT ''live, test
payment_method_typeVARCHAR(100) NOT NULL DEFAULT ''card, bank, etc.
statusVARCHAR(20) NOT NULL DEFAULT ''Transaction status
currencyVARCHAR(10) NOT NULL DEFAULT ''Transaction currency
totalBIGINT NOT NULL DEFAULT '0'Transaction amount in cents
rateDECIMAL(24,12)Exchange rate
uuidVARCHAR(100) NULL DEFAULT ''
metaJSON DEFAULT NULLTransaction metadata
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • vendor_charge_id (64)
  • payment_method
  • status
  • order_id

fct_order_addresses Table ​

This table stores order shipping and billing addresses

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
order_idBIGINT UNSIGNED NOT NULLReference to order
typeVARCHAR(20) NOT NULL DEFAULT 'billing'billing, shipping
nameVARCHAR(192) NULLAddress name
address_1VARCHAR(192) NULLAddress line 1
address_2VARCHAR(192) NULLAddress line 2
cityVARCHAR(192) NULLCity
stateVARCHAR(192) NULLState
postcodeVARCHAR(50) NULLPostal code
countryVARCHAR(100) NULLCountry
metaJSON NULLVAT number, legal registration ID and other extras
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • (order_id, type)

fct_order_operations Table ​

This table stores order operation logs and analytics

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
order_idBIGINT(20) UNSIGNED NOT NULLReference to order
created_viaVARCHAR(45) NULLHow the order was created
emails_sentTINYINT(1) NULL DEFAULT 0Emails sent flag
sales_recordedTINYINT(1) NULL DEFAULT 0Sales recorded flag
utm_campaignVARCHAR(192) NULL DEFAULT ''UTM campaign tracking
utm_termVARCHAR(192) NULL DEFAULT ''UTM term tracking
utm_sourceVARCHAR(192) NULL DEFAULT ''UTM source tracking
utm_mediumVARCHAR(192) NULL DEFAULT ''UTM medium tracking
utm_contentVARCHAR(192) NULL DEFAULT ''UTM content tracking
utm_idVARCHAR(192) NULL DEFAULT ''UTM ID tracking
cart_hashVARCHAR(192) NULL DEFAULT ''Cart hash identifier
refer_urlVARCHAR(192) NULL DEFAULT ''Referral URL
metaJSON DEFAULT NULLAdditional operation metadata
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • order_id

fct_order_download_permissions Table ​

This table stores download permissions for orders

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
order_idBIGINT(20) UNSIGNED NOT NULLReference to order
variation_idBIGINT(20) UNSIGNED NOT NULLReference to product variation
download_idBIGINT(20) UNSIGNED NOT NULLReference to download
download_countINT(11) NULLNumber of downloads
download_limitINT(11) NULLDownload limit
access_expiresDATETIME NULLAccess expiration date
customer_idBIGINT(20) UNSIGNED NOT NULLReference to customer
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • order_id
  • download_id
  • variation_id

fct_product_variations Table ​

This table stores product variations with pricing and inventory

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
post_idBIGINT(20) UNSIGNED NOT NULLWordPress post ID
media_idBIGINT(20) UNSIGNED NULLMedia attachment ID
serial_indexINT(5) NULLVariation order
sold_individuallyTINYINT(1) UNSIGNED NULL DEFAULT 0Sold individually flag
variation_titleVARCHAR(192) NOT NULLVariation title
variation_identifierVARCHAR(100) NULLLegacy identifier
skuVARCHAR(30) NULLStock keeping unit, unique across variations
manage_stockTINYINT(1) NULL DEFAULT 0Stock management enabled
payment_typeVARCHAR(50) NULLonetime, subscription
stock_statusVARCHAR(30) NULL DEFAULT 'out-of-stock'in-stock, out-of-stock, backorder
backordersTINYINT(1) UNSIGNED NULL DEFAULT 0Backorders allowed
total_stockINT(11) NULL DEFAULT 0Total stock quantity
on_holdINT(11) NULL DEFAULT 0Stock on hold
committedINT(11) NULL DEFAULT 0Committed stock
availableINT(11) NULL DEFAULT 0Available stock
fulfillment_typeVARCHAR(100) NULL DEFAULT 'physical'physical, digital, service, mixed
item_statusVARCHAR(30) NULL DEFAULT 'active'active, inactive
manage_costVARCHAR(30) NULL DEFAULT 'false'Cost management enabled
item_pricedouble DEFAULT 0 NOT NULLVariation price
item_costdouble DEFAULT 0 NOT NULLVariation cost
compare_pricedouble DEFAULT 0 NULLCompare at price
shipping_classBIGINT(20) NULLShipping class ID
other_infolongtext NULLAdditional variation data
downloadableVARCHAR(30) NULL DEFAULT 'false'Downloadable flag
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • post_id
  • stock_status

fct_product_details Table ​

This table stores product configuration and settings

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
post_idBIGINT(20) UNSIGNED NOT NULLWordPress post ID
fulfillment_typeVARCHAR(100) NULL DEFAULT 'physical'physical, digital, service, mixed
min_pricedouble DEFAULT 0 NOT NULLMinimum price
max_pricedouble DEFAULT 0 NOT NULLMaximum price
default_variation_idBIGINT(20) UNSIGNED NULLDefault variation ID
default_mediaJSON NULLDefault media data
manage_stockTINYINT(1) NULL DEFAULT 0Stock management enabled
stock_availabilityVARCHAR(100) NULL DEFAULT 'in-stock'in-stock, out-of-stock, backorder
variation_typeVARCHAR(30) NULL DEFAULT 'simple'simple, simple_variation, advance_variation
manage_downloadableTINYINT(1) NULL DEFAULT 0Downloadable management enabled
other_infoJSON NULLAdditional product data
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • post_id
  • stock_availability

fct_product_meta Table ​

This table stores product metadata

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
object_idBIGINT UNSIGNED NOT NULLReference to product
object_typeVARCHAR(192) NULLObject type
meta_keyVARCHAR(192) NOT NULLMeta key
meta_valueLONGTEXT NULL DEFAULT NULLMeta value
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • meta_key

fct_applied_coupons Table ​

This table stores applied coupons to orders

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
order_idBIGINT UNSIGNED NOT NULLReference to order
coupon_idBIGINT UNSIGNED NULLReference to coupon
codeVARCHAR(100) NOT NULLCoupon code
amountdouble NOT NULLDiscount amount
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • code
  • (coupon_id, order_id) — per-customer usage counting joins through these

fct_customer_addresses Table ​

This table stores customer shipping and billing addresses

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
customer_idBIGINT UNSIGNED NOT NULLReference to customer
is_primaryTINYINT(1) NOT NULL DEFAULT 0Primary address flag
typeVARCHAR(20) NOT NULL DEFAULT 'billing'billing, shipping
statusVARCHAR(20) NOT NULL DEFAULT 'active'active, inactive
labelVARCHAR(50) NOT NULL DEFAULT ''Address label
nameVARCHAR(192) NULLAddress name
address_1VARCHAR(192) NULLAddress line 1
address_2VARCHAR(192) NULLAddress line 2
cityVARCHAR(192) NULLCity
stateVARCHAR(192) NULLState
phoneVARCHAR(192) NULLPhone number
emailVARCHAR(192) NULLEmail address
postcodeVARCHAR(32) NULLPostal code
countryVARCHAR(100) NULLCountry
metaJSON NULLVAT number, legal registration ID and other extras
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • customer_id, is_primary
  • type
  • status

fct_customer_meta Table ​

This table stores customer metadata

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
customer_idBIGINT UNSIGNED NULL DEFAULT NULLReference to customer
meta_keyVARCHAR(192) NULL DEFAULT NULLMeta key
meta_valueLONGTEXT NULL DEFAULT NULLMeta value
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • meta_key
  • customer_id

fct_carts Table ​

This table stores shopping cart data

ColumnTypeComment
customer_idBIGINT(20) UNSIGNED NULLReference to customer
user_idBIGINT(20) UNSIGNED NULLReference to WordPress user
order_idBIGINT(20) UNSIGNED NULLReference to order
cart_hashVARCHAR(192) NOT NULL UNIQUEUnique cart identifier
checkout_dataLONGTEXT NULLCheckout form data
cart_dataLONGTEXT NULLCart contents
utm_dataLONGTEXT NULLUTM tracking data
couponsLONGTEXT NULLApplied coupons
first_nameVARCHAR(192) NULLCustomer first name
last_nameVARCHAR(192) NULLCustomer last name
emailVARCHAR(192) NULLCustomer email
stageVARCHAR(30) NULL DEFAULT 'draft'draft, pending, in-complete, completed
cart_groupVARCHAR(30) NULL DEFAULT 'global'Cart group
user_agentVARCHAR(192) NULLUser agent string
ip_addressVARCHAR(50) NULLIP address
completed_atTIMESTAMP NULLCompletion timestamp
created_atDATETIME NULL
updated_atDATETIME NULL
deleted_atTIMESTAMP NULLSoft delete timestamp

fct_product_downloads Table ​

This table stores downloadable product files

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
post_idBIGINT(20) UNSIGNED NOT NULLWordPress post ID
product_variation_idlongtext NOT NULLProduct variation ID
download_identifierVARCHAR(100) NOT NULL UNIQUEUnique download identifier
titleVARCHAR(192) NULLDownload title
typeVARCHAR(100) NULLDownload type
driverVARCHAR(100) NULL DEFAULT 'local'Storage driver
file_nameVARCHAR(192) NULLFile name
file_pathTEXT NULLFile path
file_urlTEXT NULLFile URL
file_sizeTEXT NULLFile size
settingsTEXT NULLDownload settings
serialINT NULLSerial number
created_atDATETIME NULL
updated_atDATETIME NULL

fct_subscription_meta Table ​

This table stores subscription metadata

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
subscription_idBIGINT UNSIGNED NULL DEFAULT NULLReference to subscription
meta_keyVARCHAR(192) NULL DEFAULT NULLMeta key
meta_valueLONGTEXT NULL DEFAULT NULLMeta value
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • subscription_id
  • meta_key

fct_activity Table ​

This table stores system activity and audit logs

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
statusVARCHAR(20) NOT NULL DEFAULT 'info'success / warning / failed / info
log_typeVARCHAR(20) NOT NULL DEFAULT 'activity'activity, api
module_typeVARCHAR(100) NOT NULL DEFAULT 'order'Full model path
module_idBIGINT NULLRelated record ID
module_nameVARCHAR(192) NOT NULL DEFAULT 'order'order, product, user, coupon, subscription, payment, refund, shipment, activity
user_idBIGINT UNSIGNED NULLUser who performed action
titleVARCHAR(192) NULLActivity title
contentLONGTEXT NULLActivity description
read_statusVARCHAR(20) NOT NULL DEFAULT 'unread'read, unread
created_byVARCHAR(100) NOT NULL DEFAULT 'FCT-BOT'Creator identifier
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • module_id

fct_shipping_zones Table ​

This table stores shipping zones configuration

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
shipping_class_idBIGINT UNSIGNED NULLScopes the zone to one shipping class; NULL means it applies to class-less items
nameVARCHAR(192) NOT NULLZone name
regionVARCHAR(192) NOT NULLA country code, all (Whole World) or selection
metaJSON NULLFor selection zones: countries and selection_type (included / excluded)
orderINT UNSIGNED NOT NULL DEFAULT 0Display order
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • order
  • shipping_class_id

fct_shipping_methods Table ​

This table stores shipping methods within zones

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
zone_idBIGINT UNSIGNED NOT NULLReference to shipping zone
titleVARCHAR(192) NOT NULLMethod title
typeVARCHAR(50) NOT NULLMethod type
settingsLONGTEXT NULLMethod settings: configure_rate, class_aggregation, weight_tiers
is_enabledTINYINT(1) NOT NULL DEFAULT 1Enabled flag
statesJSON NULLRestricts the method to these states within the zone
amountDECIMAL(10,2) NULL DEFAULT 0.00Base rate in base-currency major units, not cents (a percentage when configure_rate is per_price)
orderINT UNSIGNED NOT NULL DEFAULT 0Display order
metaJSON NULL
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • zone_id
  • order

fct_shipping_classes Table ​

This table stores shipping classes

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
nameVARCHAR(192) NOT NULLClass name
descriptionVARCHAR(500) NULLClass description
costDECIMAL(10,2) NOT NULL DEFAULT 0.00Surcharge in base-currency major units, not cents
per_itemTINYINT(1) NOT NULL DEFAULT 0Per item flag
typeVARCHAR(20) NOT NULL DEFAULT 'fixed'Class type
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • name

fct_tax_classes Table ​

This table stores tax class definitions

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
titleVARCHAR(192) NULLTax class title
slugVARCHAR(100) NULLTax class slug
descriptionLONGTEXT NULLTax class description
metaJSON DEFAULT NULLTax class metadata
created_atDATETIME NULL
updated_atDATETIME NULL

fct_tax_rates Table ​

This table stores tax rate configurations

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
class_idBIGINT UNSIGNED NOT NULLTax class ID
countryVARCHAR(45) NULLCountry code
stateVARCHAR(45) NULLState code
postcodeTEXT NULLPostal code (supports ranges)
cityVARCHAR(45) NULLCity
rateVARCHAR(45) NULLTax rate
nameVARCHAR(45) NULLTax name
groupVARCHAR(45) NULLTax group
priorityINT UNSIGNED NULL DEFAULT 1Priority
is_compoundTINYINT UNSIGNED NULL DEFAULT 0Compound tax flag
for_shippingDECIMAL(10,2) NULL DEFAULT NULLShipping-tax rate override percentage (NULL = inherit base rate; 0 = no shipping tax)
for_orderTINYINT UNSIGNED NULL DEFAULT 0Apply to order

Indexes:

  • class_id
  • priority

fct_meta Table ​

This table stores generic metadata for various objects

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
object_typeVARCHAR(50) NOT NULLObject type
object_idBIGINT NULLObject ID
meta_keyVARCHAR(192) NOT NULLMeta key
meta_valueLONGTEXT NULLMeta value
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • object_type
  • object_id

fct_label Table ​

This table stores labels for tagging objects

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
valueVARCHAR(192) NOT NULL UNIQUELabel value (unique)
created_atDATETIME NULL
updated_atDATETIME NULL

fct_order_meta Table ​

This table stores order metadata

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
order_idBIGINT(20) NULLReference to order
meta_keyVARCHAR(192) NOT NULLMeta key
meta_valueLONGTEXT NULLMeta value
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • order_id

fct_order_tax_rate Table ​

This table stores order tax rate information

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
order_idBIGINT(20) UNSIGNED NOT NULLReference to order
tax_rate_idBIGINT(20) NOT NULLReference to tax rate (signed; virtual EU VAT rates use negative IDs)
shipping_taxBIGINT NULLShipping tax amount
order_taxBIGINT NULLOrder tax amount
total_taxBIGINT NULLTotal tax amount
metaJSON DEFAULT NULLTax meta data
filed_atDATETIME NULLFiled at
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • (order_id, tax_rate_id) (unique)

fct_webhook_logger Table ​

This table stores webhook delivery logs and status

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
sourceVARCHAR(20) NOT NULLWebhook source
event_typeVARCHAR(100) NOT NULLEvent type
payloadLONGTEXT NULLWebhook payload
statusVARCHAR(20) NOT NULL DEFAULT 'pending'pending, sent, failed
created_atDATETIME NULL
updated_atDATETIME NULL

fct_scheduled_actions Table ​

This table stores background job scheduling and execution

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
scheduled_atDATETIME NULLWhen to run the action
actionVARCHAR(192) NULLAction to perform
statusVARCHAR(20) NULLpending, processing, completed, failed
groupVARCHAR(100) NULLorder, subscription
object_idBIGINT UNSIGNED NULL DEFAULT NULLRelated object ID
object_typeVARCHAR(100) NULL DEFAULT NULLObject type
completed_atTIMESTAMP NULLWhen action was completed
retry_countINT UNSIGNED DEFAULT 0Number of retries
dataJSON NULLAction data
created_atDATETIME NULL
updated_atDATETIME NULL
response_noteLONGTEXT NULLResponse or error message

Indexes:

  • scheduled_at
  • status

fct_atts_groups Table ​

This table stores attribute groups for product attributes

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
titleVARCHAR(192) NOT NULLGroup title
slugVARCHAR(192) NOT NULL UNIQUEGroup slug
descriptionLONGTEXT NULLGroup description
settingsLONGTEXT NULLGroup settings
serialINT(11) UNSIGNED NOT NULL DEFAULT 0Manual drag-order of groups in the admin
is_systemTINYINT(1) NOT NULL DEFAULT 0Marks a group FluentCart created itself
created_atDATETIME NULL
updated_atDATETIME NULL

fct_atts_terms Table ​

This table stores attribute terms within groups

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
group_idBIGINT(20) UNSIGNEDReference to attribute group
serialINT(11) UNSIGNEDTerm order
titleVARCHAR(192) NOT NULLTerm title
slugVARCHAR(192) NOT NULLTerm slug
descriptionLONGTEXT NULLTerm description
settingsLONGTEXT NULLTerm settings
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • group_id

fct_atts_relations Table ​

This table stores relationships between attributes and objects

ColumnTypeComment
idBIGINT(20) UNSIGNED Auto IncrementPrimary key
group_idBIGINT(20) UNSIGNED NOT NULLReference to attribute group
term_idBIGINT(20) UNSIGNED NOT NULLReference to attribute term
object_idBIGINT(20) UNSIGNED NOT NULLRelated object ID
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • group_id
  • term_id
  • object_id

fct_label_relationships Table ​

This table stores polymorphic relationships between labels and objects

ColumnTypeComment
idBIGINT UNSIGNED Auto IncrementPrimary key
label_idBIGINT(20) NOT NULLReference to label
labelable_idBIGINT(20) NOT NULLRelated object ID
labelable_typeVARCHAR(192) NOT NULLObject type
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • label_id
  • labelable_id

Pro Plugin Tables ​

fct_licenses Table ​

Software licences issued for a purchase (Pro).

ColumnTypeComment
idBIGINT UNSIGNED Auto Increment
statusVARCHAR(45) NULL DEFAULT 'active'active, inactive, expired, disabled
limitBIGINT(20) UNSIGNED NOT NULL DEFAULT 0Activation limit
activation_countBIGINT(20) UNSIGNED NOT NULL DEFAULT 0Current activations
license_keyVARCHAR(192) NULLLicence key
product_idBIGINT(20) UNSIGNED NOT NULLWordPress post ID of the product
variation_idBIGINT(20) UNSIGNED NOT NULLVariation the licence was issued for
order_idBIGINT(20) UNSIGNED NOT NULLOrder the licence came from
parent_idBIGINT(20) UNSIGNED NULLParent licence, for upgrades and renewals
customer_idBIGINT(20) UNSIGNED NOT NULLLicence owner
expiration_dateDATETIME NULLNULL means lifetime
last_reminder_sentDATETIME NULLWhen the last expiry reminder went out
last_reminder_typeVARCHAR(50) NULLWhich reminder stage was sent
subscription_idBIGINT(20) UNSIGNED NOT NULL DEFAULT 0Linked subscription, 0 when none
configjson NULLExtra licence configuration
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Indexes:

  • order_id
  • license_key
  • product_id
  • customer_id (idx_licenses_customer_recovery)

fct_license_activations Table ​

One row per site a licence is activated on (Pro). This table carries both license_id and site_id, so it is the join between licences and sites.

ColumnTypeComment
idBIGINT UNSIGNED Auto Increment
site_idBIGINT(20) UNSIGNED NOT NULLReference to fct_license_sites
license_idBIGINT(20) UNSIGNED NOT NULLReference to fct_licenses
statusVARCHAR(45) NULL DEFAULT 'active'Activation status
is_localTINYINT NULL DEFAULT 0Local or staging install
product_idBIGINT(20) UNSIGNED NOT NULLProduct
variation_idBIGINT(20) UNSIGNED NOT NULLVariation
activation_methodVARCHAR(45) NULL DEFAULT 'key_based'How the site activated
activation_hashVARCHAR(99) NULLActivation hash
last_update_versionVARCHAR(45) NULLVersion at the last update check
last_update_dateDATETIME NULLLast update check
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Indexes:

  • license_id
  • site_id

fct_license_sites Table ​

The sites themselves (Pro). Join through fct_license_activations to reach a licence's sites.

ColumnTypeComment
idBIGINT UNSIGNED Auto Increment
site_urlVARCHAR(192) NULLSite URL
server_versionVARCHAR(50) NULLServer software version
platform_versionVARCHAR(50) NULLWordPress version
otherJSON NULLAdditional site data
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Indexes:

  • site_url

fct_license_meta Table ​

This table stores license metadata (Pro feature)

ColumnTypeComment
idBIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY
object_idBIGINT UNSIGNED NULL DEFAULT NULLReference to object (license/activation/site)
object_typeVARCHAR(100) NULL DEFAULT NULLCan be: license / activation / site
meta_keyVARCHAR(255) NULL DEFAULT NULLMeta key
meta_valueLONGTEXT NULL DEFAULT NULLMeta value (JSON or string)
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Indexes:

  • meta_key
  • object_type
  • object_id

fct_order_promotions Table ​

This table stores order promotion data (Pro feature)

ColumnTypeComment
idBIGINT(20) UNSIGNED AUTO_INCREMENT, PRIMARY KEY
hashVARCHAR(100) NOT NULL
parent_idBIGINT(20) UNSIGNED NULL
typeVARCHAR(50) NOT NULL
statusVARCHAR(50) NOT NULL DEFAULT 'draft'
src_object_idBIGINT(20) UNSIGNED NULL
src_object_typeVARCHAR(50) DEFAULT NULL
titleVARCHAR(194) DEFAULT NULL
descriptionTEXT DEFAULT NULL
conditionsJSON DEFAULT NULL
configJSON DEFAULT NULL
priorityINT NOT NULL DEFAULT 1
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • (type, status, src_object_id, src_object_type)

fct_order_promotion_stats Table ​

This table stores promotion statistics (Pro feature)

ColumnTypeComment
idBIGINT(20) UNSIGNED AUTO_INCREMENT, PRIMARY KEY
promotion_idBIGINT(20) UNSIGNED NOT NULL
order_idBIGINT(20) UNSIGNED NOT NULL
object_idBIGINT(20) UNSIGNED NOT NULL
amountBIGINT NOT NULL DEFAULT '0'
statusVARCHAR(50) NOT NULL DEFAULT 'offered'
created_atDATETIME NULL
updated_atDATETIME NULL

Indexes:

  • (promotion_id, object_id, order_id)

FluentCart developer documentation