Opened 6 years ago
Closed 2 years ago
#4306 closed defect (bug) (fixed)
Plugin Admin: Update Plugin Stats Report to use HelpScout
Reported by: | Ipstenu | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
Currently Stats_Report (plugins/plugin-directory/tools/class-stats-report.php) checks SupportPress
We've moved so we'll need to update those checks to use (I think) the API for HelpScout
https://developer.helpscout.com/mailbox-api/endpoints/conversations/list/
Change History (16)
#1
@
6 years ago
- Summary changed from Update Plugin Stats Report to use HelpScout to Plugin Admin: Update Plugin Stats Report to use HelpScout
This ticket was mentioned in Slack in #meta by tellyworth. View the logs.
5 years ago
This ticket was mentioned in Slack in #meta by ipstenu. View the logs.
5 years ago
#6
@
3 years ago
- Owner changed from tellyworth to dd32
@Ipstenu Two questions:
- Is this still actually wanted?
- What are the stats wanted?
Currently:
** Email Queue Stats ** Total open tickets* : 2633 → (with no activity in last 7 days)** : 2633 Within defined 7 day time window: Total : 0 Closed : 0 Open : 0
The no activity in last-7-days isn't relevant anymore, due to the way HelpScout is being used I think?
Looking at the HelpScout API, here's the relevant parts
Edit: The following queries were made for the past-7-day reporting period
https://developer.helpscout.com/mailbox-api/endpoints/reports/company/reports-company-overall/
"current": { "customersHelped": 330, "closed": 385, "totalReplies": 620, "totalUsers": 3, "totalDays": 7, "repliesPerDay": 89, "resolvedPerDay": 38, "newConversationsPerDay": 35 },
current": { "totalConversations": 414, "conversationsCreated": 249, "newConversations": 249, "customers": 345, "messagesReceived": 568, },
(Quick note on the above: 330 vs 345, there's been 15 new "unseen" emails from people who did not make contact in the past week, that's why the count differs)
It also seems to keep a tally of the number of times a saved reply is used, eg:
{ "name": "Review: Intro to new review", "count": XXX, "percent": X.y }
or how often a Workflow or tag is used
{ "name": "auto-bounce", "count": X, "percent": X.y }
I can also query for the current list of emails in the inbox, for example, there's currently 29 assigned email & 1 new unassigned email.
I've rounded/changed a bunch of numbers above for ease of posting, also removed some stupid stat fields that are invalid (ie. repliesPerDayPerUser: (totalReplies / totalActiveUsers)
is not relevant if 2 of those users only made 2% of total emails)
#7
follow-up:
↓ 8
@
3 years ago
@dd32 Yes, because I have to manually copy/pasta from multiple pages :) Easier == Better. Also it means a future rep may not have to have admin access to HelpScout.
You can see from https://make.wordpress.org/updates/2022/03/28/plugin-review-team-28-march-2022/ that I use a different set which is a raw copy down. I think this is what I would used. "Resolved" isn't worth much since it's not like we really have a final state.
- Total Conversations: 398
- New Conversations: 231
- Customers: 339
- Conversations per Day: 49
- Busiest Day: Tuesday
- Messages Received: 507
- Replies Sent: 579
- Emails Created: 149
#8
in reply to:
↑ 7
@
3 years ago
Replying to Ipstenu:
dd32 Yes, because I have to manually copy/pasta from multiple pages :)
Thanks! Silly me for not looking at your latest updates posts...
I'll get that page updated with the HelpScout details.
"Resolved" isn't worth much since it's not like we really have a final state.
I was about to ask where you're getting that from.. I'll add it if I can figure it out on the API :)
#10
@
3 years ago
@Ipstenu I ended up going with exactly what you posted here, I found the resolved numbers eventually, but it didn't seem to be relevant like you say.
Let me know if this works, and if there's any other changes you'd like made here.
Emails Created: 149
Can you double check this specifically for the last report time period? I've got Emails Created: 177
which I can't tell if it's a bug or the actual number..
Also; It's only just now that I've noticed that Reports
menu within HelpScout where you've been getting this data, up until now I've scoured the HelpScout UI looking for it, and never spotted that...
#11
follow-up:
↓ 12
@
3 years ago
Emails created is off by like 1, which is understandable for a cached API.
This though...
Replies Sent: 0
#12
in reply to:
↑ 11
;
follow-up:
↓ 14
@
3 years ago
- Keywords needs-patch removed
Replying to Ipstenu:
This though...
Replies Sent: 0
Seems the API request timed out, There's 3 different API calls needed for that set of numbers (One of them only needed for replies-sent), I probably should've included some better error handling...
All the API's are returning within 100ms for me, but, I also duplicated this, with the first load of the stats returning 0
for replies sent
- so I guess that API endpoint is rather slow on HelpScouts end until their caching kicks in.
I'll bump the timeout, and throw a visual warning if an API fails to return.
https://developer.helpscout.com/mailbox-api/endpoints/reports/company/reports-company-overall/ looks like it might be the right API to use.