Setting a default value for a contact data field

Summary

When you use personalisation to display the value of a contact data field, a blank space is displayed if a contact does not have a value for that data field.

Default values for contact data field are values that are displayed instead of a blank space only when you use personalisation in a message. For example, if you personalise an email campaign with 'Dear @FIRSTNAME@' but a contact does not have a value for the FIRSTNAME data field, your email displays the default value, such as 'Dear Customer', as opposed to an embarrassing 'Dear '.

Default values aren't assigned to your contacts' data fields. They are displayed when you use personalisation and a contact does not already have a value for the data field.

Setting a default value for a contact data field

To create a new contact data field, follow these steps:

  1. Mouse over Contacts in the navigation bar and then select Contact data fields from the dropdown displayed.
    select_contact_data_fields_el.png
  2. You're taken to where your contact data fields are listed in two separate tabs - Default data fields and My data fields, the latter containing the contact data fields that you've created.
    contact_data_fields_el.pngClick on the Properties icon alongside the contact data field for which you wish to set a default. 
  3. The properties of the contact data field are displayed.
    default_data_field_value_el.pngType the value you wish to use in the 'Default value' field. In this example for 'FIRSTNAME', 'Customer' has been entered.
    default_value_el.png
  4. When ready, click Save.

Default values can be set against any of your contact data fields.

Have more questions? Submit a request

Comments

  • Avatar

    Hi Stoo,

    With the Spektrix integration, we send Title, FirstName, LastName using the API. Would we be able to set a rule for personalisation such as the one below?

    If(Title is not NULL) Salutation = Title + LastName

    If(Title is NULL) Salutation = FirstName

    Obviously we could set defaults for FirstName and LastName to display something if it's blank (and I realise in the example above if Surname is blank we would end up with Dear Mr Customer...)

    Emily

     

     

  • Avatar

    Hi Emily,

    Good idea; this can be achieved using dynamic content in the Editor, but isn't currently an option using the API. We do have an open feature request for being able to create dynamic content via the API — so do add your vote to that thread.

    customise_salutation.png

    Meanwhile, one option might be to have part of your integration to automatically update a Salutation field?

  • Avatar

    Hi Stoo,

    Thanks for the speedy response!

    I thought it might be achievable through Dynamic Content so I'll add my vote to that!

    This was a request from a client to create a dynamic field in our system that would create a Salutation field based on the content of the existing fields, but this isn't possible at the moment and as he only wanted it for emails I thought we might be able to achieve it now using the personalisation/dynamic content features. Ah well, at least I was on the right track!

    Thanks again,

    Emily

  • Avatar

    There is a numerical field, but what about financial fields? I don't believe the numerical field allows you to put "10.00" for example - it changes it to just "10"

  • Avatar

    Hi Matt,

    Yes, we just support numerical fields, not financial fields, so entering '10.00' will change back to '10'.

  • Avatar

    Hi Neal

    Thanks for reply. What I've worked out as an alternative is that we can use two data fields - one numerical (used for filtering/segments/dynamic content etc) and one text (for display within the email). It's a bit messier having two fields, but as it all gets updated via the API it's no harder to maintain. Just have to remember to use the right one within the email!

    Thanks

    Matt

  • Avatar

    Hi Matt,

    Excellent - where there's a will, there's a way! Pleased to hear you've managed to find a workaround.

  • Avatar

    Hi Neal,

    I am interested to see if you maybe have some suggestions what we could use for a default value with different data fields. We are struggling with last name, job title, company, address-city & country.

    Would you be able to advise?

    Thanks
    Aja

  • Avatar

    Hi Aja. Thanks for your question. Do you need to have a default value for these contact data fields, out of interest? I only say this because setting a default value isn't mandatory for a contact data field. It can be left blank. However, are you looking for default values because these contact data fields feature as part of a template using personalisation, and you'd rather not leave them blank?

    As a basic suggestion, and if it worked for you, how about just using the labels of the contact data fields as the default values, so it's at least obvious what they're used and for and what value could be there, i.e. 'LAST NAME', 'JOB TITLE', 'COMPANY', 'CITY' and 'COUNTRY'?

  • Avatar

    Hi Neal,
    Thank you for your answer - I guess we don't need always need a default value. I was just wondering if there was a generic 'best practice' example.
    Thank you for your help. I think I know what to do now:)

  • Avatar

    Hi,
    Are their any plans to allow financial values (i.e decimal values) for the default value?

  • Avatar

    Hi Tom. There aren't any plans to change the formatting of the value for a numeric data type field (10) into a financial/money format (10.00).

    However, I want to mention that there is a possible solution if you have, or want to make use of, our advanced personalisation add-on. This is outlined under 'money' in the 'Maths filters' section of the following article - https://support.dotmailer.com/hc/en-gb/articles/212214448-Filtering-liquid-outputs.

    Edited by Neal Goldsmith
  • Avatar

    It would be much better if we could create these within the email itself as we are a multi-national organization with users in multiple languages, so setting a default value at the company level is not effective.

    It sounds like dynamic content could offer that, but seems like a heavy lift to simply add a default alternative value at the email campaign level.

  • Avatar

    Hi Gorav. Thanks for your comment. I wonder if you've considered setting up child accounts per country, which would mean you could then set contact data field defaults in the relevant language per account.

    If you're interested in this, or if you'd like further guidance and information around what you're trying to achieve, then I recommend contacting our support team with more details and they'll be happy to help further.

  • Avatar

    Thanks Neal
    It's a good suggestion, but cost prohibitive. While child accounts offer other functionality that could be useful, spending that much per month per language is hard to justify. Internationalization ought to be supported at the platform level within a single account