Hi everyone,
I’m building an app which allows you to collect customer feedback.
Each response is saved to a ‘response’ entity in the database with a value of ‘Great’ ‘Good’ ‘OK’ or ‘Bad’
I’m looking to build some analytics which show you how many of each type of response you got on each day, right now I’m doing it using searches running counts on each phrase which isn’t very efficient.
Does anyone have any ideas on how it would be best to structure a analytics field which stores a numeric value of the counts of each type of response each day?
I’m wondering if it could be calculated using a backend workflow?
Super grateful for any ideas!
James.
Hi there, @jamesdevonport… just a thought, but you could keep a running total per day of each type of response as the feedback is submitted. So, you add fields to the response
data type that store the total for each type of response. Then, in the workflow that creates a thing when feedback is submitted, you add steps to add 1 to the count in the field associated with the thing’s response type only when there is already a thing with the same response on the same day.
With that structure in place, you would always have a thing (i.e., the last response on a given day) you can reference that has the totals of all response types for a particular day. I’m thinking the impact on the workflow to create a new response would be pretty insignificant, and you wouldn’t have do any searches/calculations to get the counts. True, I guess there could be an issue where two customers submit feedback at the same time, and maybe a count gets off by 1 here or there, but I wonder how likely that would be to occur.
Anyway, just food for thought, and if it’s a terrible idea, I’m sure someone will jump in and tell us why you should literally never do what I have suggested.
Best…
Mike
1 Like
Thanks for the suggestion Mike, that does sound like a sensible solution to me, I will have a play with trying to make something along those lines
1 Like
I’m doing something similar in one of my apps but with just Good or Bad as the options.
For my case it’s both daily, monthly, quarterly etc results that are relevant so I I’m doing calculations on the fly.
I’ve given a numeric value to each option (Good = 1, Bad = 0) and with that setup I can use :count and :sum to calculate the results in a percentage. (100 * :sum / :count)
No problems at all re performance so far.
It’s around 20k responses collected so potentially issues in the future as the amount of data grows but all things considered it’s chugging along nicely.
2 Likes
Awesome, good to hear no performance issues!
I like the idea of giving a numeric value to each response, might have to think how I would handle that with 4 options, food for thought
Our customers actually started out wanting 4 options but we persuaded them to go with 2.
They are very happy about that now as it has simplified things by a lot and made it so they have actually acted on the results.
From an analysis perspective you still get lots of valuable information and knowledge from having the two options.