This question runs in a pre-configured Salesforce environment - no personal connection required.
Query Accounts and assign them to territories based on BillingState, returning a Map where the key is the region name and the value is a List of Account names. The territories are defined as follows: West region includes CA, WA, OR, NV, AZ; Central region includes TX, IL, CO, MO, MN; East region includes NY, FL, MA, PA, NC. Accounts with null or unmapped states should be assigned to the Other territory.
Examples:
Input: No parameters (queries all Accounts)
Output: Map with keys West, Central, East, Other containing Lists of Account names
Explanation: Accounts are grouped by region based on BillingState
Input: Account with BillingState = CA
Output: Account name appears in West region list
Explanation: California is in the West territory
Input: Account with BillingState = null
Output: Account name appears in Other region list
Explanation: Null states go to Other territory
Welcome to Lightning Challenge!
How It Works
- • Write your solution in the code editor
- • This challenge runs without connecting your own org
- • Submit to check if your solution passes
- • Use hints if you get stuck
Contest Alert
Contest runs July 1 - 31. Complete challenges to climb the leaderboard!
Only the 31 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.