# Klaviyo: Campaigns

## Description

* Table of unique campaign versions. A campaign with 2 variations will have 2 distinct rows. **Counts** of the unique users and 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_`, `unique_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   | campaign\_type                         | Type of campaign.                                                                                                                                                                                                                                                                                               |
| DATETIME | created\_at                            | Timestamp of when the campaign was created, in UTC.                                                                                                                                                                                                                                                             |
| STRING   | email\_template\_id                    | Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.                                                   |
| STRING   | from\_email                            | The email address your email will be sent from and will be used in the reply-to header.                                                                                                                                                                                                                         |
| STRING   | from\_name                             | The name or label associated with the email address you're sending from.                                                                                                                                                                                                                                        |
| STRING   | campaign\_id                           | Unique ID of the campaign.                                                                                                                                                                                                                                                                                      |
| STRING   | campaign\_name                         | A name for this campaign. If not specified, this will default to the subject of the campaign.                                                                                                                                                                                                                   |
| DATETIME | scheduled\_to\_send\_at                | Timestamp of when the campaign is scheduled to be sent in the future, if ["smart send time"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used.                                                                                       |
| DATETIME | sent\_at                               | Timestamp of when the campaign was first sent out to users.                                                                                                                                                                                                                                                     |
| STRING   | status                                 | Current status of the campaign. Either "draft", "scheduled", "sent", or "cancelled".                                                                                                                                                                                                                            |
| STRING   | status\_id                             | Corresponding ID to the current status.                                                                                                                                                                                                                                                                         |
| STRING   | subject                                | The subject line of the campaign's email.                                                                                                                                                                                                                                                                       |
| DATETIME | updated\_at                            | Timestamp of when the campaign was last updated.                                                                                                                                                                                                                                                                |
| BOOLEAN  | is\_archived                           | Boolean of whether the campaign has been archived or not                                                                                                                                                                                                                                                        |
| DATETIME | scheduled\_at                          | The datetime when the campaign was scheduled for future sending                                                                                                                                                                                                                                                 |
| 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. |
| STRING   | variation\_id                          | Unique ID of the attributed campaign variation group. This does not map onto another table.                                                                                                                                                                                                                     |
| INTEGER  | total\_count\_unique\_people           | The count of the distinct people that have interacted with this campaign.                                                                                                                                                                                                                                       |
| DATETIME | first\_event\_at                       | Timestamp of the first ever interaction between this campaign and a person.                                                                                                                                                                                                                                     |
| DATETIME | last\_event\_at                        | Timestamp of the most recent interaction between this campaign and a person.                                                                                                                                                                                                                                    |
| 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  | unique\_count\_active\_on\_site        |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_viewed\_product                 |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_viewed\_product         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_ordered\_product                |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_ordered\_product        |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_placed\_order                   |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_placed\_order           |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_refunded\_order                 |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_refunded\_order         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_received\_email                 |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_received\_email         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_clicked\_email                  |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_clicked\_email          |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_opened\_email                   |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_opened\_email           |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_marked\_email\_as\_spam         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_marked\_email\_as\_spam |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_unsubscribed                    |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_unsubscribed            |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_received\_sms                   |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_received\_sms           |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_clicked\_sms                    |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_clicked\_sms            |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_sent\_sms                       |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_sent\_sms               |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | count\_unsubscribed\_from\_sms         |                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | unique\_count\_unsubscribed\_from\_sms |                                                                                                                                                                                                                                                                                                                 |
| STRING   | campaign\_variation\_key               | Unique key hashed on the campaign and variation IDs.                                                                                                                                                                                                                                                            |


---

# 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-campaigns.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.
