Feature #3947
closedFeature #3945: User Story: Integrate Places API for Lead Location
User Story 2: Frontend – Location Field in Lead Management - #3945
0%
Description
As a Sales User
I want the Location field in Lead Management forms to provide autocomplete suggestions
So that I can quickly select an accurate place in New Jersey.
Acceptance Criteria
Location Field in Create/Edit Lead Form
Typing into the field triggers API call to backend (/api/places/search).
Show autocomplete dropdown with suggestions.
Selecting a suggestion fills in the field with formatted address.
Data Saving
Save the following in lead record:
Formatted address
City, State, Zip
Latitude, Longitude
Validation & Fallback
User must select a valid location from suggestions.
If API fails, allow manual entry but mark as "Unverified".
Performance
Apply debounce (300–500ms) to avoid multiple requests.
Show loader/spinner while fetching results.
🧪 Test Scenarios
Typing “Newark” shows dropdown suggestions restricted to NJ.
Selecting a suggestion saves correct formatted address + coordinates.
Saving lead with valid location stores details in DB.
If API fails, manual input still allowed but saved as “unverified”.
API calls only fire after debounce delay.
Subtasks
Related issues