> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talqui.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Metadata

> Send context from your website or app with the conversation: the user's plan, the order they're asking about, the screen they're on.

Three commands, the same on every platform:

| Command | Describes | Kept |
| - | - | - |
| `setContact` | Name, email and phone | On the contact |
| `setContactMeta` | The person: plan, company, your user ID… | On the contact, across conversations |
| `setSessionMeta` | This conversation: an order, a step, a screen… | On the conversation |

```js Website theme={null}
$talqui.setContact({ name: "Ana Souza", email: "ana@example.com" });
$talqui.setContactMeta({ plan: "pro", seats: 12 });
$talqui.setSessionMeta({ order_id: "4821", step: "checkout" });
$talqui.setSessionMeta({ step: null }); // null removes a key
```

```ts React Native theme={null}
talqui.setContact({ name: 'Ana Souza', email: 'ana@example.com' });
talqui.setContactMeta({ plan: 'pro', seats: 12 });
talqui.setSessionMeta({ order_id: '4821', step: 'checkout' });
talqui.setSessionMeta({ step: null }); // null removes a key
```

```dart Flutter theme={null}
talqui.setContact(name: 'Ana Souza', email: 'ana@example.com');
talqui.setContactMeta({'plan': 'pro', 'seats': 12});
talqui.setSessionMeta({'order_id': '4821', 'step': 'checkout'});
talqui.setSessionMeta({'step': null}); // null removes a key
```

## Rules

* **Keys:** lowercase letters, digits, `_` and `-`, up to 60 characters. Up to 20 keys per call.
* **Values:** strings, numbers or booleans, stored as text of up to 255 characters. `null` removes the key.
* Invalid keys or values are ignored, and the rest of the call is applied. On the website a `[talqui]` warning appears in the console; in the apps, an `error` [event](https://docs.talqui.chat/guides/chat-sdks/events.md).
* Each call merges with what you sent before. Send only what changed.

## When it is saved

Call these commands at any moment, even before the chat loads or before the first message. Until a conversation exists, the values wait on the device and are saved with the first message. After that, each call is saved right away.

On the website nothing is sent to Talqui before the visitor opens the chat for the first time.

## Where your team sees it

* **Contact details and contact metadata** show on the contact. In the conversation's side panel, contact metadata is listed in the contact properties card, which an operator turns on from the panel's display menu. Contact metadata keys are stored with a `chat_` prefix (`plan` becomes `chat_plan`), so they never collide with fields set by your team or other integrations.
* **Conversation metadata** isn't shown in the inbox. It is there for your automations (Workflows) and for the API.

> [!TIP]
>
> Keep the conversation metadata short and current: the order in question, the screen, the step of a flow. It changes every conversation; the contact metadata is what stays.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.