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

# Data

> What an agent knows before the call connects, and what it can look up while the call is running.

The **Data** tab decides what an agent knows. There are four parts, and they answer
different questions.

| Part                        | Answers                                                 |
| --------------------------- | ------------------------------------------------------- |
| **Context Sources**         | Fetch facts from your systems before the call connects. |
| **Fallback Values**         | What to use when a fact is missing.                     |
| **Outbound Context Memory** | Carry what a campaign knew into a call back.            |
| **Knowledge Bases**         | Documents the agent can search mid-call.                |

***

## Context Sources

A context source fetches data before the call and maps the response onto context
variables the prompt and the opening line can use. An agent can have up to five.

Click **Add Source**.

| Field        | What to set                                                                                                         |
| ------------ | ------------------------------------------------------------------------------------------------------------------- |
| **Type**     | **Custom** for your own endpoint, or **Integration** to use a connected integration.                                |
| **Method**   | The HTTP method.                                                                                                    |
| **URL**      | The endpoint to call.                                                                                               |
| **Required** | On means the call does not go ahead without a response. Leave it off unless the call is pointless without the data. |

Open **Request details** for **Headers** and **Query parameters**.

### The phone numbers are sent for you

Fluents adds the call's phone numbers to every source request, with no configuration:

| Parameter      | What it holds                                                   |
| -------------- | --------------------------------------------------------------- |
| `from_phone`   | The number the call came from. On an inbound call, your caller. |
| `to_phone`     | The number that was dialed. On an inbound call, yours.          |
| `phone_number` | The other party's number for the call.                          |

<Warning>
  Adding your own query parameters **replaces the default phone fields**. If you need
  custom parameters, add `from_phone` back yourself.
</Warning>

### Mapping the response

**Test request** runs the call and shows you a real response. **Auto-map all fields**
creates the mappings for you, or you can build them by hand under **Variable
Mappings**.

<Tip>
  Return a `200` with an empty object rather than a `404` when you do not recognise the
  caller. Unknown callers are normal and you want the call to continue.
</Tip>

***

## Fallback Values

Used when a source does not return a value. Without them, a missing fact leaves a hole
in your greeting.

Set one for every variable that appears in the **Initial Message**. For a name, a
neutral value reads better than a blank.

| Variable     | Fallback |
| ------------ | -------- |
| `first_name` | `there`  |

Fluents supplies some context on its own, including today's date and tomorrow's date,
so you do not need to provide those.

***

## Outbound Context Memory

Under **Configuration**. This is how an agent recognises someone your campaign called
earlier when they ring the number back.

A campaign already carries per contact context such as `first_name`, `last_name` and
`email`, with `to_number` as the contact's number. Tick this box and that context
becomes available on the inbound call too.

<Note>
  Inbound calls combine context with the last outbound call between the same numbers,
  filling only missing details.
</Note>

There is nothing to build. No endpoint, no mapping, nothing to keep in sync.

<Warning>
  Matching is on the numbers. If the contact rings back from a different phone, from a
  switchboard, or with the number withheld, there is nothing to match and the call
  arrives cold. Write the greeting so it survives that, and set fallback values.
</Warning>

It fills **missing** details only, so anything the call already knows wins. And it needs
a previous outbound call between those two numbers, so it does nothing for a caller you
have never dialed.

### Which one do I want

Use **Outbound Context Memory** for people your campaigns already called. Use a
**Context Source** for anything that lives outside Fluents, such as an order status or
a CRM record, and for callers who were never in a campaign. They work together.

***

## Knowledge Bases

At the bottom of the tab. These are the documents the agent can search during a call,
rather than facts fetched before it. Attach them here, then see
**[Knowledge search](./skills/knowledge-search)** for how the agent uses them.

***

## Where to go next

* **[Agents](./agent)** for the rest of the agent settings.
* **[Campaigns](./campaigns)** for the contact context that feeds Outbound Context Memory.
* **[Post-call](./post-call)** for what comes out of a call rather than what goes in.
