# Klaviyo: Person Campaign Flow

## Description

* Table that aggregates event metrics to the person-campaign or -flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that organic interactions (someone with null campaign\_id/flow\_id) are included in this table. **Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt\_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.

## Supported Data Sources

* <img src="https://fivetran.com/integrations/klaviyo/resources/klaviyo.svg" alt="" data-size="line"> Klaviyo

## Columns

| Type     | Name                            | Description                                                                                                                                                                                                                                                                                                     |
| -------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| STRING   | person\_id                      | Foreign key referencing the PERSON who interacted with the flow/message.                                                                                                                                                                                                                                        |
| STRING   | last\_touch\_campaign\_id       | Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).                                                                                                                                                                                                        |
| STRING   | last\_touch\_flow\_id           | Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).                                                                                                                                                                                                            |
| STRING   | campaign\_name                  | A name for this campaign. If not specified, this will default to the subject of the campaign.                                                                                                                                                                                                                   |
| STRING   | flow\_name                      | Name of the flow.                                                                                                                                                                                                                                                                                               |
| STRING   | variation\_id                   | Unique ID of the attributed flow or campaign variation group. This does not map onto another table.                                                                                                                                                                                                             |
| STRING   | source\_relation                | The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string. |
| DATETIME | first\_event\_at                | Timestamp of the first ever interaction between this campaign/flow and a person. In other words, the first event trigger attributed to the campaign/flow.                                                                                                                                                       |
| DATETIME | last\_event\_at                 | Timestamp of the most recent interaction between this campaign/flow and a person. In other words, the last event trigger attributed to the campaign/flow.                                                                                                                                                       |
| INTEGER  | sum\_revenue\_refunded\_order   |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | sum\_revenue\_placed\_order     |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | sum\_revenue\_ordered\_product  |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | sum\_revenue\_checkout\_started |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | sum\_revenue\_cancelled\_order  |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_active\_on\_site         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_viewed\_product          |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_ordered\_product         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_placed\_order            |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_refunded\_order          |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_received\_email          |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_clicked\_email           |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_opened\_email            |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_marked\_email\_as\_spam  |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_unsubscribed             |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_received\_sms            |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_clicked\_sms             |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_sent\_sms                |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_unsubscribed\_from\_sms  |                                                                                                                                                                                                                                                                                                                 |


---

# Agent Instructions: 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:

```
GET https://endash-guidance-docs.gitbook.io/cigro-data-templates/data-model-templates/klaviyo-person-campaign-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
