How to understand created_at vs. waiting_since

  • 15 March 2024
  • 8 replies

Hi folks,

I’m new to the Front API and am trying to understand how to use the two conversation date fields created_at and waiting_since.


I recently pulled a conversation from Front in which there are four messages sent between 16:53:05 and 17:04:14 on March 28, 2022. As expected, waiting_since is equal to 1648487054, i.e., Mon Mar 28 2022 17:04:14 GMT+0000, which does correspond to the “oldest unreplied message”. But created_at has the value of 1706893362.369 – Fri Feb 02 2024 17:02:42 GMT+0000. That doesn’t make sense to me. Am I missing something? Is there a field that stores the true created_at value, or do we just need to pull the timestamp of the first message?





Best answer by jason 15 March 2024, 18:57

View original

8 replies

Userlevel 4
Badge +7

Hey Matt,

The conversation created_at timestamp represents the time the conversation resource was created - this happens the moment a teammate hits “Compose” for messages which start with an outbound message. They might spend a few minutes writing their message before they hit send, giving us the difference between conversation creation and message creation times. 

So, the conversation created_at timestamp is the true time the conversation was created, but depending on your use case, you might need to check message timestamps vs conversation timestamps.

Let me know if you have questions!

@jason Thanks for the response, but with the record I’m looking at, the created_at contains a timestamp for 2024 when all of the messages were created in 2022.

Userlevel 4
Badge +7

Ah - this might still be the conversation resource being created in 2024 if the messages were imported as part of a channel import (we still date the messages based on the the message “Date” header)

Got it, thanks. In that case, I think we had better use the message dates and not rely on conversation created_at.

Userlevel 4
Badge +7

No problem! Yes that would make sense if you’re looking for a wait time on the message. 

We’re not look for wait time, we just want an accurate representation of when this conversation happened. We (Enterpret) pull in feedback from various sources including Front, Zendesk, Intercom, Twitter, App Store etc. We pull in the created date of the source record when we ingest data, but see below: a whole bunch of historical conversations have created_at = Feb 2, 2024, so the chart has a huge spike, and it’s impossible to accurately look at historical trends.


Userlevel 4
Badge +7

Thanks for the context, Matt.

If you’re looking to calculate the time a conversation occurred, you will likely want to look at the Message timestamps as these will be dated with the actual message times (even in cases where an older message is imported via a channel being connected).

Alternatively, you might want to consider using the analytics export endpoints. Here Front will allow you to send a query asking what happened in all/specific inboxes over a given timeframe, and deliver a CSV export of all this raw event data. If you’re looking for event data extraction, this is typically the most effective API endpoint you can use.

You may also want to consider building an application webhook to receive a live stream of events (of specified types) as they occur in a Front account; this allows you to avoid polling the API entirely. 

I hope this gives you some options to consider!

Got it, thanks @jason!