> 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/product/features/staff/support-tools.md).

# Support tools

{% 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)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/product/features/support-tools.md).
{% endhint %}

Support staff use two tools in the [staff admin app](https://docs.snapfix.com/product/features/staff/staff-admin.md). The **support logs** keep each site's **support minutes**: the time a customer has bought, the time staff have worked for them, and free credit. Staff add an entry for each change, approve or delete entries, and see the minutes left. The **SMS/E-mail delivery** tool lists the text messages and emails that Snapfix sent, with the provider's status, so staff can check whether a message arrived.

## Rules

### Support minutes

* Each site has one log. Staff pick the site with the account picker, which picks the first site when the page opens ([Support logs](https://docs.snapfix.com/how-the-apps-work/screens/staff/support-logs.md)).
* An entry has one of four types, shown as "Delete (remove hours added by accident)", "Deposit (add in hours that a customer has just purchased from us)", "Withdraw (log the time you have spent working on customer tasks)" and "Credit (add free credit into an account - needs approval)", with a description and a number of minutes ([New Support Log](https://docs.snapfix.com/how-the-apps-work/screens/staff/support-logs.md#new-support-log)).
* The "Delete" type deletes nothing: the server stores it as a note whose minutes are not counted, so it does not take back hours added by mistake.
* The server refuses 0 minutes for a deposit, withdrawal or credit. Neither the form nor the server refuses negative minutes.
* A new credit replaces the site's earlier credit entries, which the server marks deleted ([New Support Log](https://docs.snapfix.com/how-the-apps-work/screens/staff/support-logs.md#new-support-log)).
* The minutes left are the deposits plus the credit minus the withdrawals. The page shows them with the credit, deposit and withdrawal totals once the log has loaded ([Support hours object](https://docs.snapfix.com/engineering-reference/api/staff.md#support-hours-object)).
* Entries count as soon as they are added: approval only marks an entry approved, by the signed-in user, and anyone can approve any entry, their own included. Approved entries can still be deleted, with no other warning. What approval should mean, and who may approve or delete, is open \[[ASK-203](https://github.com/snapfix/docs/blob/main/ASK.md#ask-203-what-should-approving-support-minutes-mean-and-who-may-approve-or-delete-entries)] ([Support logs](https://docs.snapfix.com/how-the-apps-work/screens/staff/support-logs.md#actions)).
* The "Approved By" column shows the creator's name, not the approver's.
* The support-hours routes check no staff flag and no tie to the site, so any signed-in user could read and change any site's log. An approval or delete changes only the site in the request, so another site's entry is left alone while the answer says it worked ([`PUT /support-hours/{parent_uuid}`](https://docs.snapfix.com/engineering-reference/api/staff.md#put-support-hoursparent_uuid)).

### Delivery logs

* The page has two tabs, "SMS" and "Email", each listing every customer's messages, newest first, paged on the server at 10 to 100 rows ([SMS/E-mail delivery](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md)).
* An SMS row shows when it was sent, the phone number, the status, the message ID, the type, the cost in US dollars and the source; an email row shows when it was sent and delivered, the recipient, the subject, the event type and the provider's status detail, which is blank on delivery events. More columns can be shown ([Layout](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md#layout)).
* Searchable columns filter on the server, as a contains-match, and searches on several columns apply together; blank text is not sent. Sorting is on the server too ([Inputs](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md#inputs)).
* The tool only reads: its calls change nothing ([`GET /sms-logs`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-sms-logs), [`GET /email-logs`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-email-logs)).
* "Sent At" and "Delivered At" are in UTC, while "Created" is in the browser's time zone, and no column says which.
* The log routes check no staff flag, so any signed-in user of any customer could read every customer's messages. They put the filter values into their SQL, which lets any signed-in user read any table. They take any page size.

## Flow

```mermaid
flowchart TD
  pick["Support logs: pick a site"] --> log["Totals and entries"]
  log --> add["New entry: type, description, minutes"]
  add --> kind{"Type"}
  kind -- "Delete" --> note["Stored as a note; minutes unchanged"]
  kind -- "Deposit, Withdraw or Credit" --> counted["Counted in the minutes left at once"]
  counted --> approve["Approve: only marks it approved"]
  log --> remove["Delete an entry, approved or not"]
  tabs["SMS/E-mail delivery: SMS or Email tab"] --> search["Search, sort and page on the server"]
```

## Platforms

| Capability                                 | Web                   | iOS | Android |
| ------------------------------------------ | --------------------- | --- | ------- |
| Support minutes: entries, totals, approval | Yes, in the admin app | No  | No      |
| SMS and email delivery logs                | Yes, in the admin app | No  | No      |

## Screens

* [Support logs](https://docs.snapfix.com/how-the-apps-work/screens/staff/support-logs.md): a site's support minutes, entries, approvals and deletions.
* [SMS/E-mail delivery](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md): the SMS and email delivery records of all customers.

## API and data

* Support minutes: [`GET /support-hours/{parent_uuid}`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-support-hoursparent_uuid), [`POST /support-hours/{parent_uuid}`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-support-hoursparent_uuid), [`PUT /support-hours/{parent_uuid}`](https://docs.snapfix.com/engineering-reference/api/staff.md#put-support-hoursparent_uuid) and [`DELETE /support-hours/{parent_uuid}/{log_uuid}`](https://docs.snapfix.com/engineering-reference/api/staff.md#delete-support-hoursparent_uuidlog_uuid) ([Support hours object](https://docs.snapfix.com/engineering-reference/api/staff.md#support-hours-object)); the site picker uses [`GET /v4/parents`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4parents).
* Delivery logs: [`GET /sms-logs`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-sms-logs) and [`GET /email-logs`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-email-logs).
* Tables: [`tPri_ParentSupportAccount`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentsupportaccount.md) (support entries), [`tbl_sms_logs`](https://docs.snapfix.com/engineering-reference/db/tables/tbl_sms_logs.md) and [`tbl_email_logs`](https://docs.snapfix.com/engineering-reference/db/tables/tbl_email_logs.md) (the providers' delivery events, written by apipy).

## Depends on

* [Contacting support](https://docs.snapfix.com/product/features/help/contact-support.md): the customer side of asking Snapfix for help.
* [Customer administration](https://docs.snapfix.com/product/features/staff/customer-admin.md): the sites and the account picker.
* The messages in the delivery logs: one-time codes ([Sign-in](https://docs.snapfix.com/product/features/account/sign-in.md), [Password reset](https://docs.snapfix.com/product/features/account/password-reset.md)), invitations ([Joining a site](https://docs.snapfix.com/product/features/onboarding/join-site.md)) and the links they carry ([Email and SMS links](https://docs.snapfix.com/product/features/account/email-links.md)).
* [Staff admin app](https://docs.snapfix.com/product/features/staff/staff-admin.md): the sign-in and the menu.

## Edge cases

* **No site chosen:** "Create a new Support Log" still opens, and the save fails with "invalid parent".
* **Picker cleared:** the previous site's log stays, and new entries still go to that site.
* **Deleted sites:** they can be picked in the support logs \[[ASK-223](https://github.com/snapfix/docs/blob/main/ASK.md#ask-223-should-deleted-accounts-be-selectable-for-card-payments-and-support-logs)].
* **No entries:** the table is empty and the totals stay hidden, with no message.
* **Failed loads:** no message shows. An answer that is not a success empties the table; a failed request keeps the previous rows on screen, and in the support logs the next entries go to the newly picked site.
* **Failed approve, delete or save:** the server's message shows.
* **Dates:** "Created Date", "Approved Date" and "Created" use the week-numbering year, so a date near New Year can show the wrong year.
* **Offline:** not applicable; the admin app is web only.


---

# 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/product/features/staff/support-tools.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.
