> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup.md).

# mkt\_popup

{% hint style="info" %}
Generated from the staging database schema, with descriptions drafted by agents ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/db/tables/mkt_popup.md).
{% endhint %}

## Description

One marketing popup shown in the apps and on the web, with images, campaign link, locale, campaign dates, platform switches and weekday show windows.

<details>

<summary><strong>Table Definition</strong></summary>

```sql
CREATE TABLE `mkt_popup` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `parent_uuid_json` json DEFAULT NULL,
  `ios_disable` tinyint DEFAULT '0',
  `android_disable` tinyint DEFAULT '0',
  `web_disable` tinyint DEFAULT '0',
  `image_portrait_url` varchar(255) DEFAULT NULL,
  `image_landscape_url` varchar(255) DEFAULT NULL,
  `campaign_url` varchar(255) DEFAULT NULL,
  `locale_bcp47` varchar(255) DEFAULT NULL,
  `campaignStartTs` bigint DEFAULT NULL,
  `campaignEndTs` bigint DEFAULT NULL,
  `timezone_iana` varchar(255) DEFAULT NULL,
  `mon_startAfterMidnightMs` bigint DEFAULT NULL,
  `mon_durationMs` bigint DEFAULT NULL,
  `tue_startAfterMidnightMs` bigint DEFAULT NULL,
  `tue_durationMs` bigint DEFAULT NULL,
  `wed_startAfterMidnightMs` bigint DEFAULT NULL,
  `wed_durationMs` bigint DEFAULT NULL,
  `thu_startAfterMidnightMs` bigint DEFAULT NULL,
  `thu_durationMs` bigint DEFAULT NULL,
  `fri_startAfterMidnightMs` bigint DEFAULT NULL,
  `fri_durationMs` bigint DEFAULT NULL,
  `sat_startAfterMidnightMs` bigint DEFAULT NULL,
  `sat_durationMs` bigint DEFAULT NULL,
  `sun_startAfterMidnightMs` bigint DEFAULT NULL,
  `sun_durationMs` bigint DEFAULT NULL,
  `fActive` tinyint DEFAULT '1',
  `fDeleted` tinyint DEFAULT '0',
  `fCreatedTs` bigint DEFAULT NULL,
  `fModifiedTs` bigint DEFAULT NULL,
  `fServerTs` bigint DEFAULT NULL,
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
```

</details>

## Columns

| Name                      | Type         | Default | Nullable | Extra Definition | Comment                                                                                                                     |
| ------------------------- | ------------ | ------- | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| id                        | int          |         | false    | auto\_increment  |                                                                                                                             |
| uuid                      | varchar(255) |         | true     |                  |                                                                                                                             |
| name                      | varchar(255) |         | true     |                  |                                                                                                                             |
| parent\_uuid\_json        | json         |         | true     |                  | JSON list of the site UUIDs the popup is for (parentUuids in the admin request).                                            |
| ios\_disable              | tinyint      | 0       | true     |                  |                                                                                                                             |
| android\_disable          | tinyint      | 0       | true     |                  |                                                                                                                             |
| web\_disable              | tinyint      | 0       | true     |                  |                                                                                                                             |
| image\_portrait\_url      | varchar(255) |         | true     |                  |                                                                                                                             |
| image\_landscape\_url     | varchar(255) |         | true     |                  |                                                                                                                             |
| campaign\_url             | varchar(255) |         | true     |                  |                                                                                                                             |
| locale\_bcp47             | varchar(255) |         | true     |                  |                                                                                                                             |
| campaignStartTs           | bigint       |         | true     |                  |                                                                                                                             |
| campaignEndTs             | bigint       |         | true     |                  |                                                                                                                             |
| timezone\_iana            | varchar(255) |         | true     |                  | IANA time zone name (for example Europe/London) of the weekday windows.                                                     |
| mon\_startAfterMidnightMs | bigint       |         | true     |                  | Start of the Monday show window in milliseconds after midnight, in timezone\_iana; the other weekdays use the same pattern. |
| mon\_durationMs           | bigint       |         | true     |                  | Length of the Monday show window in milliseconds; the other weekdays use the same pattern.                                  |
| tue\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| tue\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| wed\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| wed\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| thu\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| thu\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| fri\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| fri\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| sat\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| sat\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| sun\_startAfterMidnightMs | bigint       |         | true     |                  |                                                                                                                             |
| sun\_durationMs           | bigint       |         | true     |                  |                                                                                                                             |
| fActive                   | tinyint      | 1       | true     |                  |                                                                                                                             |
| fDeleted                  | tinyint      | 0       | true     |                  |                                                                                                                             |
| fCreatedTs                | bigint       |         | true     |                  |                                                                                                                             |
| fModifiedTs               | bigint       |         | true     |                  |                                                                                                                             |
| fServerTs                 | bigint       |         | true     |                  |                                                                                                                             |
| uuid\_tUser\_CreatedBy    | varchar(255) |         | true     |                  |                                                                                                                             |
| uuid\_tUser\_ModifiedBy   | varchar(255) |         | true     |                  |                                                                                                                             |

## Viewpoints

| Name                                                                                      | Definition                                                                                                     |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [notifications](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-15.md) | Push device tokens, reminders, notification settings, email and SMS logs, in-app surveys and marketing popups. |

## Constraints

| Name    | Type        | Definition             |
| ------- | ----------- | ---------------------- |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id)       |
| uuid    | UNIQUE      | UNIQUE KEY uuid (uuid) |

## Indexes

| Name    | Definition                         |
| ------- | ---------------------------------- |
| PRIMARY | PRIMARY KEY (id) USING BTREE       |
| uuid    | UNIQUE KEY uuid (uuid) USING BTREE |

## Relations

```mermaid
erDiagram


"mkt_popup" {
  int id PK
}
```

***

> Generated by [tbls](https://github.com/k1LoW/tbls)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
