---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/segment/connections/destinations/catalog/actions-memora#article
headline: Conversation Memory (Actions)
description: Use the Conversation Memory (Actions) Segment destination to sync and upsert customer profile data from Segment into a Twilio Conversation Memory Store.
url: https://www.twilio.com/docs/segment/connections/destinations/catalog/actions-memora
inLanguage: en
dateModified: 2026-09-25T17:35:58.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Conversation Memory (Actions)

> \[!NOTE]
>
> The Segment Conversation Memory Integration is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI.

The Conversation Memory destination is a server-to-server integration that syncs profile data from Segment directly into [Conversation Memory](/docs/conversations/memory). Use this destination to create customer profiles and keep them up-to-date in a Conversation Memory Store, supporting downstream workflows that depend on rich, up-to-date profile data.

## Benefits of Conversation Memory (Actions)

The Conversation Memory (Actions) destination provides the following benefits:

* **Simplified setup**: Data mapping for actions-based destinations happens during configuration, eliminating the need for manual setup.
* **Clearer data mapping**: Actions-based destinations let you define exactly how fields from your Segment events map to traits in your Conversation Memory Store.
* **Dynamic field discovery**: Segment loads identifiers and traits directly from your Conversation Memory Store, so mappings always reflect your actual store schema.
* **Batch support**: Segment batches profile upserts of up to 1,000 profiles per request, which reduces API call overhead.
* **Merge behavior**: When a profile already exists, Segment merges traits into the existing profile, overwriting existing keys and adding new keys.

## Getting started

Before connecting to the Conversation Memory destination, you must have a [Twilio account](https://1console.twilio.com/) that has Conversation Memory configured.

To connect the Conversation Memory destination:

1. From the [Segment web app](https://app.segment.com/login), go to **Connections > Catalog**.
2. Search for **Conversation Memory** in the Destinations Catalog and select the destination.
3. Click **Configure Conversation Memory**.
4. Select the source that will send data to Conversation Memory and follow the prompts to name your destination.
5. On the **Basic Settings** page, enter:
   * **API Key**: Your Twilio API Key, found in the [Twilio Console](https://1console.twilio.com/go?to=/account/__account__/settings/us1/api-keys/list) under **Builder tools** > **API Key & creds**.
   * **API Secret**: Your Twilio API Secret, provided when you create an API Key.
   * **Twilio Account ID**: Your Twilio Account SID, found at the top of your [Twilio Console homepage](https://1console.twilio.com/go?to=/account/__account__).
6. Go to the **Mappings** tab. Click **New Mapping** and select **Upsert Profile**.
7. In the mapping configuration:
   * Select a **Conversation Memory Store** from the dropdown. Segment loads available stores from your Twilio account.
   * Map **Profile Identifiers**: these are the identifier traits from your store (for example, `Contact.$.email`, `Contact.$.phone`).
   * Optionally map **Profile Traits**: non-identifier traits (for example, `Contact.$.firstName`, `PurchaseHistory.$.lastPurchaseDate`).
8. Follow the steps in [Customizing mappings](/docs/segment/connections/destinations/actions/#customize-mappings).
9. Toggle **Enable Destination** on, then click **Save Changes**.

## Destination Settings

| Field             | Description                                                                                                                                                    | Required | Type     |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Secret        | Your Twilio API Secret. This is provided when you create an API Key in your \[Twilio Console]\(https://console.twilio.com/) under Account > API Keys & Tokens. | Yes      | password |
| Twilio Account ID | Your Twilio Account ID. This can be found at the top of your \[Twilio Console Dashboard]\(https://console.twilio.com/).                                        | Yes      | string   |
| API Key           | Your Twilio API Key. You can find this in your \[Twilio Console]\(https://console.twilio.com/) under Account > API Keys & Tokens.                              | Yes      | string   |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Conversation Memory-supported actions:

> \[!NOTE]
>
> Individual destination instances support a maximum of 5 mappings.

* [Upsert Profile](#upsert-profile-2)

### Upsert Profile

Create or update Memora profiles. If a profile already exists, its traits are merged (new keys added, existing keys overwritten). Supports batching up to 1000 profiles.

Upsert Profile is a **Cloud** action. The default Trigger is `type = "identify"`

| Field               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Required | Type   |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Memora Store        | The Memora Store ID to use for this profile. This should be a valid Memora Store associated with your Twilio account.                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes      | STRING |
| Profile Identifiers | Profile identifiers from all trait groups. At runtime, each event must contain at least one identifier with a non-null value, and at least two total non-null fields across identifiers and traits combined. Events with sparse data (e.g., only one identifier present) will be rejected. These fields are dynamically loaded from the selected Memora Store. When manually entering keys, use the format "TraitGroupName.$.traitName" (e.g., "Contact.$.email", "Contact.$.phone").                                                              | Yes      | OBJECT |
| Profile Traits      | Traits for the profile from all trait groups. While this field is optional in the mapping configuration, at runtime each event must have at least two total non-null fields across identifiers and traits combined. If you map only one identifier, you must also map at least one trait that will have a value for your events. These fields are dynamically loaded from the selected Memora Store. When manually entering keys, use the format "TraitGroupName.$.traitName" (e.g., "Contact.$.firstName", "PurchaseHistory.$.lastPurchaseDate"). | No       | OBJECT |

## Observability

[Delivery Overview](/docs/segment/connections/delivery-overview) displays observability information about the number of profile update events sent from Segment to Conversation Memory.

The Conversation Memory integration has the following pipeline view steps:

* **Failed Delivery**: Profile update events that Segment attempted to deliver to your Conversation Memory store, but that ultimately failed to be delivered. Failed delivery might indicate an issue with the connection, like invalid credentials, rate limits, or other error statuses received during delivery.
* **Successful Delivery**: Profile update events that Segment successfully delivered to your Conversation Memory store. You'll see the updated or created profile in your memory store.

## Profile identifier and trait key format

Conversation Memory organizes traits into trait groups. When manually entering field keys in a mapping, use the format `TraitGroupName.$.traitName`.

For example:

* `Contact.$.email`
* `Contact.$.phone`
* `Contact.$.firstName`
* `PurchaseHistory.$.lastPurchaseDate`

## Runtime validation requirements

Every event processed by the Upsert Profile action must meet the following requirements at runtime:

* At least one identifier field must have a non-null value.
* At least two total non-null fields must be present across identifiers and traits combined.

Twilio rejects events that don't satisfy these conditions and logs them as errors in the batch response. All other valid profiles in the same batch are still processed.

## Merge behavior for existing profiles

When a profile already exists in a Conversation Memory Store, the upsert merges incoming data:

* **New trait keys**: Added to the existing profile.
* **Existing trait keys**: Overwritten with the new value.
* **Duplicate keys**: If the same key appears in both the identifiers mapping and the traits mapping, the identifier value takes precedence.

## Batching

The Upsert Profile action batches up to 1,000 profiles per API request. You can configure Batch size in the mapping settings for your Conversation Memory (Actions) destination, but actual batch sizes may be lower depending on event volume.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Conversation Memory (Actions) may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field             | Description                                                                                                                                                    | Required | Type     |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Secret        | Your Twilio API Secret. This is provided when you create an API Key in your \[Twilio Console]\(https://console.twilio.com/) under Account > API Keys & Tokens. | Yes      | password |
| Twilio Account ID | Your Twilio Account ID. This can be found at the top of your \[Twilio Console Dashboard]\(https://console.twilio.com/).                                        | Yes      | string   |
| API Key           | Your Twilio API Key. You can find this in your \[Twilio Console]\(https://console.twilio.com/) under Account > API Keys & Tokens.                              | Yes      | string   |
