# Integration Specifications

## Integration Overview

Pepperjam is an affiliate marketing platform used by merchants to manage their web-based affiliate advertising campaigns. Pepperjam collects data from publishers (affiliates) and reports metrics such as clicks, impressions, revenue, spend, etc.

This document provides context on what kind of data is being gathered through this extractor, which endpoints that data is coming from, and how the extracted tables relate to each other.

The Daasity Pepperjam integration extracts data from the most important endpoints needed to populate the UMS tables: Transaction History, Creative Performance by Publisher, and Publisher Performance.

## **Integration Availability**

This integration is available for:

* Enterprise
* Growth

## **API Endpoints**

The Daasity Pepperjam extractor is built based on this [Pepperjam API documentation](https://support.ascendpartner.com/s/advertiser-api-documentation#APIOverview).  The following endpoints are used by Daasity to replicate data from Pepperjam:

* [Creative Advanced Links](https://support.ascendpartner.com/s/advertiser-api-documentation#AdvancedLinks)
* [Creative Banner](https://support.ascendpartner.com/s/advertiser-api-documentation#Banner)
* [Creative Coupon](https://support.ascendpartner.com/s/advertiser-api-documentation#CouponCreative)
* [Creative Generic](https://support.ascendpartner.com/s/advertiser-api-documentation#Generic)
* [Creative Performance by Publisher](https://support.ascendpartner.com/s/advertiser-api-documentation#CreativePerformanceByPublisher)
* [Creative Promotion](https://support.ascendpartner.com/s/advertiser-api-documentation#CreativePromotion)
* [Creative Text](https://support.ascendpartner.com/s/advertiser-api-documentation#Text)
* [Publisher Performance](https://support.ascendpartner.com/s/advertiser-api-documentation#PublisherPerformance)
* [Transaction History](https://support.ascendpartner.com/s/advertiser-api-documentation#TransactionHistory)

## Entity Relationship Diagram (ERD)

[Click here to view the ERD for the Daasity Pepperjam integration](https://lucid.app/documents/embedded/e1d5a2d1-5027-489b-90ea-1f073091cbac) illustrating the different tables and keys to join across tables.

## Pepperjam Schema

The Daasity Pepperjam extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.

* Publisher Performance
* Transaction History
* Creative Performance by Publisher
* Creative Private Affiliates
* Creative Promotion
* Creative Type Advanced
* Creative Type Banner
* Creative Type Coupon
* Creative Type Generic
* Creative Type Promotion
* Creative Type Text

### Publisher Performance

* Endpoint: [Publisher Performance](https://support.ascendpartner.com/s/advertiser-api-documentation#PublisherPerformance)
* Update Method: UPSERT
* Table Name: \[`pepperjam.publisher_performance`]

| JSON Element                               | Database Column       |
| ------------------------------------------ | --------------------- |
| publisher\_id                              | publisher\_id         |
| date                                       | transaction\_date     |
| impressions                                | impressions           |
| clicks                                     | clicks                |
| sales                                      | sales                 |
| leads                                      | leads                 |
| sale\_lead\_amount                         | sales\_lead\_amount   |
| earnings\_per\_click                       | earnings\_per\_click  |
| bonus\_amount                              | bonus\_amount         |
| total\_commission                          | total\_commission     |
| site\_bonus                                | site\_bonus           |
| site\_commission                           | site\_commission      |
| publisher\_bonus                           | publisher\_bonus      |
| publisher\_commission                      | publisher\_commission |
| publisher                                  | publisher             |
| company                                    | company               |
| state                                      | state                 |
| website                                    | website               |
| publisher\_type                            | publisher\_type       |
| Daasity: {unique\_id}                      | \_account\_id         |
| Daasity: {merchant\_name}                  | \_\_source\_id        |
| MD5(publisher\_id + date + \_\_source\_id) | \_\_sync\_key         |
| Daasity: timestamp when loaded into DB     | \_\_synced\_at        |

### Transaction History

* Endpoint: [Transaction History](https://support.ascendpartner.com/s/advertiser-api-documentation#TransactionHistory)
* Update Method: UPSERT
* Table Name: \[`pepperjam.transaction_history`]

| JSON Element                                                              | Database Column       |
| ------------------------------------------------------------------------- | --------------------- |
| publisher\_id                                                             | publisher\_id         |
| transaction\_id                                                           | transaction\_id       |
| sale\_date                                                                | sale\_date            |
| order\_id                                                                 | order\_id             |
| status                                                                    | status                |
| link\_type                                                                | link\_type            |
| transaction\_type                                                         | transaction\_type     |
| publisher\_commission                                                     | publisher\_commission |
| site\_commission                                                          | site\_commission      |
| sale\_amount                                                              | sale\_amount          |
| process\_date                                                             | process\_date         |
| revision                                                                  | revision              |
| item\_id                                                                  | item\_id              |
| publisher                                                                 | publisher             |
| company                                                                   | company               |
| website\_url                                                              | website\_url          |
| publisher\_type                                                           | publisher\_type       |
| Daasity: {unique\_id}                                                     | \_account\_id         |
| Daasity: {merchant\_name}                                                 | \_\_source\_id        |
| MD5(transaction\_id + item\_id + revision + sales\_date + \_\_source\_id) | \_\_sync\_key         |
| Daasity: timestamp when loaded into DB                                    | \_\_synced\_at        |

### Creative Performance by Publisher

* Endpoint: [Creative Performance by Publisher](https://support.ascendpartner.com/s/advertiser-api-documentation#CreativePerformanceByPublisher)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_performance_publisher`]

| JSON Element                                              | Database Column      |
| --------------------------------------------------------- | -------------------- |
| creative\_id                                              | creative\_id         |
| creative\_type                                            | creative\_type       |
| creative\_name                                            | creative\_name       |
| publisher\_id                                             | publisher\_id        |
| publisher                                                 | publisher            |
| date                                                      | date                 |
| impressions                                               | impressions          |
| transactions                                              | transactions         |
| clicks                                                    | clicks               |
| click\_through\_rate                                      | click\_through\_rate |
| sales                                                     | sales                |
| earnings\_per\_click                                      | earnings\_per\_click |
| commission                                                | commission           |
| Daasity: {unique\_id}                                     | \_account\_id        |
| Daasity: {merchant\_name}                                 | \_\_source\_id       |
| MD5(publisher\_id + creative\_id + date + \_\_source\_id) | \_\_sync\_key        |
| Daasity: timestamp when loaded into DB                    | \_\_synced\_at       |

### **Creative Private Affiliates**

* Endpoint: [Creative Banner](https://support.ascendpartner.com/s/advertiser-api-documentation#Banner)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_private_affiliates`]

| JSON Element                                                         | Database Column               |
| -------------------------------------------------------------------- | ----------------------------- |
| id                                                                   | creative\_id                  |
| type                                                                 | creative\_type                |
| private\_affiliates::affiliate\_id                                   | private\_affiliate\_id        |
| private\_affiliates::first\_name                                     | private\_affiliate\_firstname |
| private::affiliates::last\_name                                      | private\_affiliates\_lastname |
| Daasity: {unique\_id}                                                | \_account\_id                 |
| Daasity: {merchant\_name}                                            | \_\_source\_id                |
| MD5(id + type + private\_affiliates::affiliate\_id + \_\_source\_id) | \_\_sync\_key                 |
| Daasity: timestamp when loaded into DB                               | \_\_synced\_at                |

### Creative Promotion Table

* Endpoint: [Creative Banner](https://support.ascendpartner.com/s/advertiser-api-documentation#Banner)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_promotion`]

| JSON Element                                                         | Database Column |
| -------------------------------------------------------------------- | --------------- |
| id                                                                   | creative\_id    |
| type                                                                 | creative\_type  |
| promotions::id                                                       | promotion\_id   |
| promotions::name                                                     | promotion\_name |
| Daasity: {unique\_id}                                                | \_account\_id   |
| Daasity: {merchant\_name}                                            | \_\_source\_id  |
| MD5(id + type + private\_affiliates::affiliate\_id + \_\_source\_id) | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB                               | \_\_synced\_at  |

### Creative Type Advanced

* Endpoint: [Creative Advanced Links](https://support.ascendpartner.com/s/advertiser-api-documentation#AdvancedLinks)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_type_advanced`]

| JSON Element                           | Database Column |
| -------------------------------------- | --------------- |
| id                                     | id              |
| type                                   | type            |
| name                                   | name            |
| sub\_type                              | sub\_type       |
| code                                   | code            |
| description                            | description     |
| verified                               | verified        |
| start\_date                            | start\_date     |
| end\_date                              | end\_date       |
| view\_date                             | view\_date      |
| created                                | created\_at     |
| modified                               | updated\_at     |
| status                                 | status          |
| Daasity: {unique\_id}                  | \_account\_id   |
| Daasity: {merchant\_name}              | \_\_source\_id  |
| MD5(id + type + \_\_source\_id)        | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB | \_\_synced\_at  |

### Creative Type Banner

* Endpoint: [Creative Banner](https://support.ascendpartner.com/s/advertiser-api-documentation#Banner)
* Update Method: UPSERT
* Table Name: pepperjam.creative\_type\_banner

| JSON Element                           | Database Column   |
| -------------------------------------- | ----------------- |
| id                                     | id                |
| type                                   | type              |
| name                                   | name              |
| destination\_url                       | destination\_url  |
| banner\_url                            | banner\_url       |
| width                                  | width             |
| height                                 | height            |
| description                            | description       |
| allow\_deep\_link                      | allow\_deep\_link |
| start\_date                            | start\_date       |
| end\_date                              | end\_date         |
| view\_date                             | view\_date        |
| created                                | created\_at       |
| modified                               | updated\_at       |
| status                                 | status            |
| Daasity: {unique\_id}                  | \_account\_id     |
| Daasity: {merchant\_name}              | \_\_source\_id    |
| MD5(id + type + \_\_source\_id)        | \_\_sync\_key     |
| Daasity: timestamp when loaded into DB | \_\_synced\_at    |

### Creative Type Coupon

* Endpoint: [Creative Coupon](https://support.ascendpartner.com/s/advertiser-api-documentation#CouponCreative)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_type_coupon`]

| JSON Element                           | Database Column |
| -------------------------------------- | --------------- |
| id                                     | id              |
| type                                   | type            |
| name                                   | name            |
| description                            | description     |
| url                                    | url             |
| coupon\_code                           | coupon\_code    |
| personalized                           | personalized    |
| start\_date                            | start\_date     |
| end\_date                              | end\_date       |
| created                                | created\_at     |
| modified                               | updated\_at     |
| status                                 | status          |
| Daasity: {unique\_id}                  | \_account\_id   |
| Daasity: {merchant\_name}              | \_\_source\_id  |
| MD5(id + type + \_\_source\_id)        | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB | \_\_synced\_at  |

### Creative Type Generic

* Endpoint: [Creative Generic](https://support.ascendpartner.com/s/advertiser-api-documentation#Generic)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_type_generic`]

| JSON Element                           | Database Column   |
| -------------------------------------- | ----------------- |
| type                                   | type              |
| allow\_deep\_link                      | allow\_deep\_link |
| url                                    | url               |
| modified                               | modified          |
| Daasity: {unique\_id}                  | \_account\_id     |
| Daasity: {merchant\_name}              | \_\_source\_id    |
| MD5(type + url + \_\_source\_id)       | \_\_sync\_key     |
| Daasity: timestamp when loaded into DB | \_\_synced\_at    |

### Creative Type Promotion

* Endpoint: [Creative Promotion](https://support.ascendpartner.com/s/advertiser-api-documentation#CreativePromotion)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_type_promotion`]

| JSON Element                           | Database Column |
| -------------------------------------- | --------------- |
| id                                     | id              |
| name                                   | name            |
| Daasity: {unique\_id}                  | \_account\_id   |
| Daasity: {merchant\_name}              | \_\_source\_id  |
| MD5(id + name + \_\_source\_id)        | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB | \_\_synced\_at  |

### Creative Type Text

* Endpoint: [Creative Text](https://support.ascendpartner.com/s/advertiser-api-documentation#Text)
* Update Method: UPSERT
* Table Name: \[`pepperjam.creative_type_text`]

| JSON Element                           | Database Column   |
| -------------------------------------- | ----------------- |
| id                                     | id                |
| type                                   | type              |
| url                                    | url               |
| description                            | description       |
| allow\_deep\_link                      | allow\_deep\_link |
| start\_date                            | start\_date       |
| end\_date                              | end\_date         |
| view\_date                             | view\_date        |
| created                                | created\_at       |
| modified                               | updated\_at       |
| status                                 | status            |
| Daasity: {unique\_id}                  | \_account\_id     |
| Daasity: {merchant\_name}              | \_\_source\_id    |
| MD5(id + type + \_\_source\_id)        | \_\_sync\_key     |
| Daasity: timestamp when loaded into DB | \_\_synced\_at    |


---

# 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://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/pepperjam/integration-specifications.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.
