Default values are values you define for a field in your database.
When a default value is set on a field, it is designed to be used for the following two purposes:
- The default value is pre-populated in the contact details web user interface or in a web form, when a contact is being added or modified.
- The default value is inserted into the email when field personalization is used and its value is blank.
Default values do not override an imported blank value, however you can use Set field value feature to mass override all blank values to the desired value. This must be done with a separate data job.
Set the default value of a database field
To set the default value of a database field to blank or to a specified value, follow these steps:
- In Data, go to Databases.
- Click the name of the database associated with the email.
- Click Edit on the desired field name.
- Place your cursor in the Default Value area.
- To set the default value to blank, tap the space bar one time. The subject line in the email will be a blank value and the email will not show any personalization if the contact record in the database does not contain a First_Name value.
- To set the default value to a specified value, enter the desired value.
- Click Save.
Generally, if you import a file without a default value, the contact will exist in the database without any default value filled in, however there are some scenarios where the default value will be populated, for example:
- If you import a file, the segmenting and send hour field types will be populated with a default value
- If you add a contact through the Campaign UI, you can populate the default value for any field as you create the contact.
- If you add a contact via the API with or without a default value field for a yes/no field type, this field will be populated with a default value.
Use another field in place of a default value
You can include the personalization from one field of the same database (contact source), and use it as the default for another.
For example, let's say that you have a single opt-in database and the field names are:
Most of your contacts have their first name entered but because it is not a required field, some first names are blank. Rather than use something like 'Valued Customer' for the default value when personalizing the email subject line and email body, you want the contact's email address to display instead.
- Navigate to the desired database fields and take note of the actual field name for email address exactly as it displays.
- Edit the field FirstName and enter %%Email%% as the default value for that field (Email is whatever the actual field name is for your database).
Now, when sending the email, personalization uses the contact's email address as the default when the first name is not given.
Apply default values to previously added contacts
When you add a default value for a field, it does not retroactively update that value for contacts who are already in the list. It is only added for contacts who are added to the list after the default has been set. It is necessary to perform a Set Field Values action to allow for existing contacts to reflect the default value.
Update existing contacts with a new default value
If you want to update contacts who are already in the list and do not have a value for that field, take the following steps:
- Go to the Values tab of the database.
- Click New Values Report.
- Name the report and choose the field in question. Click Next.
- Click Submit.
- Refresh until the data job is complete.
- Click the report link.
- In the report, check the [empty] field value.
- Click Set Values.
- In the Update value to field, input your default value and submit.
- Refresh the data job until complete.
- Click on the link for the list, or just go to the list in question.
- You will see that all contacts who had a blank value for that field now have the default value.