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

# dynamiclink

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

## Description

One short link for a user or QR invitation, a password reset or a profile check, with counters for how often it was opened and used. A QR sign-up link stores the sign-up form, password included.

<details>

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

```sql
CREATE TABLE `dynamiclink` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shorturl` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'qrcode-invitation, user-invitation, reset_password, verify_profile',
  `reg_payload` json DEFAULT NULL,
  `origin` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'web, ios, android, webadmin, onboardingapp, na',
  `uuid_tUser` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'for forgotpassword',
  `tx_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'na' COMMENT 'sms, email, na',
  `count_opened` int DEFAULT '0',
  `count_used` int DEFAULT '0',
  `fDeleted` tinyint DEFAULT '0',
  `fCreatedTs` bigint DEFAULT NULL,
  `fModifiedTs` bigint DEFAULT NULL,
  `fServerTs` bigint DEFAULT NULL,
  `uuid_tUser_CreatedBy` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC
```

</details>

## Columns

| Name                    | Type         | Default | Nullable | Extra Definition | Children                                                                                                                                                                                                        | Comment                                                                                                                                                       |
| ----------------------- | ------------ | ------- | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                      | int          |         | false    | auto\_increment  |                                                                                                                                                                                                                 |                                                                                                                                                               |
| uuid                    | varchar(255) |         | true     |                  | [dynamiclink\_invitation](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink_invitation.md) [dynamiclink\_user](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink_user.md) |                                                                                                                                                               |
| shorturl                | varchar(255) |         | true     |                  |                                                                                                                                                                                                                 | The link domain followed by ?ctx= and the row's uuid; no Firebase Dynamic Link is made.                                                                       |
| title                   | varchar(255) |         | true     |                  |                                                                                                                                                                                                                 |                                                                                                                                                               |
| description             | varchar(255) |         | true     |                  |                                                                                                                                                                                                                 |                                                                                                                                                               |
| type                    | varchar(50)  |         | true     |                  |                                                                                                                                                                                                                 | qrcode-invitation, user-invitation, reset\_password or verify\_profile.                                                                                       |
| reg\_payload            | json         |         | true     |                  |                                                                                                                                                                                                                 | The QR sign-up form as JSON, with the new password in plain text. php-apis clears it when the registration succeeds; a failed or unfinished sign-up keeps it. |
| origin                  | varchar(50)  |         | true     |                  |                                                                                                                                                                                                                 | Client that made the link, from the fOrigin header: web, ios, Android (capital A on staging), webadmin, onboardingapp or na; NULL on 45 staging rows.         |
| uuid\_tUser             | varchar(255) |         | true     |                  |                                                                                                                                                                                                                 | for forgotpassword                                                                                                                                            |
| tx\_type                | varchar(50)  | na      | true     |                  |                                                                                                                                                                                                                 | sms, email or na.                                                                                                                                             |
| count\_opened           | int          | 0       | true     |                  |                                                                                                                                                                                                                 |                                                                                                                                                               |
| count\_used             | int          | 0       | 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                                                                                                                                                          |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [account](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-0.md) | Signing in, passwords, verification codes, devices and sign-in tokens, single sign-on, app start and consent logs, and the links that open the app (dynamic links). |

## 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

"dynamiclink_invitation" }o--o| "dynamiclink" : "FOREIGN KEY (uuid_dynamiclink) REFERENCES dynamiclink (uuid)"
"dynamiclink_user" }o--o| "dynamiclink" : "FOREIGN KEY (uuid_dynamiclink) REFERENCES dynamiclink (uuid)"

"dynamiclink" {
  int id PK
  varchar_255_ uuid
}
"dynamiclink_invitation" {
  int id PK
  varchar_255_ uuid_dynamiclink FK
}
"dynamiclink_user" {
  int id PK
  varchar_255_ uuid_dynamiclink FK
}
```

***

> 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/dynamiclink.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.
