> 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/onboarding/company-and-role.md).

# Company and role

{% 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: iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/onboarding/company-and-role.md).
{% endhint %}

The new site's company or team name, its industry and the user's role. Joining hides the industry and uses the industry named "Other".

* **Where:** iOS and Android: setup step 2, after [Start or join](https://docs.snapfix.com/how-the-apps-work/screens/onboarding/start-or-join.md). Android sets its bar to 40; iOS's bar is fixed at 0.35.
* **Who:** people in the app's setup flow, which the current apps do not open ([Start or join](https://docs.snapfix.com/how-the-apps-work/screens/onboarding/start-or-join.md)). Both choices use this screen.
* **Feature:** [Site setup in the app](https://docs.snapfix.com/product/features/onboarding/site-setup.md)

## Layout

1. A back arrow at the top left, and the Snapfix logo.
2. "What is the name of your company or team?" over a text field with the placeholder "Add Name" (Android capitalises words). An error line under it shows "Please enter name of your company or team" after "Next" with an empty field.
3. "What industry are you in?" over a control that reads "Select Your Industry" until one is picked. Hidden when joining.
4. "What is your current role?" over a control that reads "Select Your Role" until one is picked.
5. "Next".

iOS opens each list as a drop-down under its row. Android uses spinners whose first row is the placeholder; until an industry is picked, a "Select Your Role" label covers the role spinner.

The industries come with their roles and work types from [`POST ?action=list_industries_roles_templates`](https://docs.snapfix.com/engineering-reference/api/onboarding.md#post-actionlist_industries_roles_templates). The server orders them by sort order, then name; both apps then sort by sort order only. On staging there are seven: "Asset Management", "Construction", "Education", "Facilities Management", "Hospitality" and "Industrial / Engineering" share one sort order, and "Other" sorts last. Each has six work types, and "Other" has the most roles. Android sorts the roles by their sort order; iOS shows them as received.

## Inputs

| Field                | Type      | Required                               | Default                    | Rules and messages                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------- | --------- | -------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Company or team name | Text      | Yes                                    | Empty                      | Empty on "Next": "Please enter name of your company or team" under the field. A name of only spaces passes on both apps; iOS sends it as typed, Android sends it trimmed (so possibly empty). The name check accepts any name ([`?action=validate_parent_name`](https://docs.snapfix.com/engineering-reference/api/console.md)), so nothing stops a name another site already uses. |
| Industry             | Drop-down | Yes when starting; hidden when joining | None; "Other" when joining | Nothing picked on "Next" while starting: a toast "Please select industry". Picking an industry clears the role.                                                                                                                                                                                                                                                                     |
| Role                 | Drop-down | Yes                                    | None                       | The roles of the picked industry. Nothing picked on "Next": a toast "Please select role". Opening the role list before an industry while starting: a toast "Please select industry first." (iOS) or "Please select industry first" (Android).                                                                                                                                       |

iOS takes these messages from its localized strings. Android writes the toasts in English in code.

When joining, both apps pick the industry named "Other" (iOS exact name, Android ignoring case) and send its ID. iOS fills the role list from "Other". Android fills the role list from the last industry in its sorted list, but reads the picked role from "Other" by position, so label and saved role differ when "Other" is not last. On staging "Other" sorts last, so the two lists match today. When no industry is named "Other", iOS shows an empty role list and "Next" stops at "Please select role", and Android stops at "Please select industry".

## Actions

| Action           | Who                | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | API                                                                                                                                                           |
| ---------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the step    | Anyone in the flow | Loads the industries, with "Refreshing..." (iOS) or "Refreshing…" (Android) while it runs.                                                                                                                                                                                                                                                                                                                                                                                                                                              | [`POST ?action=list_industries_roles_templates`](https://docs.snapfix.com/engineering-reference/api/onboarding.md#post-actionlist_industries_roles_templates) |
| Pick an industry | Anyone starting    | Fills the row, keeps its ID and loads its roles.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | None                                                                                                                                                          |
| Pick a role      | Anyone             | Fills the row and keeps its ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | None                                                                                                                                                          |
| "Next"           | Anyone             | Checks the name, then the industry (starting only), then the role. Then checks the name with the server, with the same loading text. A refusal shows the server's message (iOS: or "Something went wrong. Please try again.") in an alert, and the step stays. On success, starting opens [Work types](https://docs.snapfix.com/how-the-apps-work/screens/onboarding/work-types.md) with the picked industry's work types; joining opens [Grid or list](https://docs.snapfix.com/how-the-apps-work/screens/onboarding/grid-or-list.md). | [`POST ?action=validate_parent_name`](https://docs.snapfix.com/engineering-reference/api/console.md)                                                          |
| Back arrow       | Anyone             | Returns to [Start or join](https://docs.snapfix.com/how-the-apps-work/screens/onboarding/start-or-join.md).                                                                                                                                                                                                                                                                                                                                                                                                                             | None                                                                                                                                                          |

The name check sends `parent_name`. Its duplicate check is commented out on the server, so it accepts any non-empty name. The create call later keeps the typed name only when no site has it, and otherwise keeps the user's own placeholder site name.

## States

* **Loading:** the loading text above, while the industries load and while the name is checked.
* **Empty:** an empty industry list leaves the controls empty, and "Next" stops with the industry message.
* **Error:** a failed industry load: iOS shows the server's message, or "Something went wrong. Please try again.", in an alert with "Ok"; Android logs it, leaves the lists empty and keeps the industry block hidden. On Android an expired session refreshes the token and retries both calls.
* **No permission:** none. The user has no site yet.
* **Offline (mobile):** both apps skip the industry load with no message, so the lists stay empty. On "Next", iOS shows "No Connection" and "You must be connected to the Internet to carry out this task. Please connect and try again."; Android returns with no message, so "Next" seems to do nothing.

## Dialogs and sheets

None besides the alerts and toasts above.

## Platform differences

| Topic                  | iOS                        | Android                              |
| ---------------------- | -------------------------- | ------------------------------------ |
| Industry while joining | Hidden; roles from "Other" | Hidden; roles from the last industry |
| Lists                  | Drop-down under the row    | Spinner with a placeholder row       |
| Messages               | Localized                  | English in code                      |
| Name sent              | As typed                   | Trimmed                              |
| "Next" offline         | "No Connection" alert      | Nothing happens                      |


---

# 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/onboarding/company-and-role.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.
