How It Works
Contact memory is built through a pipeline that runs automatically after every conversation:Post-call analysis extracts structured data
After each call or chat, your agent’s post-call analysis configuration extracts key information from the conversation transcript — things like preferences, action items, objections, or any custom fields you define.
Analysis data maps to contact fields
The extracted data is written to contact fields using your configured analysis data mappings. Each mapping specifies an update mode that controls how new data combines with existing data.
Contact fields are available as dynamic variables
On the next conversation with the same contact, all contact fields — including the accumulated memory — are automatically injected into the agent’s prompt as dynamic variables.
Setup Guide
Step 1: Define Post-Call Analysis Fields
Create post-call analysis fields on your agent that extract the information you want your agent to remember. Navigate to your agent’s Post-Call Analysis tab and add fields. Example fields for contact memory:| Field Name | Type | Description |
|---|---|---|
customer_preferences | Text | Extract any stated preferences, requirements, or constraints the customer mentioned. |
key_topics | Text | Summarize the main topics discussed and any decisions made. |
action_items | Text | List any follow-up actions, commitments, or next steps agreed upon. |
objections | Text | Capture any concerns, objections, or hesitations the customer raised. |
Step 2: Create Contact Custom Fields
Navigate to Contacts > Contact Fields and create custom fields to store the accumulated memory. These fields will hold the merged data across all conversations. Example contact fields:| Field Name | Type | Description (used as the LLM merge instruction) |
|---|---|---|
preferences | String | A consolidated list of this contact’s preferences and requirements across all conversations. When merging, update changed preferences and keep unchanged ones. Deduplicate. Format as a bullet list. |
interaction_history | String | A running summary of all conversations with this contact. Include key topics, decisions, and outcomes. Keep the most recent interaction prominent while preserving important context from earlier conversations. Limit to the 10 most recent interactions. |
pending_actions | String | Outstanding action items and commitments. When merging, mark completed items as done if the new conversation indicates completion. Add new action items. Remove items that are no longer relevant. |
objections_and_concerns | String | A deduplicated list of objections or concerns raised across all conversations. When merging, add new concerns without repeating existing ones. Note if a previously raised concern has been resolved. |
Step 3: Map Analysis Fields to Contact Fields
Navigate to Contacts > Contact Fields and configure post-call data mappings for each field. Map each post-call analysis field to its corresponding contact field and select the Merge update mode.| Analysis Field | → | Contact Field | Update Mode |
|---|---|---|---|
customer_preferences | → | preferences | Merge |
key_topics | → | interaction_history | Merge |
action_items | → | pending_actions | Merge |
objections | → | objections_and_concerns | Merge |
Analysis data mappings are configured at the organization level, not per agent. As long as any agent’s post-call analysis produces a field with the mapped name, the value will be written to the contact. This means memory accumulates across all agents that interact with the same contact.
Step 4: Reference Memory in Your Agent Prompt
Use dynamic variables to inject the accumulated memory into your agent’s prompt. When a call connects to a known contact (matched by phone number), all contact fields are automatically available.Sync Memory to Your CRM
If you have a CRM integration connected, you can push the accumulated contact memory back to your CRM using outbound sync mappings. This keeps your CRM records enriched with insights from every AI conversation.| Retell Contact Field | → | CRM Field |
|---|---|---|
preferences | → | Customer_Preferences__c / customer_preferences |
interaction_history | → | AI_Interaction_Notes__c / ai_interaction_notes |
pending_actions | → | Pending_Actions__c / pending_actions |
Best Practices
- Keep memory fields focused. A single field that tries to capture everything produces noisy, hard-to-use context. Create separate fields for distinct categories (preferences, history, action items) so each one stays clean and useful.
- Write specific merge descriptions. The field description controls how the LLM merges values. “A running summary of interactions” is too vague. “A chronological summary of the last 10 interactions — include key topics and outcomes, drop greetings and small talk” gives the LLM clear instructions.
- Set size limits in merge descriptions. Without limits, merged fields grow unboundedly. Include instructions like “Limit to 10 most recent interactions” or “Keep under 500 words” to prevent fields from becoming too large for the agent’s context window.
-
Use “Overwrite” for status fields, “Merge” for history fields. A field like
lead_statusshould always reflect the latest value — use Overwrite. A field likeinteraction_historyneeds to accumulate across conversations — use Merge. - Use “Fill if empty” for stable facts. Fields like email address or company name rarely change. Use “Fill if empty” so they’re captured on first mention without being overwritten by later extractions.
- Backfill from past conversations. If you set up memory fields after conversations have already occurred, use the batch rerun feature to populate contact fields from historical conversation data.
- Test with real conversations. After configuring your memory pipeline, make a few test calls to the same contact and verify that the contact fields accumulate correctly. Check the contact detail page to confirm the merged values make sense.

