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

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

## Description

Setting up a new site, the pre-registration survey, invitations, and joining a site.

## Tables

| Name                                                                                                                              | Columns | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Type       |
| --------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- |
| [dynamiclink\_invitation](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink_invitation.md)                     | 14      | One invitation inside a dynamic link: the site (uuid\_tParent) and group (uuid\_tBusiness) to join, the invitee's site role (parent\_userType), group role (business\_userType) and group permissions.                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [group\_invite](https://docs.snapfix.com/engineering-reference/db/tables/group_invite.md)                                         | 20      | One invitation of a person to join a group (uuid\_tBusiness), by SMS or email, with the invitee's name. fProcessed 0 means the invitation is still open.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [reg\_industry](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry.md)                                         | 10      | One industry offered in the Android app's new-site setup (php-apis list\_industries\_roles\_templates), with a sort order; no row is newer than 2022-07.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [reg\_industry\_business\_templates](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry_business_templates.md) | 11      | Links an industry to a template group (uuid\_tBusiness), with a sort order; create\_parent\_with\_templates clones the chosen template groups into the new site.                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [reg\_industry\_roles](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry_roles.md)                            | 11      | One role offered for an industry in the same new-site setup, with a sort order.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_Log\_PreRegSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_preregsurvey.md)                      | 15      | One call to the pre-registration survey routes, with the device type and the caller's IP lookup: a request for the survey, logged even when none applies, or a submitted answer or dismissal.                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Log\_PreRegSurveyMetadata](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_preregsurveymetadata.md)      | 55      | Flat report rows joining sign-up data, a pre-registration survey row (sy\_ columns) and an API log row (apilog\_ columns), including personal data such as a username and a mobile number. No in-scope code refers to it; 824 rows, the newest from 2024-12 \[[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), [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\_ParentOnboarding](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentonboarding.md)                       | 11      | One onboarding code of a site and group (uuid\_tBusiness). apipy creates and lists the codes, authpy checks them, and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_PreRegSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_preregsurvey.md)                               | 14      | One pre-registration survey, with the form shown during sign-up, when it runs (startTs to endTs), and IP and device type filters. The Laravel API reads it, and no row is newer than 2024-11.                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPub\_Onboard](https://docs.snapfix.com/engineering-reference/db/tables/tpub_onboard.md)                                         | 3       | The membership states a person can have in a group (tPri\_UserBusiness.uuid\_tOnboard), New, Invited, Active, Inactive, Deleted and Ignored. The Laravel API, php-apis, apipy and the apps read it.                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |

## Relations

```mermaid
erDiagram

"reg_industry_business_templates" }o--o| "reg_industry" : "FOREIGN KEY (uuid_reg_industry) REFERENCES reg_industry (uuid)"
"reg_industry_roles" }o--o| "reg_industry" : "FOREIGN KEY (uuid_reg_industry) REFERENCES reg_industry (uuid)"

"dynamiclink_invitation" {
}
"group_invite" {
}
"reg_industry" {
  varchar_255_ uuid
}
"reg_industry_business_templates" {
  varchar_255_ uuid_reg_industry
}
"reg_industry_roles" {
  varchar_255_ uuid_reg_industry
}
"tPri_Log_PreRegSurvey" {
}
"tPri_Log_PreRegSurveyMetadata" {
}
"tPri_ParentOnboarding" {
}
"tPri_PreRegSurvey" {
}
"tPub_Onboard" {
}
```

***

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