Using Custom Fields
This page is describing the functionality of the new Marketing Campaigns experience, if you're using legacy Marketing Campaigns, your workflow and screens may be a little different. For more information on the new Marketing Campaigns experience click here.
Custom Fields allow you to add extra information about a contact within your contact database when you upload a CSV. You can use custom fields to create dynamic segments or to personalize the subject lines or content of Marketing Campaigns emails you send. Your custom fields are completely customizable to the use cases and user information that you need.
You can create up to 120 custom fields.
Creating Custom Fields
To add a custom field:
The most common way to add custom fields is by including each custom field you’d like to add as a column in your CSV upload. If you’d like to add custom fields programmatically, see our API documentation
You can also add custom fields manually from the Custom Fields page.
- Navigate to the Custom Fields page and click New Custom Field.
- Add a Field Name and select a Field Type.
- Click Create Field.
The field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (_). Custom fields should only begin with letters A-Z or underscores (_). The field type can be
number fields. The field type is important for creating segments from your contact database. Note: If you have created a custom field that begins with a number, you will need to recreate it with a name that begins with letters A-Z or an underscore (_).
Custom fields that begin with a number will cause issues when sending with Marketing Campaigns.
You can create three different types of custom fields, based on the data type. Each data type will allow you to use different queries for segmentation:
- Date - allows you to select contacts before, after, or on a specific date. Example: 1/1/2014
- Text - allows you to select contacts who match the specific text. Example: Pet field that says "Dog"
- Number - allows you to do things like “greater than,” “less than,” or “equals” a specific number. Both decimal and integer values are accepted. Example: The age of your recipient: 27
Text custom fields are limited to 1,000 characters.
Your account comes preloaded with unremovable reserved fields. The following field names are all reserved:
|Field Name||Field Type|
SendGrid auto-populates 6 reserved fields:
Reserved fields are used by default to track useful metrics for your contacts.
Deleting a Custom Field
To delete a custom field:
- Navigate to Marketing and select Custom Fields.
- Locate the field you wish to remove.
- Hover over the action menu to the right of the field name entry.
- Select the delete icon.
- Click Delete Field.
This deletion process may take several minutes; you will continue to see the custom field on this page until the process completes.
Deleting a custom field deletes all values for that field across your contact database. It will also break Single Sends or Automation emails using the custom field as a tag or segments using the field as a condition. See below for details.
If a deleted custom field is used as a tag within a Single Send or Automation email as part of the subject line or body copy, the email will send with the default value you've designated or the fall back "default". If you have deleted the fallback, the email will not display anything at all in place of the deleted custom field.
If a deleted custom field is used as criteria within a segment the segment will fail to load. Neither Single Sends nor Automation emails will be able to be sent to the segment using the deleted custom field.
If a custom field value does not appear in the corresponding Substitution Tag, make sure that there is a value for that custom field associated with the contact in your contact database. If there is no value for a particular custom field, a space will be substituted instead.
If you do find that the custom field has an associated value on the contact’s profile page, check the spelling of the substitution tag in the content of your campaign.
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.