function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John ParmentierJohn Parmentier 

Lead Service Route Assignment by Zip Code

In our business process, we have dividied up the State of Michigan into 9 routes that we service with an internal field staff and one region we service using UPS / FedEx. The 9 routes are not distributed by county but rather by zip codes. I was going to develop a custom formula field to assign the appropriate route to Lead records using the commands IF and CONTAINS (i.e. IF (CONTAINS ( "48114:48116", PostalCode ), "Route-4",). However, going this route, I will surely exceed the 1300 character limit.
Is this perhaps a place to employ an S-Control or should I be looking into other options?
Any advice would be appreciated.
Also, if this is a problem that can be solved using an S-Control, I would entertain outsouring the development of the S-Control. If you're interested in talking this problem, let me know.
Greg HGreg H
I had a similar problem a few months ago.  Basically, I needed to maintain a territory assignment on leads based on a number of fields (zip code being one).  We were able to load the leads with an initial territory assignment but over time it became difficult to maintain due to basic information being altered as the leads developed (such as zip code being updated by user).  So we built an sControl to essentially do the logic on the page each time the lead was accessed.
In simple terms, we built an inline sControl and added it to the lead detail page.  When a lead was accessed by users in a very specific profile, the sControl would get triggered and the territory would get updated based on the specific values for the lead.  This allowed us to have users update critical information such as zip code, save the record and then when the detail page was displayed again, the territory would be up-to-date.  For all of this to happen we had to create a custom object for both territory and zip codes.
There may be other options for you to solve your particular problem but I hope this helps you with thinking through some solutions.