Companies¶
Create, edit, and manage tenant companies in the platform.
Required role
PegotecUser — cross-tenant operation. Customer Admins don't see this page; they configure their own company in Profile and settings.
Overview¶
Each company is a tenant — a scoped set of users, assets, tasks, reports, and settings. In a single-installation, multi-tenant deployment, the Companies page is where Pegotec staff create new tenants, regenerate their API tokens (for mobile pairing), and manage activation / deactivation.
Customer Admins never see or need this page. If you're an Admin reading this, you're in the wrong role — jump to Profile and settings for company-level configuration inside your own tenant.
Prerequisites¶
- You have the PegotecUser role.
- You have context on the customer you're onboarding (name, environment, billing status).
Open the companies page¶
Companies in the sidebar (visible only to PegotecUser). The list shows:
| Column | Meaning |
|---|---|
| Name | Customer company name. |
| Environment | production / staging / development. |
| Users | Count of active users. |
| Active | On / off toggle. |
| Created | When the company was provisioned. |
Create a company¶
1. Click New company¶
2. Fill in the form¶
| Field | Required | Notes |
|---|---|---|
| Name | Yes | Customer-visible. Appears in their portal header and email notifications. |
| Environment | Yes | production / staging / development. Non-production environments are for internal testing. |
| Base URL (if multi-URL installation) | Conditional | The URL the customer will use. |
| Timezone | Yes | Customer's primary timezone. Drives all scheduling and report boundaries. |
| Default language | Yes | Seeds new user accounts. |
| Contact email | Recommended | Goes to your internal records, not customer-facing. |
3. Save¶
The company is created in an inactive state.
4. Copy the API token¶
Immediately after creation, the portal shows the generated API token once:
Copy now or regenerate later
This is the only time the token is shown in full. If you miss it, you'll have to regenerate — which invalidates the original and requires the customer to re-pair any mobile devices.
Copy the token into your password manager. You'll need it when the customer wants to provision their first mobile device (the token is encoded into the QR code they scan).
5. Activate the company¶
Once you've tested the configuration (created a test user, signed in, ran one task), flip Active to on. The customer can now sign in.
Regenerate the API token¶
When to regenerate:
- Scheduled rotation (quarterly is typical).
- Suspected token leak.
- Staff turnover on your side.
Steps¶
- Companies → (row) → Details.
- Regenerate API token.
- Confirm in the warning modal.
- Copy the new token immediately — same rule as first creation.
- Communicate to the customer — they'll need to re-pair mobile devices with the new QR code.
Mobile devices need re-pairing
Once you regenerate the token, every paired mobile device fails authentication. The customer should re-pair all field devices on a coordinated rotation so nobody loses a day of work.
Edit a company¶
Companies → (row) → Edit. You can change:
- Name.
- Timezone.
- Default language.
- Contact email.
Environment and Base URL are usually not editable after creation — changing them would break every paired mobile device. If you need to move a company to a different environment, create a new one and migrate data.
Activate / deactivate¶
Deactivate¶
Reversible. Stops all access without deleting data.
- Temporary pause: contract dispute, extended maintenance window, customer on sabbatical.
- Users can't sign in.
- Scheduled tasks continue to generate in the background unless you also pause scheduling.
- Data stays intact.
Reactivate¶
Flip back. Users can sign in immediately.
Delete a company¶
Rare. Only when:
- The customer was created in error.
- The customer has formally offboarded and retention policy says delete.
Deletion is destructive
All users, tasks, assets, reports, and photos are gone permanently. Run a data export first if your retention policy requires it.
- Companies → (row) → Delete.
- Type the company name to confirm.
- Click Delete permanently.
Link / unlink users¶
When a customer needs a user that exists in another company:
- Open the company.
- Users tab.
- Add existing user — picks from the global user list (PegotecUser-only view).
- Pick the user.
- Save.
The user now has access to both companies. Their effective role in each company is independent.
This is rare. Most users belong to exactly one company.
Multi-company users (PegotecUser only)¶
Only PegotecUser can belong to multiple companies and switch between them. For customer users, one-user-one-company is the norm.
Things to watch for¶
Don't onboard customers in production first
Create the staging tenant first. Smoke-test there. Then create the production tenant. Mixing up staging and production in early config is easy to do and painful to undo.
Document the token storage
Put a pointer in your customer's support ticket: where is their token stored internally. When someone else picks up the account, they shouldn't have to dig for it.
Deleting a company is irreversible
Consider the long tail — auditors may want historical data years later. Deactivate unless policy truly requires deletion.
Common patterns¶
New customer onboarding¶
- Create staging tenant first.
- Copy staging token → send to customer for staging pairing.
- Customer smoke-tests end-to-end.
- Create production tenant.
- Copy production token → customer pairs production devices.
- Activate production.
- Hand off account to customer support.
Customer offboarding¶
- Export any data per retention policy.
- Deactivate (first step — stop access).
- Wait out any cooling-off period.
- Delete (if policy requires).
Environment cleanup¶
Quarterly: list all companies, sort by Last activity. Anything inactive for > 12 months is a candidate for deactivation or deletion (depending on what it is — customer vs internal test tenant).
Troubleshooting¶
| Problem | Fix |
|---|---|
| New tenant can't sign in | Confirm the Active toggle is on |
| Mobile pairing fails | Token may be wrong; regenerate and re-send QR |
| Reports in the new tenant are empty | Expected on day one — data accumulates as users work |
| Wrong timezone on reports | Edit company timezone; re-run report |
| Deleted the wrong company | Data is gone; use audit log to establish timeline; restore from backup is a support escalation |
Related topics¶
- PegotecUser handbook — role overview.
- User management — users within a single tenant.
- Profile and settings — customer Admin's equivalent.
- Pairing and setup (mobile) — downstream of the token.
- Admin handbook — what customer Admins do.