> 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-19.md).

# Staff 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-19.md).
{% endhint %}

## Description

Snapfix staff tools: blocklists, HubSpot and Jira data, the admin app log, site history and the organisation onboarding log.

## Tables

| Name                                                                                                                     | Columns | Comment                                                                                                                                                                                                                                                                                                     | Type       |
| ------------------------------------------------------------------------------------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [blacklist\_email](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_email.md)                          | 10      | One blocked email address. The blacklist tables are global, not per site; admins manage them through the admin blacklist API, and php-apis's request checks read them.                                                                                                                                      | BASE TABLE |
| [blacklist\_ipaddress](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_ipaddress.md)                  | 10      | One blocked IP address in the global blacklist. php-apis's request checks read it, and apipy's and authpy's IP checks also name it.                                                                                                                                                                         | BASE TABLE |
| [blacklist\_iso\_countrycode](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_iso_countrycode.md)     | 10      | One blocked ISO country code in the global blacklist; the request checks block calls from IP addresses in that country.                                                                                                                                                                                     | BASE TABLE |
| [blacklist\_phone\_countrycode](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_phone_countrycode.md) | 10      | One blocked phone country code in the global blacklist.                                                                                                                                                                                                                                                     | BASE TABLE |
| [blacklist\_phone\_number](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_phone_number.md)           | 10      | One blocked mobile number in the global blacklist.                                                                                                                                                                                                                                                          | BASE TABLE |
| [blacklist\_user](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_user.md)                            | 14      | One blocked user in the global blacklist, matched by user ID, email, country code or mobile. Every staging row has zero timestamps.                                                                                                                                                                         | BASE TABLE |
| [hubspot\_company](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_company.md)                          | 38      | One company copied from HubSpot, with HubSpot properties as columns; hubspot\_ref is its HubSpot ID. apipy's HubSpot endpoints read it, and no row is newer than 2022-06.                                                                                                                                   | BASE TABLE |
| [hubspot\_company\_parent](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_company_parent.md)           | 10      | Links a HubSpot company to a Snapfix site; apipy's company-parent endpoint writes it, and no row is newer than 2022-06.                                                                                                                                                                                     | BASE TABLE |
| [hubspot\_contact](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_contact.md)                          | 35      | One contact copied from HubSpot, with HubSpot properties as columns; hubspot\_ref is its HubSpot ID. apipy's HubSpot endpoints read it, and no row is newer than 2022-06.                                                                                                                                   | BASE TABLE |
| [hubspot\_contact\_parent](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_contact_parent.md)           | 10      | Links a HubSpot contact to a Snapfix site; apipy's contact-parent endpoint writes it, and no row is newer than 2021-11.                                                                                                                                                                                     | BASE TABLE |
| [jira\_job](https://docs.snapfix.com/engineering-reference/db/tables/jira_job.md)                                        | 11      | Links a task (uuid\_tJob) to a Jira issue (jira\_ref), with the issue as JSON. No in-scope code reads or writes it, and no row is newer than 2022-01 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                              | BASE TABLE |
| [log\_webadminapp](https://docs.snapfix.com/engineering-reference/db/tables/log_webadminapp.md)                          | 13      | One action logged by the old web admin app: the acting user, the action name and description, and details as JSON. apipy's /logswebappadmin endpoints read and write it, no client calls them, and no row is newer than 2022-06.                                                                            | BASE TABLE |
| [tPri\_Org\_Hubspot](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspot.md)                       | 21      | One HubSpot deal of an organisation (tPri\_Org.uuid\_tOrgHubspot) as last copied, with name, stage, pipeline, amount and dates, all as text. No in-scope code writes it, and no row is newer than 2024-09.                                                                                                  | BASE TABLE |
| [tPri\_Org\_HubspotDealLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspotdeallog.md)         | 23      | One HubSpot change event for a deal property, with the property, its new value and where the change came from. Rows keep arriving, but no in-scope code names the table \[[ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)]. | BASE TABLE |
| [tPri\_Org\_HubspotDealState](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspotdealstate.md)     | 50      | One HubSpot deal with its billing state (trial, won or lost, with their times), owner, pipeline and lead source; one row per object\_id. The staff admin deal list reads the won deals and counts their Stripe checkout links, and no in-scope code writes it.                                              | BASE TABLE |
| [tPri\_Org\_OnboardingLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_onboardinglog.md)           | 13      | One setup link for a new site (uuid\_tParent), with its HubSpot deal, company and contact IDs. The staff admin API adds a row on every create call, even when the deal already has one.                                                                                                                     | BASE TABLE |
| [tPri\_UserHubspotContact](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userhubspotcontact.md)          | 18      | Unused; empty, and only its migration names it.                                                                                                                                                                                                                                                             | BASE TABLE |
| [time\_tPri\_Parent](https://docs.snapfix.com/engineering-reference/db/tables/time_tpri_parent.md)                       | 15      | A snapshot of a site's customer type and billing dates, written by php-apis and the Laravel API when they change; php-apis's Looker report code reads it.                                                                                                                                                   | BASE TABLE |
| [user\_blacklist](https://docs.snapfix.com/engineering-reference/db/tables/user_blacklist.md)                            | 8       | A blocked username and mobile number; only its migration names it, and no row is newer than 2022-03 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                               | BASE TABLE |

## Relations

```mermaid
erDiagram


"blacklist_email" {
}
"blacklist_ipaddress" {
}
"blacklist_iso_countrycode" {
}
"blacklist_phone_countrycode" {
}
"blacklist_phone_number" {
}
"blacklist_user" {
}
"hubspot_company" {
}
"hubspot_company_parent" {
}
"hubspot_contact" {
}
"hubspot_contact_parent" {
}
"jira_job" {
}
"log_webadminapp" {
}
"tPri_Org_Hubspot" {
}
"tPri_Org_HubspotDealLog" {
}
"tPri_Org_HubspotDealState" {
}
"tPri_Org_OnboardingLog" {
}
"tPri_UserHubspotContact" {
}
"time_tPri_Parent" {
}
"user_blacklist" {
}
```

***

> 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-19.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.
