Hi there! I have built an app called agencygo.io
The app ranks digital marketing agencies by a variety of metrics and provides recommendations on how they can improve their agency.
My biggest struggle right now is trying to figure out how to rank agencies within the app.
I understand how to do this on a repeating group that is ranking based on information in the same data type.
But, let’s say, I want to rank a list of “Agency Partners” (Data Type = Users) by amount of “Deals Closed” (Data Type = Deals).
The Deal itself would have an amount, and when that closes, I want to take a list of all “Agency Partners”, get the sum of all Deals closed for each “Agency Partner” and then sort that list based on the sum of Deals closed for each “Agency Partner.”
Does this make sense? How would this be done in the app? Do I need to create a new data field called “Partner Rank” inside the Data Type User?
Then, each day would I run a backend workflow that essentially updates the ranking for each User based on the sum of Deals closed which contain this user?
Finally, would I then print the list of users in the order of their “Partner Rank”?
This is going to be a huge breakthrough for me and my app if someone can help me figure this out, as I am going to be able to unleash the full power of comparative analytics to my agency community.
Specifically, I need to do this:
- Find all deals with the category Payment Received.
- Group by PARTNER (User) and sum each grouped set of deals.
- Sort each group from most Payments Received to least.
- Make changes to each groups User. Modify their Partner Rank to their index in the sorted list in Step 3.
- Display list of Users in Repeating Group by Partner Rank.
- Repeat Steps 1-5 on a daily basis.
P.S. I will tip whoever can answer this the best $100.