APIs & Integrations

terrance
Participant

Create property like hs_analytics_last_timestamp

What property type and format should a format like hs_analytics_last_timestamp be in? This is a field created by Hubspot. According to Hubspot, this is a single line text field, stored in milliseconds. If I try to recreate this, it does nothing but show the milliseconds. A datepicker field will only be the date, but what if I want the time? It looks like we could use the single line text, and store it as YYYY-MM-DD HH:MM to help with ordering, but there has to be a better way.

The goal would be to have the Last Seen data formatting within the web app, with a custom property we create.

0 Upvotes
1 Reply 1
terrance
Participant

Create property like hs_analytics_last_timestamp

Answering my own questions here. It’s not well documented, but you call https://api.hubapi.com/properties/v1/contacts/properties/named/:property_name with a body of

{
“fieldType”: “date”,
“groupName”: “groupnamexxxxx”,
“type”: “datetime”
}

You need to have a date fieldType, but a datetime field. This can only be done via the API.

0 Upvotes