> 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/how-the-apps-work/screens/integrations/guestline.md).

# Guestline

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/integrations/guestline.md).
{% endhint %}

Snapfix staff link a Snapfix site to its Guestline property: the Guestline login, the site's Guestline admin, and a mapping of Guestline housekeeping codes to the Snapfix red, amber and green statuses.

* **Where:** admin app (webadmin\_angular) `/guestline`, side menu "Guestline"; the menu item has no role check (webadmin\_angular @ db972390b8, `src/app/app-routing.module.ts:92-96`, `src/app/app.component.ts:163-185`). The [Accounts](https://docs.snapfix.com/how-the-apps-work/screens/staff/accounts.md) page has a second dialog for the same link ([below](#guestline-detail-dialog-accounts-page)).
* **Who:** anyone signed in to the admin app, which is meant for Snapfix staff. The sign-in page turns away users without the staff flag `fSnapfixWebAdminUser` only in the browser, and the route checks only that a session is stored. No server call the page makes checks the staff flag: apipy's Guestline routes need only a sign-in, and the php-apis Guestline actions only a valid token.
* **Feature:** [PMS integrations](https://docs.snapfix.com/product/features/integrations/pms-integrations.md), in the [staff admin app](https://docs.snapfix.com/product/features/staff/staff-admin.md)

The Guestline sync does not read what this page saves. It reads its own building and room status mappings, which only the php-apis Guestline onboarding actions write, so a link saved here changes nothing in what Snapfix exchanges with Guestline \[[ASK-153](https://github.com/snapfix/docs/blob/main/ASK.md#ask-153-should-the-admin-apps-guestline-page-feed-the-guestline-sync)] (guestline\_py\_server @ 6aa8239243, `app/models/models.py:7-56`; php-apis @ 238ca4414e, `htmlphp/api/snapfix/class/guestline.functions.php:212-231`, `:413-432`). The sync is described in the [Integrations API](https://docs.snapfix.com/engineering-reference/api/integrations.md).

## Layout

1. **Header.** The title "Guestline". On the left, a "+" button with the text "Create a new Guestline Mapping"; on the right, "Add/Remove columns" with a menu button that opens "Show Columns".
2. **Site table.** One row per Guestline link that is not deleted, enabled or disabled, in the order of the site names, with 10, 20, 50 or 100 rows per page. At most 50 links load, so the paging only splits those. The table scrolls sideways; its last column, "Action", stays in view at the right.
3. **Groups.** The first column expands a row into a table of the groups attached to that link, with "Group UUID", "Group Name" and "Action". The page cannot add or remove these groups, and no code in the repos writes them (apipy @ 0e83c85e5a, `model/gl/gl_business.py:39-50` only reads them).

| Column             | Shows                                     | Shown by default |
| ------------------ | ----------------------------------------- | ---------------- |
| (expand)           | Opens the row's groups                    | Yes              |
| "Account UUID"     | The Snapfix site's ID                     | No               |
| "Account Name"     | The site's name                           | Yes              |
| "Admin User Name"  | The Guestline admin's first and last name | Yes              |
| "GL Interface ID"  | The Guestline interface ID                | Yes              |
| "GL Operator Code" | The Guestline operator code               | Yes              |
| "GL Site ID"       | The Guestline site ID                     | Yes              |
| "Action"           | "Edit", and the site switch               | Yes              |

"Show Columns" lists the six data columns as checkboxes. The choice holds for the visit only; nothing stores it.

The site switch's tooltip is "Disable Account" while the link is enabled and "Enable Account" while it is disabled. Each group row's "Action" has the group switch, "Disable Group" or "Enable Group" by the same rule.

## Inputs

The page has no inputs of its own. The dialog "Guestline Snapfix Integration Details" holds the form and the mapping; "+" opens it for a new link and "Edit" for a stored one ([Dialogs and sheets](#guestline-snapfix-integration-details)).

### Form

| Field           | Type                                     | Required | Default                                                       | Rules and messages                                                                                                                                                                                                                                                                                                                 |
| --------------- | ---------------------------------------- | -------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Site ID"       | Text                                     | Yes      | The stored Guestline site ID; empty for a new link            | "Please input Site ID"                                                                                                                                                                                                                                                                                                             |
| "Interface ID"  | Text                                     | Yes      | The stored interface ID; empty for a new link                 | "Please input Interface ID". Any text passes, but "Fetch Status From Guestline To Map with Snapfix" sends it as a number, so text that is not a number reaches the server as `null`                                                                                                                                                |
| "Operator Code" | Text                                     | Yes      | The stored operator code; empty for a new link                | "Please input Operator Code"                                                                                                                                                                                                                                                                                                       |
| "Password"      | Password, with an eye icon that shows it | Yes      | Empty, also when editing: no call returns the stored password | "Please input Password". It has to be typed again for every save. Save sends it as typed, and apipy stores it encrypted with a key written in its code                                                                                                                                                                             |
| "Account"       | Site picker ("Type to search account")   | Yes      | Set by the picker (see below)                                 | "Please select Account"                                                                                                                                                                                                                                                                                                            |
| "Account Admin" | User picker                              | Yes      | The stored admin; empty for a new link                        | "Please select Account Admin". Disabled until the "Account" picker reports a site. Lists that site's users who are not deleted and have a legacy name (`fName`), sorted by that name and shown with the username. When the account changes, the list reloads but the chosen admin stays, although that user is not in the new list |

The "Account" picker loads sites 50 at a time from [`GET /v4/parents`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4parents), searches the server one second after typing stops, and loads more when its list is scrolled to the end (webadmin\_angular @ db972390b8, `src/app/components/accounts-select/accounts-select.component.ts:70-142`):

* When its first page arrives, it selects the first site of that page and reports it to the form. For a new link that is the first site in the list, so "Account" is filled before staff choose and "Please select Account" does not show. For an edit, the first page is a search by the stored site's name, so its first result replaces the stored site, and it can be another site whose name contains the same text.
* Clearing it with its clear icon reloads the list but tells the form nothing, so the form keeps the last site and Save still sends it.

### Mapping

Below the form, under "Guestline to Snapfix Mapping" (webadmin\_angular @ db972390b8, `src/app/pages/guestline/components/guestline-mapping/guestline-mapping.component.ts:30-90`, `src/app/pages/guestline/components/guestline-modal/guestline-modal.component.ts:124-150`):

| Part                                                                                                                      | Rules                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Lists "Unmapped Status", "Red Status", "Amber Status" and "Green Status"                                                  | Each holds Guestline housekeeping codes, shown and saved as their Guestline description. Codes are dragged from list to list. "Fetch Status From Guestline To Map with Snapfix" adds to "Unmapped Status" the codes that are in no list yet. An edit starts with the stored codes of each colour, and "Unmapped Status" empty. |
| Selects "Snapfix Red to Guestline Mapping", "Snapfix Amber to Guestline Mapping" and "Snapfix Green to Guestline Mapping" | Each is marked required and offers only the codes of its own colour; it can be searched and cleared. An edit starts with the stored choice if it is still one of the colour's codes.                                                                                                                                           |

* Dragging a code clears it wherever it was a colour's choice, and emptying a colour clears that colour's choice.
* "Save" stays disabled, with no message, until the form is valid and Red, Amber and Green each have at least one code and a choice.
* Save sends each colour's codes as `gl_housekeeping_gl_to_sf_mapping` and each colour's choice as `gl_roomstatus_gl_to_sf_mapping`; "Unmapped Status" is not saved. The choice is a housekeeping code, although the field is named for room statuses \[[ASK-153](https://github.com/snapfix/docs/blob/main/ASK.md#ask-153-should-the-admin-apps-guestline-page-feed-the-guestline-sync)].

## Actions

| Action                                            | Who                               | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | API                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the page                                     | Anyone signed in to the admin app | Loads the links. The page sends no paging, so the API returns its default 50 and a 51st link never shows. A failed load, and a Guestline with no links (which the API answers as a failure, "no records found"), leave the table empty with no message.                                                                                                                                                                                                                                                                                                                                                        | [`GET /guestline-parents`](https://docs.snapfix.com/engineering-reference/api/integrations.md#get-guestline-parents)                                                                                                                                                                  |
| Expand a row                                      | Same                              | Loads the groups of that link the first time the row opens; later openings during the visit show the same list. At most 50 groups load. A failed load is kept as an empty list, with no message and no retry until the page is opened again.                                                                                                                                                                                                                                                                                                                                                                   | [`GET /guestline-parent/{gl_parent_uuid}/businesses`](https://docs.snapfix.com/engineering-reference/api/integrations.md#get-guestline-parentgl_parent_uuidbusinesses)                                                                                                                |
| Show or hide a column                             | Same                              | Changes the table only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | None                                                                                                                                                                                                                                                                                  |
| "Disable Account" or "Enable Account"             | Same                              | Sends the switch for the link. The server refuses every switch with "service temporarily not available!", the page shows that message as an error, and nothing changes \[[ASK-152](https://github.com/snapfix/docs/blob/main/ASK.md#ask-152-should-the-guestline-pages-on-and-off-switches-work)]. The call also sends the Snapfix site's ID where the route looks up the Guestline link's ID. If a switch ever succeeded, the page would mark the first row of the table instead of the clicked one. The call is a GET that changes data.                                                                     | [`GET /guestline-parent/{uuid}/status/{enabled_status}`](https://docs.snapfix.com/engineering-reference/api/integrations.md#get-guestline-parentuuidstatusenabled_status)                                                                                                             |
| "Disable Group" or "Enable Group"                 | Same                              | Sends the switch for one group and is refused the same way. It sends the Snapfix site's and group's IDs where the route expects the Guestline link's and group's IDs. Also a GET that changes data.                                                                                                                                                                                                                                                                                                                                                                                                            | [`GET /guestline-parent/{gl_parent_uuid}/business/{gl_business_uuid}/status/{enabled_status}`](https://docs.snapfix.com/engineering-reference/api/integrations.md#get-guestline-parentgl_parent_uuidbusinessgl_business_uuidstatusenabled_status)                                     |
| "+"                                               | Same                              | Opens the dialog for a new link, with an empty form. Its pickers load the sites, then the users of the site the "Account" picker selects.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [`GET /v4/parents`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4parents), [`?action=read_users`](https://docs.snapfix.com/engineering-reference/api/users.md)                                                                                                   |
| "Edit"                                            | Same                              | Opens the dialog with the row's values, admin and mapping, and an empty password. The pickers load as for "+".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | As for "+"                                                                                                                                                                                                                                                                            |
| "Fetch Status From Guestline To Map with Snapfix" | Same                              | Enabled while the form is valid. Sends the Site ID, Interface ID, Operator Code and Password to the server, which signs in to Guestline and returns Guestline's answer, over a connection without certificate checks. If the answer holds a session, the page asks for the housekeeping codes and adds them to "Unmapped Status". Guestline's error text from either call shows as an error. An answer with neither a session nor an error code shows nothing. When Guestline returns exactly one code, none is listed. After an HTTP error the button keeps spinning (see **Error** under [States](#states)). | [`POST ?action=admin_guestline_login`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_guestline_login), then [`POST ?action=admin_guestline_statuses`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_guestline_statuses) |
| Drag a code                                       | Same                              | Moves a code between the four lists ([Mapping](#mapping)).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | None                                                                                                                                                                                                                                                                                  |
| Save                                              | Same                              | Sends the form and the mapping: a new link is created, a stored one is changed. On success the page shows "Success", closes the dialog and reloads the table. A refusal shows the API's message and keeps the dialog open. An edit whose "Account" changed moves the link, with its Guestline login, to that site, even when that site has a link of its own.                                                                                                                                                                                                                                                  | [`POST /guestline-parent`](https://docs.snapfix.com/engineering-reference/api/integrations.md#post-guestline-parent) for a new link, [`PUT /guestline-parent/{uuid}`](https://docs.snapfix.com/engineering-reference/api/integrations.md#put-guestline-parentuuid) for an edit        |
| Cancel                                            | Same                              | Closes the dialog without saving. Disabled while a save runs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | None                                                                                                                                                                                                                                                                                  |

## States

* **Loading:** a spinner over the site table while the links load, and over a group table while its groups load. A switch spins while its call runs. In the dialog, "Fetch Status From Guestline To Map with Snapfix" and "Save" spin while they run; during a save, "Cancel", the close icon and a click outside the dialog are turned off.
* **Empty:** the site table shows the table component's default empty placeholder; the page sets no text of its own. A failed load looks the same.
* **Error:** a refused switch, "Fetch Status From Guestline To Map with Snapfix" or Save shows the server's message as an error. A call that fails at the HTTP level shows the server's message, or "Internal server error" when there is none, except a `401` or `409`, which shows nothing. The link and group lists show nothing when they fail. After an HTTP error on the Guestline login, "Fetch Status From Guestline To Map with Snapfix" keeps spinning and cannot be pressed again until the dialog is reopened. An expired session causes this without any message: the admin app renews the session after a `401` on every call except its own sign-in calls, which it recognises by the text "login" in the address, and `admin_guestline_login` contains it.
* **No permission:** none. Everyone who gets past the sign-in sees every link and can change it (see **Who**).

## Dialogs and sheets

### Guestline Snapfix Integration Details

The dialog for a new link ("+") and for "Edit". Top to bottom: the divider "Guestline Details" over the [form](#form), the button "Fetch Status From Guestline To Map with Snapfix", the divider "Guestline to Snapfix Mapping" over the [mapping](#mapping), and the footer buttons "Cancel" and "Save". Outside a save, its close icon and a click outside it close it without saving.

### Guestline detail dialog (Accounts page)

The [Accounts](https://docs.snapfix.com/how-the-apps-work/screens/staff/accounts.md) page opens a second dialog for a site's Guestline link from each row's menu item "Guestline Detail"; its fields and states are described there. It differs from this page's dialog:

* Its title reads "Guestline Snapfix Intergation Details", its admin field is "Select Admin" (the site's users, listed as above), and it asks for the password twice ("Confirm Password"). It has no account picker and no mapping, so it never changes the mapping.
* It loads the site's stored values when it opens, without the password. A site with no link gets an empty form and no message. It reads the stored admin first, so for a link whose admin is missing or deleted it also opens empty and its save fails; this page's dialog can still set a new admin for a link whose admin is deleted.
* Save first checks the login with Guestline and saves only if Guestline returns a session. It saves through php-apis, which stores the password in plain text, and it cannot create a link: for a site without one the save fails with "guestline info not found!".
* API: [`POST ?action=admin_read_gl_parent`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_read_gl_parent) when it opens; [`POST ?action=admin_guestline_login`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_guestline_login), then [`POST ?action=admin_modify_gl_parent`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_modify_gl_parent) on Save.

## Platform differences

Web only, in the staff admin app. The customer web and mobile apps have no Guestline screen ([Integrations screens](https://docs.snapfix.com/how-the-apps-work/screens/integrations.md)).


---

# 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/how-the-apps-work/screens/integrations/guestline.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.
