> ## 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.

# Bulk incidents

> Compensate at once the customers a machine failure affected in a time slot: build the affected list, review it, ask for one approval of the total and follow each account's result.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/customer-care/incidents` and `/{locale}/customer-care/incidents/{id}` |
| Menu | Customer care › Operations › **Bulk incidents** |
| Role | Customer Compensation Agent (create and request); Customer Compensation Supervisor and Manager (create and approve per their tier); Customer care Admin and Operator (create); Administrator |
| Permission | `customer-compensation-incident:find-all` to see; `:create` to create, review and request; `:approve` plus a tier `customer-compensation:approve-tierN` to approve or reject |
| Feature flag | `customer-compensation` |
| Last verified | 2026-11-24 against `develop` (`060621220`) |

## What it is for

"Compensate at once the customers a machine failure affected in a time slot." Instead of opening a case per customer,
the agent builds the affected list, reviews it and asks for a single approval; the system creates one case and one
compensation per account.

## How to get there

* Side menu → **Operations** › **Bulk incidents** → **New incident**.
* From the list, **View** opens an incident.

## What you see

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

**List**: **Created**, **Status**, **Machine**, **Problem**, **Benefit**, **Total**, **Tier** and **View**.

**"New bulk incident" form**: "The affected list is built from the error recharges and the logged failed attempts of
the machine in the slot."

| # | Field | What it does |
| - | - | - |
| 1 | **Machine** | "Search by number or location" |
| 2 | **Water type** | **Every water type** or one |
| 3 | **From** and **To** | The time slot of the failure |
| 4 | **Problem** and **Benefit** | From the catalogue; only the ones that allow bulk incidents |
| 5 | **Units per account** or **Amount per account (CLP)** | Amount only for amount-valued benefits (account coupon) |
| 6 | **Notify the customers** | Whether each customer is notified when it is applied |
| 7 | **Build the affected list** | Creates the incident as a draft |

**Incident detail**:

| # | Element | What it does |
| - | - | - |
| 1 | Steps | **1. Review**, **2. Approval**, **3. Application**, **4. Done** |
| 2 | Summary | Machine, slot, "No customer contact" and whether customers will be notified; cards **Affected**, **Included**, **Excluded**, **Skipped**, **Compensated**, **Queued**, **Failed**, **Total to compensate** and **Required tier** ("Computed on request") |
| 3 | **Affected accounts** | **Include** (checkbox), **Account**, **Source** (**Error recharge**, **Failed attempt**, **Added by hand**), **Value**, **Result** and **Case** with **Open case** |
| 4 | Add an account | **Account ID** or **Recharge ID** and **Add account** |
| 5 | **Amount per account (CLP)** and **Apply amount** | For amount-valued benefits |
| 6 | Actions | **Request approval**; **Approve** and **Reject** with **Reason for the rejection**; **Cancel incident** with **Reason for the cancellation** |

## Step by step

**1. Create the incident**

**New incident** → choose the machine, the water type, the slot, the problem, the benefit and the units (or the
amount) per account. Press **Build the affected list**. You see "Incident created".

**2. Review the list**

Each account shows where it came from and its expected result: **Will be compensated**, **Already compensated**,
**Over the cap**, **In cooldown** or **No value**. Untick **Include** to exclude an account.

**3. Add anyone missing**

Type the **Account ID** (or the **Recharge ID** of that account on that machine) and press **Add account**. You see
"List updated".

**4. Request approval**

Press **Request approval**: "The list is frozen: the total and the tier leave the skipped accounts out." You see
"Approval requested".

**5. Someone else approves**

A supervisor, manager or administrator with the required tier opens the incident and presses **Approve**, or
writes the **Reason for the rejection** and presses **Reject**.

**6. Follow the application**

"The compensations are being created in batches. This page refreshes by itself." When done: "Incident applied:
each account shows its result." Each account has its case; **Open case** opens it.

## Business rules

| ID | Rule |
| - | - |
| R-01 | The affected list comes from the machine's error recharges and logged failed attempts in the slot; the agent may add or exclude accounts while it is a draft |
| R-02 | The slot may last at most 31 days and the end must be after the start |
| R-03 | It is approved once, at the tier of the total: tier 1 up to CLP 10,000, tier 2 up to CLP 50,000, tier 3 above |
| R-04 | Four eyes: whoever requested the incident does not approve or reject it |
| R-05 | Each included account gets its own case (channel **Proactive**) and compensation, recorded without customer contact |
| R-06 | Per-account caps and the cooldown apply to each account: one already compensated for the same subject, over a cap or inside the cooldown is skipped with its reason; it never blocks the incident |
| R-07 | Skips show in the draft and are checked again when processed |
| R-08 | An incident can be cancelled while **Draft** or **Pending approval**, with a reason |
| R-09 | When the list changed since the approval was requested, approval is refused until you reload |

## States and messages

| Status | What it means |
| - | - |
| **Draft** | Under review; the list can be edited |
| **Pending approval** | List frozen; waits for an approver |
| **Being applied** | Approved; compensations are created in batches |
| **Applied** | Done; each account shows its result |
| **Rejected** / **Cancelled** | Ended without compensating |

| Message | When |
| - | - |
| "Waiting for a supervisor's approval." | You may not approve |
| "You requested this incident: someone else must approve it." | You are the requester |
| "You need tier {tier} to approve this incident." | Your tier is too low |
| "No affected accounts in the slot." | The list is empty |
| "No incidents" · "Create an incident when a machine fails for several customers." | Empty list |

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| "The slot is not valid (31 days at most)." | Slot out of range | `422 compensation:incident_slot_invalid` | Adjust the slot |
| "The problem does not admit bulk incidents." | Problem not allowed | `422 compensation:incident_problem_invalid` | Choose another problem |
| "That benefit cannot be granted by a bulk incident." | Benefit not allowed | `422 compensation:incident_type_unsupported` | Choose another benefit |
| "The recharge is not that account's on this machine." | Hand-added recharge that does not match | `422 compensation:incident_subject_invalid` | Check the ids |
| "Some accounts have no value: exclude them or set the amount." | Accounts without a value on request | `422 compensation:value_unavailable` | Exclude or use **Apply amount** |
| "No account is left to compensate." | All skipped or excluded | `422 compensation:incident_empty` | Review the list or cancel |
| "You cannot approve an incident you requested." | Four eyes | `403 compensation:self_approval` | Someone else approves |
| "Your approval tier does not reach the required one." | Tier too low | `403 compensation:tier_insufficient` | Someone with a higher tier approves |
| "The incident changed since you opened it. Reload the page." | Old hash | `409 compensation:stale_request` | Reload |

When an account fails to apply, its result says "Failed: {reason}" and the administrators and the requester get the
"Bulk incident with failed accounts" notice.

## Why it works this way

A machine failure can affect dozens of customers. One approval for the total puts control where the amount is, and
queued batches keep an error on one account from stopping the rest. Each account gets its own case so its story stays
on its record like any other complaint.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `frontend/horizon-enterprise/app/components/screens/customer-care/incidents-screen.tsx`, `incident-detail-screen.tsx`, `lib/features/customer-compensation/incident/**` |
| API | `GET`/`POST /api/v3/compensation/incident`, `GET /api/v3/compensation/incident/{id}`, `POST …/account`, `…/request`, `…/decision`, `…/cancel` |
| SQL functions | Incident functions of migration `0480` (affected list, review, request, approval) |
| Processing | Queued batches: one case and one compensation per included account, idempotent |
| Notice | `account.compensation-incident.accounts-failed` |
| Texts | `messages/{es,en}.json` › `customerCareIncident` |

## FAQ and support cases

> [accordion] An affected customer is not on the list
>
> When their recharge did not end in error and no failed attempt was logged, they are not added automatically. Add
> them with the **Account ID** or the **Recharge ID** while the incident is a draft.

> [accordion] An account shows Skipped: already compensated
>
> That subject already had a compensation. That is expected: the same thing is never compensated twice.

> [accordion] Are customers notified?
>
> Only when you ticked **Notify the customers** when creating the incident. The summary says so.

## Related and history

* [Approvals and tiers](https://docs.bbrands.io/enterprise/customer-care/approvals.md)
* [Case detail](https://docs.bbrands.io/enterprise/customer-care/case-detail.md)

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


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