Skip to main content

Custom Fields

Custom fields hold whatever the reserved fields do not cover: an account number, a balance, a renewal date, a store location. A custom field is defined once for the organisation and then exists on every contact, ready to be filled per contact and used in segment conditions and messages.

Campaign Manager, Admin and Org Admin can create and delete custom fields. A Campaigner can use the values in a campaign but cannot change the definitions. See Roles and Permissions.

Creating a Custom Field

Select Add Custom Field on the Fields page, then give the field a name and a type.

The name is snake case: lowercase letters, numbers and underscores, as in renewal_date. Capitals and spaces sort themselves out while the name is typed, a capital becoming lowercase and a space becoming an underscore. A hyphen is different, and is left in place and marked invalid, so store-code has to be changed to store_code before the field can be created.

The name also has to be:

  • Unique whatever the case, so a new field cannot differ from an existing one by capitalisation alone.
  • Different from every reserved field name.

A name that repeats an existing field or a reserved one is refused, and the field is not created until the name is changed. Custom fields and reserved fields are named to different schemes: a reserved raw name is camel case, such as phoneNumber, and a custom field cannot take that form.

The type is one of:

TypeHolds
TextAny characters, for names, codes, notes and anything that is not strictly a number or a date.
NumberNumeric values, such as an amount or a quantity.
DateA single calendar date.

A definition cannot be edited once it is saved. Neither the name nor the type can be changed afterwards, so a field created with the wrong type has to be deleted and created again, which clears the values already held against it. The type is worth settling first, because it decides how the value can be compared in a segment condition.

Filling a Custom Field

There are two ways a value gets into a custom field:

Not every contact has to hold a value. A field with nothing in it stays blank, and nothing is filled in for it. Blanks matter at send time, so a template can supply a fallback: see Default Values.

Using a Custom Field

Once the field exists it can be used in two places:

Deleting a Custom Field

Open the action menu on the field's row on the Fields page and delete it.

Deleting a field clears its values

Deleting a custom field removes the field's value from every contact in the organisation. It cannot be undone, and re-creating a field with the same name does not bring the values back.

The confirmation shows what is currently using the field, under a tab each for the campaigns, templates, brands and segments that reference it. A tab is only shown when it has something to list, and the whole tabbed area is left out when nothing uses the field. Nothing on that list blocks the deletion. The list is there to show what changes when the field goes, so read it before confirming.

Two things change beyond the values themselves.

Segments. Any condition built on the field is removed from the segment holding it. A segment with other conditions keeps those and matches on them from then on, with its membership changing at the next refresh. Where the removed condition was the only one a segment had, that segment is deleted along with it, so a segment defined on nothing but this field does not survive the deletion. See Managing Segments.

Templates. Template content is left exactly as it was, variable included. What changes is that the field no longer holds a value for anyone, so the variable resolves as a missing value for every recipient: the default value set on the template where there is one, and nothing where there is not. Editing those templates to take the variable out is a separate job, and one worth doing while the confirmation's list of them is still in front of you.

To keep a field but stop using it, leave the definition in place and remove the variable from the templates that reference it instead.

Where to Next