The dataset viewer is not available for this dataset.
Error code: JWTInvalidSignature
Exception: InvalidSignatureError
Message: Signature verification failed
Traceback: Traceback (most recent call last):
File "/src/libs/libapi/src/libapi/jwt_token.py", line 286, in validate_jwt
decoded = jwt.decode(
jwt=token,
...<2 lines>...
options=options,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jwt.py", line 368, in decode
decoded = self.decode_complete(
jwt,
...<8 lines>...
leeway=leeway,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jwt.py", line 265, in decode_complete
decoded = self._jws.decode_complete(
jwt,
...<3 lines>...
detached_payload=detached_payload,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jws.py", line 270, in decode_complete
self._verify_signature(
~~~~~~~~~~~~~~~~~~~~~~^
signing_input,
^^^^^^^^^^^^^^
...<4 lines>...
options=merged_options,
^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/jwt/api_jws.py", line 417, in _verify_signature
raise InvalidSignatureError("Signature verification failed")
jwt.exceptions.InvalidSignatureError: Signature verification failedNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Geospatial Lead Routing Architecture (Construction/Field Tech)
Goal: Route leads based on precise municipal jurisdiction, not just Zip Code. Stack: Salesforce Flow -> Google Maps API -> Custom Routing Engine Model: Gemini 3 Pro (for complex context window analysis).
1. The Logic Flow
Standard CRM routing fails for construction because "Austin" projects often fall into "Travis County" jurisdiction. This mismatch causes leads to rot in general queues.
The Fix:
- Extract raw address from Lead Form.
- Pass to Geocoding API to resolve "Municipality/Jurisdiction" (not just City).
- Match against
Territory_Mapcustom object. - Assign to the specific Rep covering that Permit Office.
2. The Routing Architecture
graph TD
A[Inbound Lead] --> B{Geocoding API}
B --> C[Resolve Municipality]
C --> D{Check Territory Map}
D -- Match Found --> E[Assign to Territory Rep]
D -- No Match --> F[Assign to Expansion Queue]
E --> G[Trigger SLA Timer (4h)]
3. The Agent Prompt (for n8n / LangChain)
System Prompt:
You are a Territory Routing Agent for complex physical jurisdictions.
Input: A raw address string from a web form (e.g., "123 Ranch Rd 620, Austin, TX"). Tools: Google Maps Geocoding API, Salesforce API. Model: Gemini 3 Pro (to handle unstructured location data).
Step 1: Normalize.
- Use Geocoding API to determine the exact administrative area (City vs. County vs. Unincorporated).
- Example: "Address is in Travis County jurisdiction, NOT City of Austin limits."
Step 2: Match.
- Query Salesforce
Territory__cobject for this specific jurisdiction.- Identify the assigned Rep ID.
Step 3: Route.
- Update the Lead owner to the assigned Rep.
- If the Rep is "Out of Office" (check Calendar API), round-robin to the backup.
- Post a message to #sales-leads: "New Project in [Jurisdiction] assigned to [Rep Name]."
- Downloads last month
- 3