Returns the workspace's contact field mappings. After each call is analysed, every mapping copies one value from the call into a field of the call's contact. Change them with Update contact field mappings, and apply them to past calls with Backfill contacts.
Request#
This endpoint takes no path, query or body parameters.
Example request#
curl https://api.tried.com.au/contact-field-mappings \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/contact-field-mappings", {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const { mappings, modes } = await res.json();import os, requests
res = requests.get(
"https://api.tried.com.au/contact-field-mappings",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()Response#
200 OK
{
"mappings": [
{ "contact_field": "first_name", "source": "analysis.caller_first_name", "mode": "fill_if_empty" },
{ "contact_field": "last_outcome", "source": "analysis.call_summary", "mode": "overwrite" },
{ "contact_field": "interests", "source": "analysis.product_interest", "mode": "accumulate" },
{ "contact_field": "crm_id", "source": "metadata.crm.id", "mode": "overwrite" }
],
"modes": ["overwrite", "fill_if_empty", "accumulate"]
}| Field | Type | Description |
|---|---|---|
mappings[].contact_field |
string | first_name, last_name, email, or a custom field name. |
mappings[].source |
string | Where the value comes from. See the sources table below. |
mappings[].mode |
string | How the value is written. See the modes table below. |
modes |
array | The allowed modes. |
Sources:
| Source | Value |
|---|---|
analysis.<field> |
A post-call extraction field, or analysis.call_summary and analysis.user_sentiment. |
variable.<key> |
A dynamic variable of the call, including variables collected during the call. |
metadata.<key> |
A key in the call's metadata. Dots reach nested keys. |
Modes:
| Mode | Behaviour |
|---|---|
overwrite |
Always replace the contact field. |
fill_if_empty |
Set the field only when it is empty. |
accumulate |
Custom fields only: merge the new value with what is there. With an OpenAI key the merge is summarised by the model; without one it is a de-duplicated list joined by "; ". Capped at 1000 characters. On a built-in field it acts as overwrite. |
Empty source values are skipped, and an email mapping is skipped when the value is not an email address.
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.