Skip to main content
It would be great if we could rank accounts in the Rules Engine, similar to ranking in Report Builder. For example, ranking accounts so that only X number receives a certain CTA or action. A specific use case would be ranking our top 50 customers by spend to automatically generate CTAs and other field triggers as part of our top 50 customer engagement program.

Great request, Calvin - I'm adding my vote.

I like the fact that this could also satisfy another much-requested rules-engine enhancment: the ability to select the "most recent" of a series based on a date.

Right now, to get the 'most recent' record, MaxDate has to be grabbed from the larger data set then joined back into that larger set to "flag" the record that's most recent.

The same "ranking" feature in Transformations would allow you to select the "Top 1" by a date for the most recent record in the same way that "Top 50" might allow all contacts with the top 50 health scores to be selected.

NOTE: I think this ranking has to be allowed within sub-groups - treated as another aggregator, essentially - so the top 5 or "x" within, say, each Customer Type could be selected.


Great suggestion Calvin!

A function like TOP, LIMIT, or RANK in rules engine would be quite useful!


Jumping on here with a vote to rank not just customers, but any records. I may want to find the Contacts with the most pageviews, regardless of their Accounts, for example.


I concur with all of you, need rank() over partition by kind of function in rules


+1

Ranking opportunites would be another use case. If a customer has multiple contract/Oppts. I have a use case for ranking them by contract start date.


Great suggestion! I want ranking sort in Rule Engine, too.

When I sort by count field which I created with Rule engine tasks,

We can update data from small count to large count.

It indicates we can update most large count record's data to the updated records.


I was looking for this exactly today, thanks Scott.

Right now, to get the 'most recent' record, MaxDate has to be grabbed from the larger data set then joined back into that larger set to "flag" the record that's most recent.


+1 for me, any updates? This would be great. We would like to use ranking in rules engine for several areas: 

Contact level reporting for Top 50 accounts on a dashboard  (Being able to use a tile report with ranking would be...incredible...so, double bonus if that became possible) 

Use in Journey Orchestrator - sending emails to Top X accounts in different segments or by territory

Potentially help prioritize CTAs for some of our high volume touch teams>currently we use a score to sort for this team, but could see this functionality making a ‘sort’ logic much easier 


We have many use cases where we are looking for the Top X and these functions would be great if we could have then integrated into the the product. 

Examples that we have: Support Incidents that we are ingesting - What are the top kinds of support incidents? 


Hi All,

This is a great idea, I can see how this is useful. I’ve added this to the roadmap and will push any updates. 


Hi @rakesh , any updates on this?


Hi @rakesh !

One of my customer was also looking for this feature to limit the number of CTAs created by a rule (ex - 50 a day)? Or is there a data function in Gainsight rule that shows the top x rows? Do we have any ETA?

 My users are only generating a type of retention CTA for customers who are at high risk. Due to the workload limit of our team members, we need to cap the number of this CTA to around 50 a week. Therefore, we need to be able to get the top 50 risk scores. Right now, we plan to pull the data out of Gainsight, calculate the top 50 and then enter that into gainsight back manually.

ccing @saewonpark 


+1 for our org as well. While the method outlined here is awesome, it’s not feasible past a few records. I need top 300. No way I’m doing all those merges.


Hi All.

I came across this use case recently, and I have calculated the Rank through Rules.

Here is the details. 

 

Thanks.


@rakesh

Any updates on this? 


We need to use this functioanality to prevent massive email sends to customers and our use case is: 

 

As a Gainsight Admin/Program manager, I ONLY want to send emails to the top “X” number of contacts at a customer in order to prevent potential blacklisting. 

Additionally, being able to send to contacts that have done a “thing” in the last “X” days also would be cool (and configurable by filters) but we are presently unable to limit the results, especially by Account. 

This would go a long way within JO to help prevent spam and excessive emailing to the customer and also decrease load on the system :) 


Hi Gainsight team,

Our requirement is to send quarterly NPS survey. The contacts from each company would be distributed in four equal groups. First Quarter, the first group of contacts will get the survey. Second quarter, the second group will get and so on. To achieve the grouping of contacts, we are currently using Excel. If Ranking() or Row number() functionality is made available in Gainsight rules engine or JO query builder, we would be able to automate the process.


We need this so badly! Please reference my Community post here for my use case: 

 

 

Also you can see in this screenshot what I had to do just to rank 5 dates and 5 numbers. If there was a ranking formula, I think I could cut out about 80% of these transformations and merges.

 

 


@rakesh Any updates in this becoming a function instead of an obscene amount of transforms and merges? 


Wild that this 6-year-old post having 50+ upvotes, still has the status as “New Idea” and not “Acknowledged” 

@revathimenon Can we please get some eyes on this request? The fact that for get such a simple thing we have to create 10 steps as highlighted in Calculating Rank using existed field value in Rules post is mind boggling. 


Adding my voice to this request as I am coming across the need to segment customers by being top x number of a CSMs book of business. This is not an uncommon request in our industry and shouldn’t be as difficult as it is with current functionality.


Chiming in here, since it seems I haven’t yet.

We had a report in one of our emails leveraging an external (Domo) ranking X by Y.

The fact that we had to resort to an external system to create that data and then bring it into a Gainsight object to use it in one of our programs doesn’t make sense. Particularly since the request had to be managed by a separate team. It’d be so much easier to be able to build that directly in a report/DD template, without having to go through multiple systems and complex dependencies.