You may find that some of your contacts' property values are displayed in red and/or have the hover text "Invalid value" when looking at the contact record.
Here's what it will look like if a contact has an invalid value for a property on a contact record:
Property values can be invalid if:
1. The property value doesn't match the format that the property type requires.
- Ex: The contact has a text value in a date picker type property.
2. The property is an enumeration property (dropdown select, multiple checkboxes, radio select, or single checkbox) and the contact's value does not match the values defined in the property's options.
How can a contact get an invalid property values set? This can happen in a couple of ways:
1. The contact has a value set when the property is one type, then the property is changed to another type, making their value invalid.
For example, you are using a single-line text field to capture the birthday for your contacts who fill out one of your forms:
- A contact fills out the form and provides the value "October 25, 2015".
- Later, you decide that this property should actually be a date picker property, so you change the property type to a date picker.
- Now that the property is a date-type property, the value "October 25, 2015" is invalid because date property values must be stored on the back end as unix timestamps (like "1445745600000") even though the timestamp value for the date property is displayed in-app as a human-readable date format, just like "10/25/2015".
2. The contact has an invalid property value set via the Forms API, which allows any value to be passed to a property, even the value is invalid.
For example, when passing a value to a date property via the Forms API, the value must be passed in UNIX millisecond format. As mentioned above, the HubSpot app will display the timestamp in a human-readble format, but the value must be passed as a timestamp:
- If you want to set a value for a date property for your contact to "October 25, 2015", passing values of "10/25/2015", "10-25-2015", or "October 25, 2015" via Forms API are invalid values.
- Instead, you must pass a value of "1445745600000" (the UNIX timestamp equivalent of "October 25, 2015") via the Forms API.
In another example, you are passing values via Forms API to an enumeration property like the default HubSpot property "Persona". This property has a number of different property options that can be set, and each option has a different Label and Value:
- When passing a value via the Forms API to any enumeration property, you must pass the internal value, not the label.
- So if you wanted to pass a value of "Business Owner/Partner" based on what a visitor selected on your external form, you must pass the value "persona_3."
- HubSpot will display the label of each property option when the correct internal value is passed. If an invalid value is passed, that value will be displayed as it, but it will be colored red and will have the hover text "invalid value." Even though it looks like both contacts in the example below have the same value, they don't -- the first one had the value "Business Owner/Partner" while the second one has the proper value stored, "persona_3."
In a third example, you are using the Forms API to pass values to a single checkbox property (which is also an enumeration property).
- Single checkbox properties have two options with labels "Yes" and "No" and corresponding internal values "true" and "false," respectively.
- If you pass the value "Yes" via Forms API, that value is invalid because you must pass the corresponding internal value for that option's label, "Yes," which should be "true." Here's an example of what you would see if you pass the value "Yes" via Forms API:
For more on the Forms API, check out or developer documentation.
How can you fix the invalid data for affected contacts?
For any issues with invalid values for enumeration properties, you won't be able to create a list to segment on those invalid values because the options for list segmentation are only the valid property values that are set up in the property -- invalid values won't be available for selection in the list. Instead, you could:
- Add those invalid values to the property options in the property editory, then merge the invalid options with the correct, valid option. Check out this article on merging property options. Note: this option won't work for single checkbox properties or other default properties like Persona or Lifecycle Stage because the property options are not editable.
- Create a list of contacts who have any value for the enumeration property by using the "is known" list filter for the selected contact property, then export those contacts. Once exported:
- If the value that had been set on the contact matches the property option's label, you don't need to change anything -- you can just reimport the contacts with that value because the import process looks for the property label (it's only via API where you need to pass the value.)
- If the value that had been set ont he record does not match the property option's label, set the correct label, then reimport the contacts.
- Export the form submission data where the invalid values were set, then reimport the contacts with the property option's label.