You need to sign in to do that
Don't have an account?
Dynamically rank Accounts based on volume.
I’ve been tasked with automatically ranking our Accounts based on the qty listed in a "projected volume" field. Any suggestions?
Thanks in advance!
Ben
Thanks in advance!
Ben
By ranking Accounts I'm assuming you want to update the Rating(i.e the standard picklist field in accounts object) with one of the option depending on value in 'Projected Volume' field.
Now how does 'Projected Volume' gets updated...I mean does some inserts the value manually or is this a formula field/roll'up summary field ?
I think you can write a Workflow Field update to update the Rating field with the appropriate option when 'Projected Volume' changes.
Create a Workflow Rule on Account with the Evaluation Criteria as 'created, and any time it’s edited to subsequently meet criteria' and Rule Criteria as 'Projected Volume' not equlat to null AND 'Projected Volume' > minvalue AND 'Projected Volume' < maxvalue (minvalue & maxvalue is the range for which you'd like the Rating to hold a certain picklist value) and then add the Field Update Workflow Action and select the Appropriate picklist value.
You'll have to create multiple Workflow rules, one rule for each picklist value that you have in Rating field.
Hope this helps, there is also also an alternative way to do it by adding a Trigger on Account object, but I prefer the non apex way.
Thanks,
Mohammed
Thanks very much for taking the time to respond in such detail! I'm actually looking for a method of "ranking" Accounts. (as to "rating" them)
Additionally, I'm only looking to "rank" our Top 100 Accounts. These Accounts are manually included on our Top 100 list via an "Is Top 100 Account" checkbox.
Thanks again for you input!
Ben
I think you can do this via work workflow, just add the condition('Is Top 100 Account' equals to TRUE) in Rule Criteria before checking the 'Projected Volume' value
Thanks,
Mohammed
Let's say the Account ranked 30th has a projected volume (PV) of 19K units, and the Account ranked 29th has a PV of 20K units, the WFRs would need dynamically evaluate the PV of all Accounts and assign a rank accordingly in order to promote the 30th ranked Account to 29th (or any other rank) upon PV value change. From what I understand, the only plausable solution would be to write some sort of trigger that would fire whenever a PV field is updated. But... alas... I know slightly less than nothing about writting triggers.
Thoughts?
Thanks,
Ben
-------------------------------------------------------------------------------------------
trigger accountRankings on Account(after insert, after update){
for(Account acc : trigger.new)
{
if(acc.Projected_Volume__c != Null && (trigger.isInsert || (trigger.newMap.get(acc.id).Projected_Volume__c != trigger.oldMap.get(acc.id).Projected_Volume__c))
{
else return;
//I'm assuming that - we need to rank top 100 accounts by Projected Volume.
//if you need more accounts then change the row limit
List<Account> accountList = [Select Projected_Volume__c, Rating from Account ORDER BY Projected_Volume__c DESC Limit 100];
if(!accountList.isEmpty()){
for(Integer i = 0 ; i < accoutListSize; i++)
{
accountListSize -= 1;
update accountList;
Did you ever resolve this? I am facing a somewhat similar challenge and am hoping you were able to solve this and be willing to share some tips.
Thanks!