---
title: "Custom fields"
date: "2024-02-14T06:18:38+00:00"
summary: "Create custom fields in Campaign Studio to define and leverage unique data points for your business. Personalize messaging, segment contacts, and run targeted reports to optimize your marketing efforts and improve ROI."
image:
type: "page"
url: "/campaign-studio/custom-fields"
id: "6f1fea87-1aea-4fed-b8cf-607093d6f036"
---

Each business has different data points that are relevant to its market. Campaign Studio supports several standard fields that are generic to any businesses. However, as the requirements for each business are unique, Campaign Studio also allows you to create custom fields. By creating custom fields, you can define the information that is important to you and your business and leverage such data points to personalize messaging, segment contacts, and run reports that can indicate which types of contacts are worth spending the most time and money targeting.

Note

Acquia recommends that you create your own custom fields in Campaign Studio before importing your contact list through CSV or API.

To access the **Custom Fields** page in Campaign Studio, click the **Settings** icon in the top right corner and select **Custom Fields**.

![Accessing the custom fields page](https://acquia.widen.net/content/agirykggzb/jpeg/campaign-studio_accessing-custom-fields-page.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)

Viewing custom fields
---------------------

The **Custom Fields** page shows all the existing contact fields, including standard fields and any custom contact fields that you’ve created earlier.

![Viewing the existing custom fields](https://acquia.widen.net/content/cfm1kibszy/jpeg/campaign-studio_viewing-custom-fields.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)

The various columns on this page are:

*   **Label**: Indicates the name for the custom field that appears on the Campaign Studio user interface.
*   **Alias**: Indicates the name that Campaign Studio needs to use in order to name the field on its database. You can use this value for API calls, tokens in emails, and other technical references to the custom field. Once you’ve saved the new custom field, you can’t update this value.
*   **Group**: Indicates the category which includes the custom field. You can view the field under the displayed group for company or contact records. The possible options are:
    *   **Core**
    *   **Social**
    *   **Personal**
    *   **Professional**
*   **Data Type**: Indicates the data type that Campaign Studio leverages to validate data in this field. Once you have saved the new custom field, you cannot update this value. For more information, see [Data types](../components/forms/form.html#id1).
    
    Campaign Studio has a limit on the maximum number of characters allowed for all contact fields combined. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to:
    
    *   The maximum row size of 65,535 bytes, which is shared among all columns
    *   The character set used
    
    The internal representation of a table has a maximum row size of 65,535 bytes even if the storage engine is capable of supporting larger rows. This figure excludes BLOB or TEXT columns, which contribute only 9 to 12 bytes toward this size. For BLOB and TEXT data, the information is stored internally in a different area of memory than the row buffer.
    
    Text and Longtext require only 4 bytes to store. For more information, see [MySQL](https://dev.mysql.com/doc/refman/8.0/en/storage-requirements.html).
    
    Important
    
    If an instance reaches the character limit, you cannot create any new custom fields. To avoid reaching the character limit, Acquia recommends you to create a data mapping document that includes field lengths for tracking purposes.
    
    **Field type**
    
    **Data type**
    
    **Size**
    
    **Maximum character limit**
    
    **Additional details**
    
    **Boolean**
    
    tinyint
    
    1 byte
    
    N/A
    
    N/A
    
    **Date**
    
    date
    
    3 bytes
    
    N/A
    
    N/A
    
    **Date/Time**
    
    datetime
    
    8 bytes
    
    N/A
    
    N/A
    
    **Email**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **List - Country**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Locale**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Lookup**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Number**
    
    double
    
    8 bytes
    
    N/A
    
    N/A
    
    **Phone**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Select**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Select - Multiple**
    
    TEXT
    
    N/A
    
    N/A
    
    For TEXT type: A TEXT column with a maximum length of 65,535 bytes. utf8mb4: A UTF-8 encoding of the Unicode character set using 1 to 4 bytes per character. For example, the string “”Hello”” with 5 characters occupies 5 bytes and the string “”こんにちは”” with 5 characters occupies 10 bytes.
    
    **Text**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **Textarea**
    
    longtext
    
    N/A
    
    N/A
    
    For LONGTEXT type: A TEXT column with a maximum length of 4,294,967,295 bytes. utf8mb4: A UTF-8 encoding of the Unicode character set using 1 to 4 bytes per character. For example, the string “”Hello”” with 5 characters occupies 5 bytes and the string “”こんにちは”” with 5 characters occupies 10 bytes.
    
    **HTML**
    
    longtext
    
    N/A
    
    N/A
    
    N/A
    
    **Time**
    
    time
    
    3 bytes
    
    N/A
    
    N/A
    
    **Timezone**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
    **URL**
    
    varchar
    
    4x the maximum character length
    
    191
    
    N/A
    
*   **ID**: Indicates the unique ID for each field. This is a system-generated unique identifier for each custom field.

Additionally, Campaign Studio displays the following indicators that show various properties of the custom fields:

*   **Key**: Indicates that the field is a unique identifier for the **Contact** or **Company** objects.
*   **Lock**: Indicates that you can’t remove these fields as they are core to Campaign Studio. However, you can unpublish such fields so that they don’t appear on contact records.
*   **List**: Indicates that you can use these fields as filters in segments.
*   **Eye**: Indicates that you can’t use these fields on contact forms.
*   **Asterisk**: Indicates that you must populate values for these fields in order to save a new contact (manual add or CSV import).
*   **Red globe**: Indicates that you can update these fields publicly through the tracking pixel URL query.

![Custom fields indicator](https://acquia.widen.net/content/w4xr8i7wqi/jpeg/campaign-studio_custom-fields-indicator.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)

### Publishing custom fields

To publish a specific custom field, toggle the bar (adjacent to the label of the field) to the left until it appears in green. Alternatively, to unpublish a specific custom field, toggle the bar to the right until it appears in red.

![Publishing custom fields](https://acquia.widen.net/content/ow6ojpkglz/jpeg/campaign-studio_publishing-custom-fields.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)

Creating new custom fields
--------------------------

You can create additional custom fields and define the data type you want that field to hold.

To create a custom field:

1.  Sign in to your Campaign Studio account.
2.  Click the **Settings** icon on the top right corner and select **Custom Fields**. You can view the existing custom fields.
3.  Click **New**.
4.  Enter the data that applies to your field. For more information, see [Settings](#custom-field-settings) and [Options](#custom-field-options).
5.  To publish the custom field, click **Apply**. Alternatively, if you want to avoid publishing the custom field right-away, click **Save & Close**.

### Settings

*   **Label**: Specify the name for the custom field that you want to be displayed on the Campaign Studio user interface.
*   **Alias**: Specify the name that Campaign Studio can use to name the field on its database. You can use this value for API calls, tokens in emails, and other technical references to the custom field. Once you’ve saved the new custom field, you can’t update this value.
*   **Object**: Select either of the following options:
    
    *   **Company**: If your data is relevant for the accounts, companies, organizations.
    *   **Contacts**: If your data is specific to an individual person. If you’re using a CRM system or other data integration that has multiple objects relating to people; for example- Salesforce Leads and Contacts; you should create one field on the **Contacts** object in Campaign Studio to map to those external person-related objects.
    
    Once you’ve saved the new custom field, you can’t update this value.
    
*   **Group**: Specify the category that can include the custom field. You can view the field under the displayed group for either company or contact records. The available options are:
    *   **Core**
    *   **Social**
    *   **Personal**
    *   **Professional**
*   **Data Type**: Specify the data type for the custom field. Campaign Studio validates data in this field, based on the selected data type. Once you’ve saved the new custom field, you can’t update this value. For more information, see [Data types](/campaign-studio/components/forms/create-a-form#id1).
*   **Default Value**: Specify a default value for the custom field so that all the new contacts created have that value.
    
    Note
    
    Default values can only be applied to custom fields that are not used as unique identifiers.
    

![New custom field settings](https://acquia.widen.net/content/xhknnhnvjj/jpeg/campaign-studio_new-custom-field-settings.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)

### Options

*   **Published**: Set this option to **Yes** if you want to use the custom field. Alternatively, if you don’t want to use the field or view it in the Campaign Studio user interface, set this option to **No**.
*   **Required**: Set this option to **Yes** if you want to ensure that no new contacts can be added unless data exists in this field.
*   **Visible on forms**: Set this option to **Yes** if you want to use the custom field on Campaign Studio forms and thereby, map data to that field. Alternatively, if you don’t want to allow anyone to use this custom field on Campaign Studio forms, set this option to **No**.
*   **Visible on short forms**: Set this option to **Yes** if the custom field should appear in the modal while using the Quick Add feature to manually add contacts in Campaign Studio.
*   **Available for segments**: Set this option to **Yes** so that the custom field can be used as a filter in segments.
*   **Publicly updatable**: Set this option to **Yes** so that you can update the custom field based on a tracking script event. If you’re tracking events behind the login of your SaaS platform or want to otherwise update a field based on some activity, you can use this option.
    
    Note
    
    This is a technical feature and you may use other features as well to achieve a similar result.
    
*   **Indexable**: Make this field indexable to improve search performance. 
    
    The following limitations apply to indexing custom fields:
    
    *   The maximum number of custom fields that can be indexed in Campaign Studio is 64.
        
    *   The total length of all indexed fields in Campaign Studio must be less than or equal to 3072.
        
*   **Maximum character length**: The maximum permissible length for new custom fields is 191 characters. The default length is 64 characters. 
    
    Note
    
    *   This field is displayed only for relevant [data types](#data-type).
    *   If you edit this field and attempt to set a value that is lower than the character length of an existing record, the system displays an error message. In such scenarios, you must increase the value according to the recommendation provided in the error message.
    
*   **Is unique identifier**: Set this option to **Yes** to use the custom field as a unique identifier. Campaign Studio uses email address as the default unique identifier for both the Contact and Company objects. However, you can have your own unique identifier or even have multiple unique IDs. Having multiple unique identifiers may result in having duplicate contacts.

Important

Duplicate contacts with the same unique identifier are merged only if the contacts were created or updated through the API or a CSV import.

![New custom field options](https://acquia.widen.net/content/7yvqvafrh9/jpeg/campaign-studio_campaign-studio_new-custom-field-options.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)