> For the complete documentation index, see [llms.txt](https://documentation.bonsaidata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.bonsaidata.io/developer-docs/predictive-buying-algorithm-api/schema.md).

# Schema

## Overview

These tables operationalize predictive click valuation and bidding optimization. They capture modeled click-level value scores, upload activity to ad platforms, and tROAS adjustment logic, enabling more efficient media spend allocation based on predicted customer value rather than last-click outcomes.

***

### Google Ads Algorithm

<details>

<summary><code>pcv_troas_adjuster_table</code> schema<br><br><strong>Description:</strong> The specific tROAS changes applied (or suggested) for every campaign on pCV management.</summary>

| field\_name               | is\_nullable | data\_type | definition                                                                                           |
| ------------------------- | ------------ | ---------- | ---------------------------------------------------------------------------------------------------- |
| client\_number            | YES          | INT64      | An internal client identifier.                                                                       |
| campaign                  | YES          | STRING     | The campaign name running on pCV.                                                                    |
| campaign\_id              | YES          | STRING     | The ad platform campaign ID for the campaign.                                                        |
| segments\_date            | YES          | DATE       | The calendar date of the event.                                                                      |
| pcv\_flag                 | YES          | INT64      | A binary flag. 1 = the campaign runs on pCV. 0 = the campaign does not run on pCV.                   |
| impressions               | YES          | INT64      | Ad impressions.                                                                                      |
| clicks                    | YES          | INT64      | Ad clicks.                                                                                           |
| spend                     | YES          | FLOAT64    | Ad platform media spend.                                                                             |
| missed\_clicks            | YES          | FLOAT64    | Eligible ad clicks lost due to improper daily budget allocation, relative to tROAS bid setting.      |
| missed\_impressions       | YES          | FLOAT64    | Eligible ad impressions lost due to improper daily budget allocation, relative to tROAS bid setting. |
| CPC                       | YES          | FLOAT64    | Cost-per-click based on media spend.                                                                 |
| Optimized\_CPC            | YES          | FLOAT64    | The optimal available cost-per-click given existing media spend.                                     |
| efficiency\_improvement   | YES          | FLOAT64    | The difference between Optimized\_CPC and CPC.                                                       |
| tROAS\_increase\_required | YES          | FLOAT64    | The percentage increase required for a pCV campaign to achieve Optimized\_CPC.                       |

</details>

<details>

<summary><code>pcv_historical_table</code> schema<br><br><strong>Description:</strong> A historical record of Google Ads clicks scored by pCV.</summary>

| field\_name             | is\_nullable | data\_type | definition                                         |
| ----------------------- | ------------ | ---------- | -------------------------------------------------- |
| client\_number          | YES          | INT64      | An internal client identifier.                     |
| gclid                   | YES          | STRING     | The Google Ads Click ID.                           |
| date                    | YES          | DATE       | The calendar date of the event.                    |
| country                 | YES          | STRING     | Utilized for Google Ads Conversion API acceptance. |
| index                   | YES          | FLOAT64    | The predicted click value from pCV.                |
| append\_datetime        | YES          | DATETIME   | The date of the click upload to Google Ads.        |
| conversion\_event\_time | YES          | INT64      | Utilized for Google Ads Conversion API acceptance. |

</details>

<details>

<summary><code>pcv_upload_table</code> schema<br><br><strong>Description:</strong> The pCV clicks and values uploaded into Google Ads, updated daily.</summary>

| field\_name             | is\_nullable | data\_type | definition                                         |
| ----------------------- | ------------ | ---------- | -------------------------------------------------- |
| client\_number          | YES          | INT64      | An internal client identifier.                     |
| gclid                   | YES          | STRING     | The Google Ads Click ID.                           |
| date                    | YES          | DATE       | The calendar date of the event.                    |
| country                 | YES          | STRING     | Utilized for Google Ads Conversion API acceptance. |
| index                   | YES          | FLOAT64    | The predicted click value from pCV.                |
| conversion\_event\_time | YES          | INT64      | Utilized for Google Ads Conversion API acceptance. |

</details>


---

# 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://documentation.bonsaidata.io/developer-docs/predictive-buying-algorithm-api/schema.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.
