> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Technical inspection

> The phone form a technician uses to record the result of a visit to a machine: the case, what was inspected, the result, the component, the notes, the photos and whether the customer was present.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/customer-care/inspection?machine={id}` or `?case={id}` |
| Menu | Machine record › **Add inspection** (not in the side menu) |
| Role | Customer Compensation Technician; Administrator |
| Permission | `customer-compensation-evidence:create-technical` |
| Feature flag | `customer-compensation` |
| Last verified | 2026-11-24 against `develop` (`060621220`) |

## What it is for

"Record the visit's result, the component and the photos." The inspection is a case's strongest evidence: when it
supports the claim, the subject becomes **Confirmed**; when it contradicts it, **Contradicted**. The screen is laid
out for the technician's phone.

## How to get there

* Machine record (MaihueGO › Machines) → **Add inspection**. The form asks you to pick the machine's open case.
* A link `/{locale}/customer-care/inspection?case={id}` opens the form straight on that case (for example one the
  agent shares).

The **Add inspection** button only appears with the inspection permission and the module available.

## What you see

> [!NOTE]
>
> The screenshots of this screen are added with the manual's first capture (desktop, light theme).

| # | Element | What it does |
| - | - | - |
| 1 | **Choose the machine's open case** | The machine's open cases, with their status; **Change case** to choose again |
| 2 | **What did you inspect?** | **The whole case (every subject on the machine)** or **Each subject separately** |
| 3 | **Result** | **Supports the claim** ("The fault was found: the subject becomes confirmed."), **Contradicts the claim** ("The machine worked: the subject becomes contradicted.") or **Inconclusive** |
| 3b | **Result per subject** | With "Each subject separately": one result per subject, or **Not inspected** |
| 4 | **Component** | For example "CO₂ valve, pump, reader" |
| 5 | **Notes** | What you found |
| 6 | **Photos** | **Take or choose photos**: "{count} of {max} left on the case. They are reduced on the phone before sending." |
| 7 | **The customer was present** | Only on **Field** cases |
| 8 | **Save inspection** | Saves and shows each subject's verdict |

## Step by step

**1. Open the form from the machine**

On the machine record, press **Add inspection** and choose the open case you are checking.

**2. Say what you inspected**

**The whole case** when you checked the machine for all its subjects, or **Each subject separately** when the
result differs per subject.

**3. Record the result**

Choose **Supports the claim**, **Contradicts the claim** or **Inconclusive**. Write the **Component** and the
**Notes**.

**4. Take the photos**

**Take or choose photos** opens the camera. Photos are reduced on the phone before upload ("Preparing photos…").

**5. Tick whether the customer was there**

On a **Field** visit, tick **The customer was present** if they were.

**6. Save**

Press **Save inspection**. You see "Inspection saved on {code}" and each subject's verdict. When a maintenance
alert was opened or linked, you see that too. **Record another inspection** or **Back to the case**.

## Business rules

| ID | Rule |
| - | - |
| R-01 | An inspection is recorded only on an open case of the machine |
| R-02 | **Supports the claim** makes the subject **Confirmed**; **Contradicts the claim**, **Contradicted**; **Inconclusive** does not change the verdict |
| R-03 | The latest technical inspection decides the verdict over the system verifications |
| R-04 | Photos (JPG, PNG or HEIC, up to 20 MB each) count within the case's 10 files |
| R-05 | Adding evidence makes the case's pending requests stale: the requester must refresh them before they can be approved |
| R-06 | When the case's cause is machine and a subject becomes Confirmed, a maintenance alert opens for the machine, or the open one is linked |
| R-07 | On a **Field** case, ticking that the customer was present makes it a case with contact: the request will ask for the offered options |

## States and messages

| Situation | What you see |
| - | - |
| Saved | "Inspection saved on {code}" |
| New alert | "A maintenance alert was opened for the machine." |
| Existing alert | "The case was linked to the open maintenance alert." |
| Stale requests | "Pending requests made stale: {count}. The agent has to review them." |
| Machine without cases | "This machine has no open case. Ask an agent to open one." |
| No case or machine | "Open the form from a case or from a machine record." |
| Closed case | "The case is no longer open: it takes no inspection." |

## Errors

| Message | Cause | Action |
| - | - | - |
| "Choose the result." / "Give the result of at least one subject." | Missing result | Choose one |
| "Only JPG, PNG or HEIC photos." | Another file type | Use the phone's camera |
| "A photo is larger than 20 MB." | Photo too large | Take another |
| "A case takes 10 files in all. Remove some photos." | Case limit | Remove photos |
| "The photos are too large to send together. Remove some." | The upload exceeds the allowed size | Remove photos or save in two inspections |
| "{saved} inspections were saved before the error." | Per subject: one failed halfway | **Retry** saves the rest |
| "We could not load the case." | Reading failed | **Retry** |

## Why it works this way

The machine does not measure everything (CO₂, for example), so some complaints can only be confirmed by a person on
site. Photos are reduced on the phone so they upload over a weak mobile signal. The inspection making pending
requests stale ensures nobody approves with the old evidence.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `frontend/horizon-enterprise/app/components/screens/customer-care/inspection-screen.tsx`, `lib/features/customer-compensation/presentation/components/inspection/TechnicalInspectionForm.tsx` and `AddInspectionButton.tsx` |
| API | `GET /api/v3/compensation/case?machine=…`, `GET /api/v3/compensation/case/{id}`, `POST /api/v3/compensation/case/{id}/evidence` as `multipart/form-data` (kind `technical_inspection`, photos under `photos`; stored in the private bucket) |
| SQL function | `customer_compensation_evidence_add` (verdict of the inspected subjects, stale hash on pending requests) |
| Texts | `messages/{es,en}.json` › `modules.customerCare.inspection` |

## FAQ and support cases

> [accordion] I reached the machine and there are no open cases
>
> Ask the agent to open the case (they can do it from the machine record with **Open case**) and go back to **Add
> inspection**.

> [accordion] I checked the machine and it works
>
> Choose **Contradicts the claim**. The agent can then only offer gesture benefits, with tier 2 approval.

> [accordion] I do not see Add inspection on the machine record
>
> You need the Customer Compensation Technician role and the module turned on.

## Related and history

* [Case detail](https://docs.bbrands.io/enterprise/customer-care/case-detail.md)
* [Opening a case](https://docs.bbrands.io/enterprise/customer-care/open-case.md)

| Date | Change |
| - | - |
| 2026-11-24 | First version |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.