> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/insight/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/insight/data-integration/associating-metadata-with-a-caller.md).

# Associating Metadata with a Caller

It's commonplace to want to associate metadata with a specific inbound or outbound caller. This section will describe how to achieve this for both inbound and outbound calls.

## **Outbound Association**

Associating a metadata record with an outbound caller is a very straightforward process. When queuing the outbound call, either via the api methods or though the outbound interface, you can optionally choose to include metadata for the caller. What this actually does is allow for automatic association of that record within the call. This means that you can instantly use the metadata store question type to record any of the columns values specified when queuing the call.

Here's a basic breakdown of those steps:

1. You queue an outbound call with metadata
2. When the call connects, that metadata record from your metadatabase is automatically available in your call
3. Whenever you encounter a metadata store question in your survey during the call, the column you specify to store is saved as the answer to the question

Now, when you run reports you will have that metadata associated with the call as metadata store answers.

Documentation on queuing outbound calls can be found here:\
[Queuing an Outbound Call](/insight/api/queuing-an-outbound-call.md)\
[Queuing Multiple Outbound Calls](/insight/api/queuing-multiple-outbound-calls.md)

## **Inbound Association**

Associating a metadata record with an inbound call can be accomplished via the metadata filter and metadata store question types. The metadata filter question type will take a provided value as well as a column in your metadatabase to filter on and will match all rows in your metadatabase that match that value. It's as simple as that; if the value exists in your metadatabase you immediately have that metadata associated with the caller. You can even filter on the ANI/IP address of the user taking the survey such that if you add the ANI or IP address of users to your metadatabase before they take your survey you can instantly associate metadata with those users.

There may come a time where you have multiple ANI/IP address duplicates in your metadatabase and therefore the metadata filter question will match multiple values. For this circumstance, you can utilize the metadata store question's store row option to store only the latest stored record. This way you can ensure you're only associating with the last added record when storing the column values for the associated metadata as the metadata store question answers.

Let's use a sample use case to demonstrate this process:

> You have a call center where your agents are working with your callers. After your agent has completed the call, you wish to transfer the caller to your feedback survey and want to associate the agent who handled the call with the survey response. This is where your metadatabase comes into play. You have two options, if you know your callers ANI beforehand, you can pre-populate the metadatabase for your survey with the ANI of your caller and any additional columns you wish to associate with the caller. If you are transferring in real time, you can utilize the metadata push api method to add that metadata record into your metadatabase right before you call connects. Once your caller has connected to the survey and the associated ANI is stored in your metadatabase you can use the metadata filter question type to filter that column with the ANI of your caller, associated the metadata record with the current call. You can then use the metadata store question to store any columns from the associated metadata record by utilizing the store row option as 'Latest', therefore storing only the last added record for that ANI.

Documentation on adding metadata records via the api can be found here:\
[Adding Metadatabase Records](/insight/api/adding-metadatabase-records.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.plumvoice.com/insight/data-integration/associating-metadata-with-a-caller.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
