> 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/viewpoint-15.md).

# Notifications tables

{% 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/viewpoint-15.md).
{% endhint %}

## Description

Push device tokens, reminders, notification settings, email and SMS logs, in-app surveys and marketing popups.

## Tables

| Name                                                                                                                    | Columns | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Type       |
| ----------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [firebase\_user\_device\_token](https://docs.snapfix.com/engineering-reference/db/tables/firebase_user_device_token.md) | 14      | One registration of a user's device for push notifications, with its Firebase token, device type, last-seen time, app version and notification settings. Each registration adds a row, readers take the newest row per device, and no code deletes the older ones.                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [mkt\_popup](https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup.md)                                     | 35      | One marketing popup shown in the apps and on the web, with images, campaign link, locale, campaign dates, platform switches and weekday show windows.                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [mkt\_popup\_log](https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup_log.md)                            | 15      | One popup event on a device (shown, button clicked or closed), written through the queue log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_JobNotif](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobnotif.md)                             | 21      | A dated notice on a task, with a title, description, date, time and the range it is shown in. The newest row is from 2023-03; php-apis still has its save, copy and sync code.                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_JobReminder](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobreminder.md)                       | 18      | A task's reminder schedule: the previous and next reminder times and the interval. The newest row was created in 2024-06 and last saved on 2024-11-07, though apipy's reminder code still updates it.                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tPri\_Log\_NPS](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_nps.md)                              | 11      | A user's answer to the in-app NPS prompt: a score, a dismissal or a remind-me-later choice, with any feedback. php-apis has code that writes it; the newest row is from 2022-10.                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_Log\_NotifAPIRequests](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_notifapirequests.md)    | 14      | One push request sent to Firebase: the request (the message and receivers, and on the Laravel API's rows the device tokens), the token counts and Firebase's replies; apipy and the Laravel API write it.                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Log\_Survey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_survey.md)                        | 9       | One answer to an in-app user survey, which is a dismissal, a remind-me-later choice or the answers as JSON. php-apis records it and updates the user's survey schedule (tPri\_UserSurvey), and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_Log\_UserEncouragement](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_userencouragement.md)  | 10      | Log of automated messages and integration calls, despite the name, each with its full JSON; daily group report emails and SMS, weekly group admin summaries and HubSpot contact syncs. Who sends the daily and weekly reports is open \[[ASK-121](https://github.com/snapfix/docs/blob/main/ASK.md#ask-121-what-sends-the-daily-group-email-and-to-whom)], and the HubSpot rows hold the contact's name, email and phone \[[ASK-245](https://github.com/snapfix/docs/blob/main/ASK.md#ask-245-how-long-should-guest-records-and-personal-data-in-log-tables-be-kept)]. | BASE TABLE |
| [tPri\_NotificationBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_notificationbusiness.md)     | 13      | A notice for one group (uuid\_tBusiness) with a title, a body and effective dates. The apps download it but never show it, and no row is newer than 2020-02 \[[ASK-11](https://github.com/snapfix/docs/blob/main/ASK.md#ask-11-which-unused-api-endpoints-are-still-needed)].                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_NotificationGlobal](https://docs.snapfix.com/engineering-reference/db/tables/tpri_notificationglobal.md)         | 12      | A notice for all users with a title, a body and effective dates. The apps download it but never show it, and no row is newer than 2020-02 \[[ASK-11](https://github.com/snapfix/docs/blob/main/ASK.md#ask-11-which-unused-api-endpoints-are-still-needed)].                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_UserNotifSettings](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usernotifsettings.md)           | 23      | One user's notification switches, such as all notifications, task created or assigned, reminders, to-dos, chat, and status and priority alerts.                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_UserSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usersurvey.md)                         | 13      | A user's survey schedule, with the survey type, when it is due and the daily window it may show in. php-apis updates it when the user answers, and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPub\_NotifRepeatType](https://docs.snapfix.com/engineering-reference/db/tables/tpub_notifrepeattype.md)               | 3       | Repeat options for a notification. Empty on staging; only php-apis's generic table actions name it, and nothing calls them.                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tServerOnly\_Comm](https://docs.snapfix.com/engineering-reference/db/tables/tserveronly_comm.md)                       | 16      | One email the server sent to a person (a forgot-password, invite or task calendar message), with recipient, subject, body, calendar event fields and send result.                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tServerOnly\_EmailEvent](https://docs.snapfix.com/engineering-reference/db/tables/tserveronly_emailevent.md)           | 4       | An email-sent flag for a person (uuid\_tUser, fEmailSent). Only php-apis's generic table actions name it, nothing calls them, and staging has one row.                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [tbl\_email\_logs](https://docs.snapfix.com/engineering-reference/db/tables/tbl_email_logs.md)                          | 20      | One Amazon SES event for one outgoing email; apipy's communication log writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tbl\_sms\_logs](https://docs.snapfix.com/engineering-reference/db/tables/tbl_sms_logs.md)                              | 13      | One SMS sent through AWS SNS or Twilio, with recipient, delivery status, carrier and cost in USD; apipy's communication log writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |

## Relations

```mermaid
erDiagram


"firebase_user_device_token" {
}
"mkt_popup" {
}
"mkt_popup_log" {
}
"tPri_JobNotif" {
}
"tPri_JobReminder" {
}
"tPri_Log_NPS" {
}
"tPri_Log_NotifAPIRequests" {
}
"tPri_Log_Survey" {
}
"tPri_Log_UserEncouragement" {
}
"tPri_NotificationBusiness" {
}
"tPri_NotificationGlobal" {
}
"tPri_UserNotifSettings" {
}
"tPri_UserSurvey" {
}
"tPub_NotifRepeatType" {
}
"tServerOnly_Comm" {
}
"tServerOnly_EmailEvent" {
}
"tbl_email_logs" {
}
"tbl_sms_logs" {
}
```

***

> 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/viewpoint-15.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.
