reference field type documentation vs reality | Community
Skip to main content
Level 1
February 4, 2026
Question

reference field type documentation vs reality

  • February 4, 2026
  • 1 reply
  • 23 views

The doc states the following:

Reference A string field containing a key to another record (a foreign key).


(source)

According to the response of describe lead endpoint - contactCompany is a reference field:

        {
"name" : "contactCompany",
"displayName" : "Contact Company",
"dataType" : "reference",
"length" : null,
"updateable" : false,
"crmManaged" : false
},

But we have encountered that it can store numbers:

  "contactCompany" : 20,

We’d like to understand how reference fields should be handled and whether Marketo provides any type guarantees at all. For example, can we expect other fields to contain values of different types?

 

1 reply

SanfordWhiteman
Level 10
February 4, 2026

Reference fields are definitely not all strings, that’s a error in the docs. Integers are also returned depending on the relationship.

 

Unfortunately, you also can’t trust the Describe/Describe2 endpoints when it comes to data length for string types. The returned type will conform to the Describe schema, but a string can be much longer than advertised. (Marketo has a lot of undocumented quirks wrt strings, in part because of the use of UTF8MB3.)