Hello,
I am working on a system that uses the
https://api.hubapi.com/crm/v3/properties/{objectType} endpoint to retrieve and expose the schema for each object (table) to end users.
As part of this, we rely on the type and fieldType attributes to map fields to our supported SQL types (for example: INTEGER, DECIMAL, DOUBLE, VARCHAR, BINARY, etc.).
I am running into an inconsistency specifically with properties of fieldType = calculation_rollup, which makes it difficult to reliably determine the correct datatype.
Problem Description
There appears to be inconsistent behavior for calculation_rollup properties when interpreting the type attribute.
Below is a practical example with two properties that both have:
- fieldType = calculation_rollup
- type = number
However, their actual returned values differ significantly.
Example Properties Response
[
{
"updatedAt": "2025-05-28T20:42:26.976Z",
"createdAt": "2025-03-12T20:25:44.943Z",
"name": "hs_hd_ticket_ids",
"label": "hd_ticket_ids",
"type": "number",
"fieldType": "calculation_rollup",
"description": "All Helpdesk ticketIds associated with the Note",
"groupName": "note",
"displayOrder": -1,
"calculated": true,
"externalOptions": false,
"hasUniqueValue": false,
"hidden": true,
"hubspotDefined": true,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": true,
"readOnlyValue": true
},
"formField": false,
"dataSensitivity": "non_sensitive"
},
{
"updatedAt": "2025-12-22T08:42:02.492Z",
"createdAt": "2025-12-22T08:42:02.492Z",
"name": "rollup_fieldtype",
"label": "rollup_fieldtype",
"type": "number",
"fieldType": "calculation_rollup",
"description": "rollup_fieldtype",
"groupName": "contactinformation",
"displayOrder": -1,
"calculated": true,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false,
"hidden": false,
"showCurrencySymbol": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": false,
"readOnlyValue": true
},
"formField": false,
"dataSensitivity": "non_sensitive"
}
]
Example Values Response
[
{
"id": "88262553254",
"properties": {
"hs_hd_ticket_ids": "24039996340;29553990175;29609291889;29612232290;29653594195;29971242580"
}
},
{
"id": "153970383798",
"properties": {
"rollup_fieldtype": "520"
}
}
]
Observations
-
hs_hd_ticket_ids
- HubSpot-defined property
- Declared as type = number
- Returns multiple numeric values concatenated as a semicolon-separated string
- Cannot be safely mapped to a numeric SQL type
- Treating it as numeric causes parsing errors in our platform
-
rollup_fieldtype
- Custom property
- Declared as type = number
- Returns a single numeric value
- Datatype can be reliably inferred from the type attribute
Proposed Approach
Would the following logic be considered safe and future-proof?
- If fieldType = calculation_rollup and hubspotDefined = true
→ Treat the field as string, since it may return multiple values separated by ; - If fieldType = calculation_rollup and hubspotDefined = false
→ Determine the datatype based on the type attribute from the properties response
Questions
- Is this assumption correct and safe to rely on?
- Is this a known issue or limitation of calculation_rollup properties?
- Are there plans to introduce additional metadata (for example, something like isMultiValue) in the properties response to make this distinction explicit?
Any guidance on the recommended way to handle this would be greatly appreciated.
Thank you in advance.
