How Mautic custom fields work and when teams need them
A marketing team asks for a new contact attribute, such as a preferred product line or a renewal date, and expects it to appear on the form the same afternoon. In Mautic that request is really a database change. Each custom field maps to a column in the contacts table (or the companies table for company fields), so creating a field means altering a table that may hold a very large number of rows. Before you let anyone add fields to a live instance, treat the field list as part of your data model, not as a form setting. Ask who owns each field, which segment, form or CRM mapping depends on it, and whether its name and type should change later, because renaming and retyping after load are the expensive steps.
Teams usually add fields for three reasons: to build segments and campaign conditions, to collect data through forms and landing pages, and to map values to a CRM such as HubSpot or Salesforce through the integration plugins. Each of these creates a dependency. A field used only in a form can be removed with little risk, while a field that feeds a CRM sync or a scoring rule affects other systems and reports. Plan the field list early by listing the attributes each team needs, marking which ones are required for segmentation and which are only nice to have, and agreeing on a naming convention. Also confirm with your platform team how much headroom the contacts table has, since the number of columns a table can hold is finite and the limit applies to all fields together. Your own contact model review should record the answer before the first create-column run.
Field creation options and when each fits
This table compares creating a custom field immediately in the UI against the background option with the column command, plus the VARCHAR optimization command added in Mautic 5.1. Read each row as a decision: when the option fits, what the platform owner does next, and where it tends to go wrong.
| Option | When it fits | What the admin does next | Main risk |
|---|---|---|---|
| Immediate creation in the UI | A small, quiet instance where a single new field is needed and a brief lock on the contacts table is acceptable | Confirm the field appears on the contact record and in segment filters, then test a form or import that uses it | On a busy instance, the request can time out or the table lock can stall contact activity while the column is added |
| Background creation with the column command | A busy instance where new fields are planned in batches and the team can wait for a scheduled run | Keep the field unpublished until the command runs, then confirm the column exists and publish the field | A field stays unusable until the command runs, so forms and campaigns that depend on it may fail or be delayed |
| Scheduled daily run of the column command | Teams that create fields during working hours and want column changes applied at a predictable low-traffic time | Schedule the command in cron for a quiet window and check the log after each run for fields that failed | Table locks still occur during the run, so the window must match real traffic patterns, which the admin should measure |
| Running the column command by hand | One-off fixes or urgent fields where the admin is watching the instance | Run it during a low-traffic period, then verify the column and publish the field | Manual runs are easy to forget or repeat at the wrong time, and they leave no schedule for the next batch |
| VARCHAR optimization command (Mautic 5.1 and later) | The contacts table is near its hard column limit and more fields are needed without a larger schema change | Review the field list first, then run the optimization in a quiet window and confirm new fields can be created | Changing column sizes is a schema change on the contacts table, so it should be tested on a copy of production first |
| Field design before any command runs | Every new field, regardless of creation method | Decide field types, lengths and whether a value belongs on contacts or companies, and remove unused fields | Unused or oversized fields consume the limited contacts table columns and make later changes harder |
Setting up background field creation without locking the table
This sequence turns on background column creation, adds fields in a staging copy, runs the column command during a quiet window and only then publishes each field to production users. Each step ends with a check so the team knows the table is ready before contacts depend on the field.
Confirm the Mautic version and back up the database
Before changing anything, the administrator confirms the running Mautic release, checks that it is on a supported release line, and takes a full database backup of the contacts and company tables. The person doing this should be the one who owns the database, because the later steps alter table structure. Done means the backup has been restored successfully to a separate test database or the team has confirmed the restore procedure with its database owner, and the installed version is recorded in the change ticket.
Enable the background creation option
The administrator sets the create_custom_field_in_background option in the Mautic configuration so that new fields are saved without immediately creating their database columns. Since Mautic 3.3, this setting leaves the new field unpublished until the column command runs, which avoids request timeouts in the admin interface. Check that the option is active by creating a test field in the staging copy and confirming that the field saves without an error message about the column.
Create the planned fields in a staging copy
The team builds a staging copy of production with the same Mautic release and a recent sanitized snapshot of the contacts table, then creates every planned contact and company field there in the admin interface. Keep field aliases, types and lengths identical to the design document so the production run matches what was tested. Done means each field appears in the custom field list with the unpublished status, and the team has written down the field names and types for the production change.
Check unpublished status before running the command
Before the column command runs, the administrator opens the custom field list in staging and in production and confirms that each new field is listed as unpublished. Any field that is already published has a column in the database or was created before the option was enabled, so it should not be part of this run. Record the list of unpublished fields in the change ticket; this list is the expected input for the next step and the baseline for verification.
Run the column command once at low traffic
The operator runs the mautic:custom-field:create-column command once, from the Mautic installation directory, during a window the team has chosen as low traffic. Mautic advises running it once daily when traffic is low because the command takes table locks while it creates columns. The team monitors database locks and error logs while it runs, and it does not schedule the command to repeat on a short interval. Done means the command output reports no errors for each field and the process has exited.
Verify that each column exists
The database owner checks the contacts and companies tables and confirms that a column exists for each field recorded in the previous step, with the expected type and length. The team also reviews the Mautic logs and runs a test form submission or contact edit in staging to confirm that reads and writes work. If a column is missing, the field stays unpublished and the team investigates the command output before any further change.
Publish the field and confirm it in use
Once the column is verified, an administrator publishes each field in the custom field list so it appears on contact forms and in segment filters. The team then loads a test contact in production, edits the new field, and confirms the value saves and appears in a segment filter. Done means every planned field is published, the verification results and command output are attached to the change record, and the scheduled daily run is documented for any future fields.
What happens when the contacts table reaches its hard limit
The contacts table in Mautic can only hold a fixed number of columns, and every custom field you create adds one. When the table reaches that hard limit, Mautic cannot create further contact fields until space is freed up. Since Mautic 5.1, a command analyzes existing custom fields and optimizes the VARCHAR sizes of the columns behind them, so more fields fit without removing any. Run the analysis against a copy of production first and review what it proposes, because the command changes column definitions on a table that marketing depends on every day. Before you reach the limit, export a list of every contact and company field with its type, length and owner, so you can tell which fields are still in use and which can be retired.
Right-sizing text fields is a trade-off, not a free gain. A VARCHAR column sized to the longest value you have ever seen can waste room, but shrinking it too far can cause imports, forms or API calls to fail when a longer value arrives later, such as a job title, a referral source or a free-text note. Ask your marketing and data teams what the realistic longest value is for each field, and keep a margin above it. Fields that hold long free text, or that many people fill in differently, are usually better as a separate table or a note field than as a short column that must be tuned again later.
The exact column ceiling depends on your Mautic version, the database engine and the storage engine, and the limit that applies to your installation is not stated here. Confirm it in the documentation for your release line and test it on a staging database that mirrors your production schema, including the number of fields already in use. Plan a field audit as a recurring task rather than a one-off cleanup, and record each new field's purpose and owner when it is created, so the table does not fill up again with fields nobody remembers.
Choosing a field strategy by instance size and traffic
A small instance with modest contact volume and few integrations can keep the setup simple. Field creation rarely competes with imports or campaign processing, so the background option mainly keeps the admin screen from timing out while the column is created. Use the default flow, create fields in planned batches, and read the Mautic custom field guidance before the first batch.
- Schedule: run
mautic:custom-field:create-columnafter each planned batch of new fields, and otherwise once a day in a quiet window. - Governance: one named owner approves each field through a short written request that states its purpose, data type and source form.
- Field count: keep fields to those that campaigns, segments and forms actually use, and retire unused fields before adding new ones.
- Verification: after the command runs, confirm the field shows as published and returns results in a test segment filter.
Confirm who makes field changes, which cron jobs already run on the server, and whether anyone edits fields outside the planned window.
A busy instance with continuous imports and CRM integrations writes to the contacts table throughout the day. Mautic advises running the column command once daily when traffic is low because it takes table locks, so the schedule matters more here than the number of fields. The team should plan the window around the import and sync jobs, not around the marketing calendar alone.
- Schedule: run the command once daily in the lowest-traffic window, after mapping every import and sync job, and stagger it from segment and campaign cron jobs.
- Import pause: pause or reschedule bulk imports and HubSpot or Salesforce sync jobs that write to the contacts table during the window.
- Governance: route each new field through a change ticket that includes its import mapping, so every source column maps to a published field before the next import runs.
- Optimization: from Mautic 5.1 onward, run the command that analyzes custom fields and optimizes VARCHAR sizes when the contacts table approaches its hard limit, and schedule it in the same window.
Confirm the owner of each import mapping, the sync direction for every shared field, and how long a full column run takes on your largest contacts table before you commit to a window.
A multi-brand or B2B instance holds many company fields, and several teams may request new columns for different brands or business units. Each approved field is still a column change on the contacts or companies table, so the schedule stays the same, but governance becomes the main control. Without an owner for every field, duplicate and overlapping fields accumulate quickly and make segments harder to trust.
- Schedule: keep one daily column run for all brands, and batch approved company fields into that run so that the table is changed at a predictable time.
- Shared or brand fields: a field that every brand uses gets one definition, while brand-specific data gets its own field with a documented purpose.
- Ownership and naming: assign one owner to each field and add a brand or business unit prefix only where the data differs between brands.
- Consent and scope: record which brand collects each field, so consent, retention and access rules can be applied per brand.
- Field register: keep a register with creation date, owner and the campaigns, segments or integrations that depend on each field.
Confirm which teams may request fields, who signs off on company-level data, and whether any brand must keep its contact data separate from the others.
Security and operational risks in custom field changes
Adding a custom field looks like a small admin task, but in Mautic it changes the contacts table, the data that flows into exports and APIs, and who can collect what. The cards below pair each risk with one control to decide before a field goes live.
Table locks during column creation
Creating a column on the contacts table can lock it while the change runs, and a busy instance will feel that as slow or stalled requests. The create_custom_field_in_background option keeps the field unpublished until mautic:custom-field:create-column runs. Schedule that command for a low-traffic window, and confirm with your team how long the table is locked on your database version before running it in production.
- Background creation since
- 3.3
Personal data collected by new fields
A new field on a form or in an import starts collecting data for every contact, which can bring in personal data that your privacy notice and lawful basis never covered. Before creating a field, document its purpose, whether it is needed for marketing at all, and who approved it. Review existing forms that could write to the same field so no one collects extra data by accident.
Sensitive fields in exports and APIs
A custom field is visible wherever contact data is shown, including list views, contact exports and REST API responses for users or integrations with contact access. A field holding health, financial or identity details can leave the system through a routine export. Mark sensitive fields as not exposed where the setting is available, and test an export and an API call with a restricted account to confirm what they return.
Who can create fields
Field creation changes the database schema for everyone, so it should not sit with every user who can edit contacts. Limit field management to a small administrator group through Mautic roles, and log who changes field definitions. Confirm that marketers and agencies can use existing fields without holding the permission to add new columns.
Backups before schema changes
A column added to the contacts table is hard to reverse cleanly, and a failed or interrupted creation can leave the schema in an unexpected state. Take a verified database backup before creating fields in bulk or running the column command, and record the Mautic version. Restore the backup to a staging copy to rehearse the change first, so the production run is a repeat of a tested step.
Oversized VARCHAR columns
Custom fields that default to large text sizes consume row space on the contacts table, and the table can reach its hard limit before you intend it to. Since Mautic 5.1, a command can analyze custom fields and optimize VARCHAR sizes to free room for new fields. Run the analysis on a copy first, review the proposed size changes with the field owners, and confirm the outcome against a restored backup.
Questions teams ask before changing Mautic contact fields
What drives the effort to plan Mautic custom fields?
The main driver is how many fields you need and how well they map to your data model. Each field becomes a column in the contacts or companies table, so every name, data type and size choice affects storage and future changes. Effort rises when several teams (marketing, sales, legal and data owners) need to agree on definitions, when fields feed segments, campaigns or CRM sync, and when existing data must be mapped into new columns. Ask any partner to list the fields, their types, their owners and the systems that read them before agreeing on scope.
Can an internal admin create and manage custom fields alone?
Often yes for simple additions, provided the admin has Mautic administrator rights and access to the server to run console commands. The work gets harder when a field change touches the database during busy hours, when the instance runs behind a deployment pipeline, or when the field feeds integrations and compliance records. Most teams keep field creation in-house for small changes and bring in outside help for schema planning, background job setup and verification. Confirm internally who can run commands on the production server and who approves schema changes.
How long does it take to set up the background column creation schedule?
The Mautic documentation advises running the column creation command once daily when traffic is low, because creating columns can lock the table. Setting that up is a small technical task: adding a scheduled job on the server, choosing a time outside peak hours and checking the output. The longer part is agreeing the window with the people who run campaigns and imports, and confirming that the job is monitored. Ask your team or a partner to document the schedule, the owner and the check that confirms new fields were published.
What should we ask for in a quote for Mautic field work?
Ask for a written scope that lists each field with its name, type, size, purpose and destination systems. Request the steps for creating columns in the background, the schedule for the create-column command, the testing plan on a staging copy and the rollback approach. Also ask what is one-time (planning, configuration, testing) and what recurs (monitoring, updates after each Mautic release line change). DeployOpen does not publish a price list, so a quote follows from the written scope. Ask which deliverables and acceptance checks are included.
Can a Mautic custom field be changed after it is created?
Changing a field depends on what you need to change. The field's label, grouping and whether it is published can be adjusted in the Mautic interface, but the underlying column type and size are harder to change safely once contacts store data in it. Reducing a size or changing a type can truncate or reject existing values, and changes to a busy table can lock it. Plan a change on a staging copy, back up the database first and confirm with your own data owners which values will be affected before running it.
How do we tell when the contacts table is near its limit?
Watch for errors or failed saves when adding new custom fields, and check the number and size of the existing columns on the contacts table against the database's row size and column limits. Mautic 5.1 added a command that analyzes custom fields and optimizes VARCHAR column sizes so more fields can be created when the contacts table hits its hard limit. Run the analysis on a staging copy first, review the proposed size changes with data owners and record the table's current column count and size. Confirm the exact limits for your MySQL or MariaDB version in its documentation.
Do we need a backup and a test copy before adding fields?
Yes. A tested backup is the minimum before any schema change, and a staging copy with a similar table size lets you measure how long column creation takes and whether it blocks writes. Test the create-column command, the scheduled run and the effect on imports and campaigns that read the new fields. Record the results so the production run follows a checked procedure. Confirm your backup restore process works before relying on it.
How a new custom field moves from request to published column
The flow starts when an administrator creates a contact or company field with background column creation enabled, so the field is saved but left unpublished. The scheduled create-column command then alters the contacts table, and only after that does the field get published and become available in forms and segments. A decision point checks whether the contacts table has reached its hard limit; if it has, the VARCHAR optimization command runs first so more fields can be added. Check the table state before running the command, because it takes table locks.
Custom field lifecycle from creation through column creation to publication.
How DeployOpen plans and delivers Mautic field design
DeployOpen treats Mautic custom fields as part of the contact model, not as an afterthought. We scope field definitions, the background column step and the database impact on your instance, then build and hand over the work with documentation your operations team can run on its own schedule.
How we scope
- Inventory the contact and company fields your marketing, sales and consent processes need before any field is created.
- Confirm whether your instance uses create_custom_field_in_background and who runs the column creation command.
- Agree in writing which fields, field types, VARCHAR sizes and maintenance windows are in the fixed scope.
How we build
- Create fields in a staging copy first, then check that each new column is created and the field is published as expected.
- Review field types and lengths against your data so the optimization command has realistic sizes to work with.
- Schedule the column creation command for a low-traffic window, staggered from other cron jobs on your server.
How we hand over
- Document each field's purpose, owner, type and length, and the steps used to publish it after column creation.
- Provide a runbook covering when to run the command, how to check table locks and how to roll back a failed field change.
- Walk your administrators through the process so future field requests follow the same designed path.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers for Mautic field changes across releases.
- Retainers can cover reviews of new field requests before they reach production, so the contacts table stays within limits.
- Ask any partner to confirm how field changes are handled during Mautic upgrades within your agreed scope.

