Capture city + LinkedIn on card intake; sharpen the transcription prompt
The card transcription prompt now reads emails/URLs/phones character-by-character, explicitly forbids autocompleting toward a plausible domain (the mara.com -> marac.com failure), and emits labeled lines (which also feeds the field extractor cleaner input). The extractor gains city + linkedin_url. city is a plain field (low-harm if wrong; the human sees it on the card). linkedin_url follows the email-integrity rule: kept only if it literally appears in the source / a revise instruction, never minted -- a wrong profile URL points at the wrong person. Both flow to the contact via the existing log-communication upsert (city also syncs to the grid contact pill). Phone is intentionally NOT included yet: the bot's write path can't store it until a small server-side change lands (next s9pk). See the matrix-intake guide.
This commit is contained in:
@@ -15,11 +15,21 @@ def test_new_investor_payload():
|
||||
assert out["investor_name"] == "Acme Capital"
|
||||
assert out["create_investor_if_missing"] is True
|
||||
assert "row_id" not in out
|
||||
assert out["contact"] == {"name": "Jane Doe", "email": "jane@acme.com", "title": "GP"}
|
||||
assert out["contact"] == {"name": "Jane Doe", "email": "jane@acme.com", "title": "GP",
|
||||
"city": "", "linkedin_url": ""}
|
||||
assert out["body"] == "met at conf"
|
||||
assert out["source"] == "matrix_intake"
|
||||
|
||||
|
||||
def test_contact_carries_city_and_linkedin_when_present():
|
||||
p = {"intent": "new_investor", "investor_name": "Acme Capital", "contact_name": "Jane Doe",
|
||||
"contact_email": "jane@acme.com", "city": "New York",
|
||||
"linkedin_url": "linkedin.com/in/janedoe", "note": "met at conf"}
|
||||
out = crm_client.build_commit_payload(p)
|
||||
assert out["contact"]["city"] == "New York"
|
||||
assert out["contact"]["linkedin_url"] == "linkedin.com/in/janedoe"
|
||||
|
||||
|
||||
def test_existing_investor_uses_row_id_not_create():
|
||||
p = {"intent": "meeting_note", "investor_name": "Acme Capital",
|
||||
"contact_name": "Jane Doe", "contact_email": None, "note": "wants Q3 deck",
|
||||
|
||||
Reference in New Issue
Block a user