Contact field mappings turn what was said on a call into structured contact data. After each analysed phone call, each mapping copies one value from the call into one field on the caller's Tried contact. CRM sync then pushes those fields to your CRM through its field_mapping.
call -> contact field mapping -> Tried contact -> CRM field_mapping -> CRM recordSet up mappings#
Go to Settings, Integrations, Contact memory & fields. Under Contact fields from post-call data:
- Press Add mapping.
- Enter the contact field (for example
intent). - Enter the source (for example
analysis.intent). - Pick a mode: Overwrite, Fill if empty or Accumulate & summarize.
- Press Save mappings.
Sources#
| Source | Reads |
|---|---|
analysis.<field> |
A Post-Call Extraction field from call_analysis.custom_analysis_data. Dotted paths reach into objects |
analysis.call_summary |
The call summary |
analysis.user_sentiment |
Positive, Negative, Neutral or Unknown |
analysis.call_successful, analysis.in_voicemail |
The built-in flags, as true or false |
variable.<name> |
A dynamic variable from the call. Collected variables win over the variables the call started with |
metadata.<key> |
A metadata value. Dotted paths reach into objects, for example metadata.sip_headers.x-clinic-id |
Empty and missing values are skipped, so a mapping never clears a field. Objects and arrays are stored as JSON strings.
Contact fields#
| Target | Notes |
|---|---|
first_name, last_name |
Built-in fields |
email |
Built-in. Values that are not a valid email address are skipped |
| Anything else | A custom field, created on first write. Letters, digits and _, up to 64 characters |
Custom fields are available to agents as dynamic variables on later calls from the same number.
Modes#
| Mode | Behaviour |
|---|---|
overwrite |
Always replace the field with the new value |
fill_if_empty |
Set the field only when it is empty. Good for names and emails |
accumulate |
Merge the new value with the existing one into one summary, up to 1,000 characters. Custom fields only; on built-in fields it acts like overwrite |
accumulate uses an LLM to merge the two values, keeping distinct facts and preferring the newer value on conflicts Needs keys. Without an OpenAI key (or if the request fails), values are joined with ; , duplicates removed, and the oldest parts dropped when the text passes 1,000 characters.
Order after a call#
- Post-call analysis is stored and
call_analyzedis sent. - Contact field mappings are applied.
- Contact memory is rewritten for agents that save conversations to memory.
- Connected CRMs receive the updated contact and a call note.
API#
GET /contact-field-mappings returns the mappings and the allowed modes. PUT /contact-field-mappings replaces them (admin or developer role, up to 50 mappings).
curl -X PUT https://api.tried.com.au/contact-field-mappings \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mappings": [
{ "contact_field": "first_name", "source": "variable.patient_name", "mode": "fill_if_empty" },
{ "contact_field": "intent", "source": "analysis.intent", "mode": "overwrite" },
{ "contact_field": "history", "source": "analysis.call_summary", "mode": "accumulate" },
{ "contact_field": "clinic", "source": "metadata.sip_headers.x-clinic-id", "mode": "overwrite" }
]
}'{
"mappings": [
{ "contact_field": "first_name", "source": "variable.patient_name", "mode": "fill_if_empty" },
{ "contact_field": "intent", "source": "analysis.intent", "mode": "overwrite" },
{ "contact_field": "history", "source": "analysis.call_summary", "mode": "accumulate" },
{ "contact_field": "clinic", "source": "metadata.sip_headers.x-clinic-id", "mode": "overwrite" }
],
"modes": ["overwrite", "fill_if_empty", "accumulate"]
}| Field | Type | Description |
|---|---|---|
contact_field |
string | Target field |
source |
string | analysis.<field>, variable.<key> or metadata.<key> |
mode |
string | overwrite (default), fill_if_empty or accumulate |
Backfill past calls#
Backfill contacts (or POST /backfill-contacts) links ended phone calls that have no contact to one, creating contacts as needed, and re-applies the mappings oldest call first, so later calls win for overwrite.
| Field | Type | Default | Description |
|---|---|---|---|
from, to |
integer | none | Call creation time range, Unix ms |
agent_ids |
string[] | all | Only these agents' calls |
limit |
integer | 1,000 | 1 to 5,000 calls |
apply_mappings |
boolean | true |
Re-apply mappings to calls that already have a contact |
{ "calls_scanned": 318, "calls_linked": 41, "contacts_created": 12, "contacts_updated": 205 }Backfill updates Tried contacts only. Run a CRM sync job afterwards to push the results.
From contact field to CRM field#
Once a contact field is filled, map it in the CRM connection's field_mapping:
{ "hs_lead_status": "intent", "message": "history" }See CRM sync.