Skip to main content
Hi All,

 

Is there any better way to assign the Territories on the Lead Object whenever it is created or edited. 

 

Currently, we are using Process Builder and recently we have noticed that it is causing the SOQL 101. 

 

Is there any article available which tells the best practices to do this automation? 

 

Please see attached image for the Process builder, you can see node 1 for APAC-ANZ-ACT which checks Country and State in a Criteria and then updates the Territory/Region/Sub-region field on Lead. Similarly, we have such 52 nodes.

 

Automatically update the Territory fields on Lead Object

 

Do you suggest if I should use a negate criteria on the top node which checks- 

 

NOT(ISCHANGED(Country)) &&

 

NOT(ISCHANGED(State))

 

along with below criteria in each node -

 

ISCHANGED(Country) OR ISCHANGED(State)

 

Please let me know your thoughts on this. 

 

Thanks!
2 answers
  1. Jan 11, 2021, 12:21 PM
    Hi Vishal,

     

    Yes, I am also planning to migrate to Flow now. So, right now I have created a Decision which validates the Country and State and then Assignment to update the Territory info on Lead.

     

    But the thing is that there will be close to 52 combination for Country and State decisions and then I will have to create same number of assignment. Please see attached screenshot.

     

    Hi Vishal, Yes, I am also planning to migrate to Flow now. So, right now I have created a Decision which validates the Country and State and then Assignment to update the Territory info on Lead.

     

    So I need to know that if there is any way to optimize it by using formula or something?

     

    Thanks!
0/9000