Skip to content
View as Markdown

FluentCRM Database Schema ​

FluentCRM Core Advanced

FluentCRM uses custom database tables to store all CRM data. This page lists each table and its columns so you can see the overall database design and the data attributes of each model.

Table prefix

Every table name below is shown without the WordPress prefix. On a default install fc_subscribers is stored as wp_fc_subscribers; use $wpdb->prefix in code.

Schema Design ​

Each line is a *_id column pointing at the table it references. Use the buttons to zoom, drag to pan, or open the diagram full screen.

Contacts ​

fc_subscriber_pivot is shared by lists and tags and is told apart by object_type.

100%Drag to pan · Ctrl/⌘ + scroll to zoom

Campaigns ​

100%Drag to pan · Ctrl/⌘ + scroll to zoom

Automations ​

100%Drag to pan · Ctrl/⌘ + scroll to zoom

FluentCRM Core Tables ​

fc_subscribers ​

A contact (subscriber). Central table that most other tables reference through subscriber_id.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
user_idbigint unsignedYESNULL
hashvarchar(90)YESNULL
contact_ownerbigint unsignedYESNULL
company_idbigint unsignedYESNULL
prefixvarchar(192)YESNULL
first_namevarchar(192)YESNULL
last_namevarchar(192)YESNULL
emailvarchar(190)NO—
timezonevarchar(192)YESNULL
address_line_1varchar(192)YESNULL
address_line_2varchar(192)YESNULL
postal_codevarchar(192)YESNULL
cityvarchar(192)YESNULL
statevarchar(192)YESNULL
countryvarchar(192)YESNULL
ipvarchar(40)YESNULL
latitudedecimal(10,8)YESNULL
longitudedecimal(10,8)YESNULL
total_pointsint unsignedNO0
life_time_valueint unsignedNO0
phonevarchar(50)YESNULL
statusvarchar(50)NOsubscribed
contact_typevarchar(50)YESlead
sourcevarchar(50)YESNULL
avatarvarchar(192)YESNULL
date_of_birthdateYESNULL
created_attimestampYESNULL
last_activitytimestampYESNULL
updated_attimestampYESNULL

fc_tags ​

Tags that can be attached to contacts. Assignments are stored in fc_subscriber_pivot with object_type = FluentCrm\App\Models\Tag.

ColumnTypeNullDefaultExtra
idint unsignedNO—auto_increment
titlevarchar(192)NO—
slugvarchar(192)NO—
descriptiontinytextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_lists ​

Lists that can be attached to contacts. Assignments are stored in fc_subscriber_pivot with object_type = FluentCrm\App\Models\Lists.

ColumnTypeNullDefaultExtra
idint unsignedNO—auto_increment
titlevarchar(192)NO—
slugvarchar(192)NO—
descriptiontinytextYESNULL
is_publictinyint(1)YES0
created_attimestampYESNULL
updated_attimestampYESNULL

fc_subscriber_pivot ​

Pivot table linking contacts to lists and tags. Always filter on object_type.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
object_idbigint unsignedNO—
object_typevarchar(50)NO—
statusvarchar(50)YESNULL
is_publictinyint(1)NO1
created_attimestampYESNULL
updated_attimestampYESNULL

fc_subscriber_meta ​

Key/value meta for contacts, including custom field values.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
created_bybigint unsignedNO—
object_typevarchar(50)YESoption
keyvarchar(192)NO—
valuelongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_subscriber_notes ​

Notes and activity entries recorded on a contact. Always filter on type.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
parent_idbigint unsignedYESNULL
created_bybigint unsignedYESNULL
statusvarchar(50)YESopen
typevarchar(50)YESnote
is_privatetinyintYES1
titlevarchar(192)YESNULL
descriptionlongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_companies ​

Companies. The company module is disabled by default, so this table may not exist until it is enabled.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
hashvarchar(90)YESNULL
owner_idbigint unsignedYESNULL
namevarchar(192)YESNULL
industryvarchar(192)YESNULL
emailvarchar(190)YESNULL
timezonevarchar(192)YESNULL
address_line_1varchar(192)YESNULL
address_line_2varchar(192)YESNULL
postal_codevarchar(192)YESNULL
cityvarchar(192)YESNULL
statevarchar(192)YESNULL
countryvarchar(192)YESNULL
employees_numberint unsignedYES0
descriptionlongtextYESNULL
phonevarchar(50)YESNULL
typevarchar(50)YES``
logovarchar(192)YESNULL
websitevarchar(192)YESNULL
linkedin_urlvarchar(192)YESNULL
facebook_urlvarchar(192)YESNULL
twitter_urlvarchar(192)YESNULL
date_of_startdateYESNULL
metalongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_campaigns ​

Email campaigns, including recurring campaigns and email sequences.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
parent_idbigint unsignedYESNULL
typevarchar(50)NOcampaign
titlevarchar(192)NO—
available_urlstextYESNULL
slugvarchar(192)NO—
statusvarchar(50)NO—
template_idbigint unsignedYESNULL
email_subjectvarchar(192)YESNULL
email_pre_headervarchar(192)YESNULL
email_bodylongtextNO—
recipients_countintNO0
delayintYES0
utm_statustinyint(1)YES0
utm_sourcevarchar(192)YESNULL
utm_mediumvarchar(192)YESNULL
utm_campaignvarchar(192)YESNULL
utm_termvarchar(192)YESNULL
utm_contentvarchar(192)YESNULL
design_templatevarchar(192)YESNULL
scheduled_attimestampYESNULL
settingslongtextYESNULL
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_campaign_emails ​

One row per email queued or sent for a campaign or automation.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
campaign_idbigint unsignedYESNULL
email_typevarchar(50)YEScampaign
subscriber_idbigint unsignedYESNULL
email_subject_idbigint unsignedYESNULL
email_addressvarchar(192)NO—
email_subjectvarchar(192)YESNULL
email_bodylongtextYESNULL
email_headerstextYESNULL
is_opentinyint(1)NO0
is_parsedtinyint(1)NO0
click_counterintYESNULL
statusvarchar(50)NOdraft
notetextYESNULL
scheduled_attimestampYESNULL
email_hashvarchar(192)YESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_campaign_url_metrics ​

Click and open tracking per URL, campaign and contact.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
url_idbigint unsignedYESNULL
campaign_idbigint unsignedYESNULL
subscriber_idbigint unsignedYESNULL
typevarchar(50)YESclick
ip_addressvarchar(30)YESNULL
countryvarchar(40)YESNULL
cityvarchar(40)YESNULL
counterint unsignedNO1
created_attimestampYESNULL
updated_attimestampYESNULL

fc_url_stores ​

Short URL store used for click tracking.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
urltextNO—
shortvarchar(50)NO—
created_attimestampYESNULL
updated_attimestampYESNULL

fc_funnels ​

Automation funnels.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
typevarchar(50)NOfunnel
titlevarchar(192)NO—
trigger_namevarchar(150)YESNULL
statusvarchar(50)YESdraft
conditionstextYESNULL
settingstextYESNULL
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_funnel_sequences ​

Steps (actions, conditions and benchmarks) of an automation funnel.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
funnel_idbigint unsignedYESNULL
parent_idbigint unsignedYES0
action_namevarchar(192)YESNULL
condition_typevarchar(192)YESNULL
typevarchar(50)YESsequence
titlevarchar(192)YESNULL
descriptionvarchar(192)YESNULL
statusvarchar(50)YESdraft
conditionstextYESNULL
settingstextYESNULL
notetextYESNULL
delayint unsignedYESNULL
c_delayint unsignedYESNULL
sequenceint unsignedYESNULL
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_funnel_subscribers ​

Contacts enrolled in an automation funnel and their progress.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
funnel_idbigint unsignedYESNULL
starting_sequence_idbigint unsignedYESNULL
next_sequencebigint unsignedYESNULL
subscriber_idbigint unsignedYESNULL
last_sequence_idbigint unsignedYESNULL
next_sequence_idbigint unsignedYESNULL
last_sequence_statusvarchar(50)YESpending
statusvarchar(50)YESactive
typevarchar(50)YESfunnel
last_executed_timetimestampYESNULL
next_execution_timetimestampYESNULL
notestextYESNULL
source_trigger_namevarchar(192)YESNULL
source_ref_idbigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_funnel_metrics ​

Goal and benchmark metrics recorded for automation funnels.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
funnel_idbigint unsignedYESNULL
sequence_idbigint unsignedYESNULL
subscriber_idbigint unsignedYESNULL
benchmark_valuebigint unsignedYES0
benchmark_currencyvarchar(10)YESUSD
statusvarchar(50)YEScompleted
notestextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_event_tracking ​

Custom events tracked against a contact.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
counterint unsignedYES1
created_bybigint unsignedYESNULL
providervarchar(50)YEScustom
event_keyvarchar(192)NO—
titlevarchar(192)NO—
valuetextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_activity_logs ​

Audit trail of admin activity. Created lazily by the activity log migrator.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
object_typevarchar(192)NO—
object_idbigintYESNULL
actionvarchar(192)NO—
sourcevarchar(50)YESwp_admin
descriptiontextYESNULL
activity_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_terms ​

Generic taxonomy terms. Currently used for labels (taxonomy_name = global_label).

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
parent_idbigint unsignedYESNULL
taxonomy_namevarchar(50)NO—
slugvarchar(100)NO—
titletextYESNULL
positiondecimal(10,2)NO1.00
descriptionlongtextYESNULL
settingslongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_term_relations ​

Links taxonomy terms to objects.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
term_idbigint unsignedYESNULL
object_typevarchar(192)NO—
object_idbigintYESNULL
settingslongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_meta ​

CRM settings and shared meta. Always filter on object_type and key.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
object_typevarchar(50)NO—
object_idbigintYESNULL
keyvarchar(192)NO—
valuelongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

FluentCampaign Pro Tables ​

Pro These tables are created by FluentCampaign Pro and only exist when it is installed.

fc_sequence_tracker ​

Per-contact progress through an email sequence.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
campaign_idbigint unsignedYESNULL
last_sequence_idbigint unsignedYESNULL
subscriber_idbigint unsignedYESNULL
next_sequence_idbigint unsignedYESNULL
statusvarchar(50)YESactive
typevarchar(50)YESsequence_tracker
last_executed_timetimestampYESNULL
next_execution_timetimestampYESNULL
notestextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_contact_relations ​

Per-contact summary for each ecommerce or LMS provider that has been synced.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
providervarchar(100)NO—
provider_idbigint unsignedYESNULL
first_order_datetimestampYESNULL
last_order_datetimestampYESNULL
total_order_countintYES0
total_order_valuedecimal(10, 2)YES0
statusvarchar(100)YESNULL
commerce_taxonomieslongtextYESNULL
commerce_couponslongtextYESNULL
meta_col_1mediumtextYESNULL
meta_col_2mediumtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_contact_relation_items ​

Individual orders, products or enrollments behind a fc_contact_relations row.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
subscriber_idbigint unsignedNO—
relation_idbigint unsignedNO—
providervarchar(100)NO—
origin_idbigint unsignedYESNULL
item_idbigint unsignedNO—
item_sub_idbigint unsignedYESNULL
item_valuedecimal(10, 2)YESNULL
statusvarchar(100)YESNULL
item_typevarchar(100)YESNULL
meta_colmediumtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

Smart links and their click counters.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
titlevarchar(192)YESNULL
shortvarchar(192)YESNULL
target_urltextYESNULL
actionstextYESNULL
notestextYESNULL
contact_clicksintYES0
all_clicksintYES0
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_message_templates ​

Templates for the messaging channels (WhatsApp and SMS).

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
channelvarchar(20)NOwhatsapp
namevarchar(192)NO—
languagevarchar(20)NOen_US
categoryvarchar(50)YESNULL
statusvarchar(20)NOPENDING
header_textvarchar(255)YESNULL
body_texttextNO—
footer_textvarchar(255)YESNULL
buttonslongtextYESNULL
variableslongtextYESNULL
providervarchar(50)YESNULL
provider_template_idvarchar(192)YESNULL
rejection_reasontextYESNULL
last_synced_attimestampYESNULL
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_message_threads ​

Conversation threads, one per contact and channel.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
contact_idbigint unsignedYESNULL
channelvarchar(20)NOsms
phone_numbervarchar(20)NO—
statusvarchar(20)NOsubscribed
initiated_byvarchar(20)NOuser
last_seen_idbigint unsignedYESNULL
last_message_idbigint unsignedYESNULL
has_unreadtinyint(1)NO0
unread_countint unsignedNO0
metalongtextYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_messages ​

Individual messages inside a thread.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
thread_idbigint unsignedNO—
directionvarchar(20)NOoutbound
contenttextYESNULL
ref_idbigint unsignedYESNULL
ref_typevarchar(50)YESNULL
statusvarchar(50)NOpending
provider_message_idvarchar(100)YESNULL
scheduled_attimestampYESNULL
sent_attimestampYESNULL
metalongtextYESNULL
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL
activity_atdatetimeYESNULLSTORED GENERATED

fc_sms_campaigns ​

Messaging campaigns. Despite the name this table is still live: the MessageCampaign model stores campaigns for both channels here, with the channel kept on the row.

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
parent_idbigint unsignedYESNULL
typevarchar(50)NOcampaign
titlevarchar(192)NO—
slugvarchar(192)NO—
statusvarchar(50)NOdraft
message_contenttextNO—
sender_numbervarchar(20)YESNULL
recipients_countint unsignedNO0
sent_countint unsignedNO0
failed_countint unsignedNO0
delayint unsignedYES0
scheduled_attimestampYESNULL
settingslongtextYESNULL
channelvarchar(20)NOsms
created_bybigint unsignedYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL

fc_sms_messages ​

Legacy table

Since Messaging (3.2.0), new messages are written to fc_message_threads and fc_messages. This table is the source for the one-time, batched migration (GET/POST /messaging/migration) and is kept so history is not lost; the LegacyMessage model reads it. Do not write to it.

SMS messages sent for a campaign (legacy).

ColumnTypeNullDefaultExtra
idbigint unsignedNO—auto_increment
campaign_idbigint unsignedYESNULL
template_idbigint unsignedYESNULL
sms_typevarchar(50)YEScampaign
subscriber_idbigint unsignedYESNULL
mobile_numbervarchar(20)YESNULL
click_counterint unsignedYES0
message_contenttextYESNULL
statusvarchar(50)NOpending
delivery_statusvarchar(50)YESqueued
notestextYESNULL
provider_message_idvarchar(100)YESNULL
settingslongtextYESNULL
channelvarchar(20)NOsms
directionvarchar(20)NOoutbound
scheduled_attimestampYESNULL
sent_attimestampYESNULL
delivered_attimestampYESNULL
read_attimestampYESNULL
created_attimestampYESNULL
updated_attimestampYESNULL