Getting started with Conversation Memory
To use Conversation Memory, you'll need to provide Twilio access to your Twilio Conversations.
Twilio Conversations turns messaging (SMS, RCS, and WhatsApp) and Voice traffic into normalized conversations with participants, communications, and identity built in. Conversation Memory creates a profile for each participant, extracts text snippets, and saves them to the profile to personalize future conversations.
To get started with Conversation Memory:
A memory store is a container for customer profiles. Each profile contains:
- Conversational Memory: Contextual text snippets captured from conversations with your customer.
- Factual Memory: Facts about a profile, including identifiers, traits, and events.
You can create more than one memory store per account to separate profiles as needed.
To create a memory store:
- In the Console, go to Products & services > Conversation Memory > Overview.
- If you haven't already done so, click Upgrade your account for full access, then click Upgrade account.
- Click Get started.
- Twilio creates and names your Memory store. To edit this name, go to Settings > Edit settings, update your Memory store name and description, and click Save.
Profiles and all associated data are unique to each memory store
If your Twilio account has multiple memory stores (for example, to separate sandbox from production data), you might encounter duplicate profiles for a customer. There is no way to reconcile profile data across memory stores.
From the Conversation Memory overview page, set up a conversation configuration. This step is optional but recommended — it allows Twilio to use conversations data to create and update customer profiles.
Conversation configurations define the data types used to create customer profiles, store conversations, and resolve interaction data into profiles.
To set up conversation configurations:
- From the Overview page (Conversation Memory > Overview) click Set up Twilio Conversations.
- Add a conversation configuration friendly name and description.
- On the Configure lifecycle page, configure your default lifecycle and conversation timeout.
- Basic: Conversations move from Open to Closed.
- Include "inactive" state: Conversations move from Open to Inactive (no active streaming data, but can be reopened) to Closed.
- Conversation timeout is how long after the last customer communication the conversation moves to Closed. Conversation Memory only creates new observations from Inactive or Closed conversations. If you don't set a timeout, Twilio applies the default conversation timeouts.
- Select phone numbers to capture communications traffic from, then click Create conversation configuration.
- To enable Observations, select the Turn on observations and summaries checkbox. This automatically extracts observations and summaries from Twilio Conversations.
- You can turn Observations on or off at any time. Go to Data sources, select your conversation configuration, and click Edit.
- From the Summary screen, review your settings, then click Create Conversation Configuration.
After setup, go to Products & services > Conversation Orchestrator > Conversation Configurations to view and manage your configurations.
If you set up one conversation channel, Twilio applies the default for that channel. If you set up two or more conversation channels, Twilio applies the longest conversation timeout to all channels.
Traits are structured facts about a customer (for example, name, location, subscription status, or tier) that appear as fields on their profile. You can organize traits into trait groups for consistency.
Configure traits and trait groups from the Traits tab or the onboarding wizard's Configure traits and identifiers option.
Use the Traits tab for the following actions:
- Add trait groups
- Add traits
- Delete trait groups and traits
Trait groups organize similar traits into a single object, making it easier for agents to consistently reference information across customer interactions.
Trait groups include one default group, Contact, which contains first name, last name, phone number, and address. You can create additional groups for other customer attributes like preferences, behaviors, or interests.
Trait group assignment is permanent
You can't move a trait from one trait group to another. Carefully consider trait categorization before assigning a trait to a trait group.
To add a trait to an existing trait group:
- In the Console, go to Products & services > Conversation Memory > Settings.
- Select Traits, identify the trait group you'd like to update, and click + Add trait.
- On the Add trait side sheet, enter a name for your trait, select a data type, and enter a brief description.
- When you're finished, click Save.
On the Traits page of the Conversation Memory settings, you can create trait groups by selecting + Add trait group. You can delete trait groups by selecting Delete trait group under the trait group's header.
To add traits to a trait group:
- In Conversation Memory go to Traits and select the trait group you'd like to add traits to.
- Select + Add Trait.
- Add a unique name for the trait.
- Select a data type (string, number, boolean, or array).
- Add a description for the trait.
- Click Save.
You can also delete a trait field from a group by selecting the more actions (ellipsis) and selecting Delete trait field.
Identifiers are unique pieces of customer data, such as email addresses, phone numbers, or user IDs. Conversation Memory uses identifiers to match events and data to individual customers.
You can configure identifiers by clicking Configure traits and identifiers in the onboarding wizard or by selecting the Identifiers tab to add identity rules, edit priority rankings, and delete rules.
Note the following default Identity Resolution rules for Conversation Memory:
phoneemailwhatsappidchat
You can also create custom ID rules such as user_id or other fields.
Learn more about Identity Resolution in Conversation Memory.
Identity rules are the logic that determines how identifiers are used to create, match, and merge profiles.
To add Identity Resolution rules:
- In your Memory store, select Identifiers.
- Click Add identity rule.
- Define your Identity Resolution rules. You can define Identity Resolution rules in one of two ways:
- With the API: Create a rule and send identifier values directly with the API. Use this method when the identifier does not exist as a stored trait/field in your memory store.
- Mapping Traits: Select an existing trait from the Select traits drop down menu or create a new one from the traits settings page. When you're finished defining your rules, click Next.
- Rank the priority of your identifiers then click Next. New rules are added lowest priority by default.
- Confirm your Identity Resolution rules and priority rankings, then click Create rule.
Identifier resolution priority determines the search order and conflict resolution when an incoming event (like a message) matches multiple identifiers.
To edit Identity Resolution priority rankings:
- Click Edit priority from the Identifiers tab.
- From the side modal, you can select or drag and drop identifiers based on your preferred priority.
- Click Save.
You can use the Identifiers tab to edit or delete Identifier rules.
To edit identifier rules:
- Under Actions click the more actions (ellipsis) and select Edit rule.
- On the Edit identity rule screen edit your name, limit, map additional traits, and edit priority rankings.
- Click Save changes.
To delete identifier rules:
- Under Actions click the more actions (ellipsis) and select Delete rule.
- Confirm by selecting Delete rule. Note that deleting an identity rule means that traits associated with it will no longer be used to merge and match profiles. This change does not affect historical merges.
Once you've set up a memory store and a conversation configuration, you can upload a CSV file to add or update user profiles and traits.
To upload a CSV file:
- In the Console, go to Products & services > Conversation Memory > [Your Memory Store] > + Add profiles.
- On the Select a CSV page, select a CSV file to import and click Next. You can use the provided CSV template to ensure your CSV is formatted correctly.
- On the Map CSV columns page, you can decide if you want to import the data in each CSV column. For the columns you want to import, you can map your data to existing trait groups and traits.
- When you've finished mapping your CSV data to trait groups and traits, click Complete.
When uploading CSV files:
- You can only upload CSV files.
- Upload one CSV file at a time.
- Each file can have up to 1,000,000 rows.
- Each file can have up to 100 columns.
- Your data must include at least one of the default identifiers (
phone,email, orwhatsappid). You must include both an identifier column and a value for each row. - Files can't be empty and must include at least two trait columns.
- You can't have multiple columns with the same header.
- Your CSV file can't include traits with trailing, leading, or multiple consecutive spaces between characters, or unallowed characters.
Empty values and deletions
The following applies to empty cells and special values:
- Empty cells (both completely empty and
"") overwrite existing trait values with an empty string. For example, if a profile hasfirstName = "ExampleName", an empty cell in the firstName column changes it tofirstName = "". - The
\Nvalue deletes traits completely from the profile. For example, if a profile hasfirstName = "ExampleName", entering\Nin the firstName column removes the firstName trait from the profile entirely.
You can use these characters in your CSV file:
- Alphabetic English characters in both upper and lower case
- The numerals 0-9
- These special characters:
!@#$%^&*()_+-=[]{}:\\|.\`~<>\/?
- The following non-English characters:
1àáâäǎæãåāçćčċďðḍèéêëěẽēėęğġgg͟hħḥh̤ìíîïǐĩīıįķk͟hłļľl̥ṁm̐òóôöǒœøõōřṛr̥ɽßşșśšṣs̤s̱sțťþṭt̤ʈùúûüǔũūűůŵýŷÿźžżẓz̤ÀÁ2ÄǍÆÃÅĀÇĆČĊĎÐḌÈÉÊËĚẼĒĖĘĞĠGG͟HĦḤH̤ÌÍÎÏǏĨĪIĮĶK͟HŁĻĽL̥ṀM̐ÒÓÔÖǑŒØÕŌŘṚR̥ɌSẞŚŠŞȘṢS̤S̱ȚŤÞṬT̤ƮÙÚÛÜǓŨŪŰŮŴÝŶŸŹŽŻẒZ
To import your profile data, you'll add traits and groups in Conversation Memory, then map each column in your CSV to a customer profile trait.
To map customer data to a trait, select the trait group and trait you'd like to map to the column.
Trait group assignment is permanent
You can't move a trait from one trait group to another. Carefully consider trait categorization before assigning a trait to a trait group.
If you don't want to import a specific column, you can leave it unmapped or deselect its Import? toggle.
After you upload a CSV, Twilio returns a status of Completed or Failed.
Completed files were successfully ingested into Conversation Memory.
Info
Twilio shows Completed status both for files where all of the rows were successfully ingested and for files that contained fewer than 100 rows that failed on ingestion.
Failed files weren't ingested into Conversation Memory because there was either an internal server error or Twilio was unable to ingest more than 100 rows in your file.
To view more details about an uploaded file, go to Products & services > Conversation Memory > Data sources > CSV Upload and select the file.