Skip to main content
Solved

Questions About Analytics Reports

  • March 9, 2026
  • 4 replies
  • 54 views

Hi everyone, nice to meet you!

I have two questions regarding analytics reports:

1 Metrics showing 0:
When I request a report with:

metric_names = ["num_messages_sent", "num_messages_received"]
start_dt = datetime(2025, 8, 10, 0, 0, 0)
end_dt = datetime(2026, 3, 1, 0, 0, 0)
account_id = [account_id]

I get:

'metrics': [
{'id': 'num_messages_sent', 'type': 'number', 'value': 0},
{'id': 'num_messages_received', 'type': 'number', 'value': 0}
]

However, when I manually check the contacts and conversations for this account, there are messages sent in that interval. I don’t understand why the report shows 0. Here is my code if it helps:

metric_names = ["num_messages_sent", "num_messages_received"]
start_dt = datetime(2025, 8, 10, 0, 0, 0)
end_dt = datetime(2026, 3, 1, 0, 0, 0)
account_ids=['acc_xxxxx']
start_ts = int(start_dt.timestamp())
end_ts = int(end_dt.timestamp())

body = {
"start": int(start_ts),
"end": int(end_ts),
"timezone": "UTC",
"filters": {
"account_ids": account_ids,
},
"metrics": metric_names,
}

headers = {
"Authorization": f"Bearer {FRONT_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
}

# create the analytics report
resp = requests.post(
"https://api2.frontapp.com/analytics/reports",
json=body,
headers=headers,
)
resp.raise_for_status()
report = resp.json()

report_url = report["_links"]["self"]
while True:
time.sleep(poll_interval_sec)
check = requests.get(report_url, headers=headers)
check.raise_for_status()
data = check.json()
status = data.get("status")
if status == "done":
break

2 Accessing earlier dates:
When I request a report for a date earlier than August 2025, I get:

{'_error': {'status': 403, 'title': 'Forbidden', 'message': 'Your plan does not give you access to that time period.'}}

Which plan would allow access to this earlier data?

Thank you very much in advance, and have a great day!

Best answer by evano

Hi there!

There is a 217 day analytics retention limit for:

  • Trial accounts
  • Starter plans
  • Some legacy plans 

This applies in-app as well as through the API.

For the zero results, please double-check what values you’re getting here exactly:

"start": int(start_ts),

"end": int(end_ts),

4 replies

Forum|alt.badge.img+5
  • Fronteer
  • Answer
  • March 10, 2026

Hi there!

There is a 217 day analytics retention limit for:

  • Trial accounts
  • Starter plans
  • Some legacy plans 

This applies in-app as well as through the API.

For the zero results, please double-check what values you’re getting here exactly:

"start": int(start_ts),

"end": int(end_ts),


  • Author
  • Conversationalist
  • March 11, 2026

Hi!
Thank you so much for your answer! I’ll check my account plan :)

Concerning the zero results, I double-checked and I find the same results.

1 - Analytics report
To query the analytics report, I used the code available in your documentation (https://dev.frontapp.com/reference/create-analytics-report) to run this snippet:
 

url = "https://api2.frontapp.com/analytics/reports"

payload = {"filters": { "account_ids": ["acc_fbc8if"] },
"metrics": ["num_messages_sent", "num_messages_received"],
"start": 1756677600,
"end": 1772319600}

headers = {"Authorization": f"Bearer {FRONT_TOKEN}",
"accept": "application/json",
"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

print("start :", datetime.fromtimestamp(1756677600))
print("end :", datetime.fromtimestamp(1772319600))
print(data['metrics'])

And I get this result:

start : 2025-09-01 00:00:00
end : 2026-03-01 00:00:00
[{'id': 'num_messages_sent', 'type': 'number', 'value': 0}, {'id': 'num_messages_received', 'type': 'number', 'value': 0}]

2  -”Manual” checking
If I check the last message of the conversation of the first contact for the same account (acc_fbc8if) with this code:

url = "https://api2.frontapp.com/accounts/acc_fbc8if/contacts"

# Get contacts
contacts = requests.get(url, headers=headers).json()["_results"]
contact = contacts[0]

print(f"First contact: {contact['name']} (id={contact['id']})")

# Get conversations
conv_url = contact["_links"]["related"]["conversations"]
print("Conversations URL:", conv_url)

conversations = requests.get(conv_url, headers=headers).json()["_results"]
conv = conversations[0]

print("Last conversation id:", conv["id"])

# Get messages
msg_url = conv["_links"]["related"]["messages"]
print("Messages URL:", msg_url)

messages = requests.get(msg_url, headers=headers).json()["_results"]
msg = messages[0]

date = datetime.fromtimestamp(msg["created_at"])
print(f"Last message → date={date}, type={msg['type']}, inbound={msg['is_inbound']}")

I find:

First contact: Thomas Kerckhove (id=crd_4i6gxjr)
Conversations URL: https://pop-valet.api.frontapp.com/contacts/crd_4i6gxjr/conversations
Last conversation id: cnv_1k1bxyjb
Messages URL: https://pop-valet.api.frontapp.com/conversations/cnv_1k1bxyjb/messages
Last message → date=2025-11-17 12:19:04.447000, type=email, inbound=False

So I have a sent message in November 2025, which is within the time interval I set for the analytics report.

Do you have any idea what might be causing this? Am I doing something wrong ?

We synchronized our account with Salesforce last week — could that be the reason?
 

Thank you very much in advance!

Have a nice day :)


Forum|alt.badge.img+5
  • Fronteer
  • March 11, 2026

Since this is diving more into troubleshooting and we’ll need account-specific logs, would you please write in to support@front.com with what you’ve found and tested?


  • Author
  • Conversationalist
  • March 11, 2026

I do that right now ! Thank you :)