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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On wrong assignment reported

> Subscribes when a routing assignment is reported as wrong.

`calcom.onWrongAssignmentReported` subscribes when a routing assignment is reported as wrong.

```ts automations/on-wrong-assignment-reported.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { calcom } from "automate.ax/calcom"

export default automation("On wrong assignment reported", () => {
  const event = calcom.onWrongAssignmentReported()
  markSignificant(event)
})
```

## Event

| Field                                  | Type                        | Required |
| -------------------------------------- | --------------------------- | -------- |
| `createdAt`                            | `string (date-time)`        | Yes      |
| `payload`                              | `object`                    | Yes      |
| `payload.booking`                      | `object`                    | Yes      |
| `payload.booking.endTime`              | `string`                    | Yes      |
| `payload.booking.id`                   | `integer`                   | Yes      |
| `payload.booking.startTime`            | `string`                    | Yes      |
| `payload.booking.status`               | `string`                    | Yes      |
| `payload.booking.title`                | `string`                    | Yes      |
| `payload.booking.uid`                  | `string`                    | Yes      |
| `payload.report`                       | `object`                    | Yes      |
| `payload.report.additionalNotes`       | `string \| null`            | Yes      |
| `payload.report.correctAssignee`       | `string \| null`            | Yes      |
| `payload.report.firstAssignmentReason` | `string \| null`            | Yes      |
| `payload.report.guest`                 | `string \| null`            | Yes      |
| `payload.report.host`                  | `object`                    | Yes      |
| `payload.report.host.email`            | `string (email) \| null`    | Yes      |
| `payload.report.host.name`             | `string \| null`            | Yes      |
| `payload.report.reportedBy`            | `object`                    | Yes      |
| `payload.report.reportedBy.email`      | `string (email)`            | Yes      |
| `payload.report.reportedBy.id`         | `integer`                   | Yes      |
| `payload.report.reportedBy.name`       | `string \| null`            | Yes      |
| `payload.report.routingReason`         | `string \| null`            | No       |
| `triggerEvent`                         | `"WRONG_ASSIGNMENT_REPORT"` | Yes      |

Additional provider fields are preserved.

Automate.ax creates and maintains the Cal.com webhook, verifies `x-cal-signature-256`, and deduplicates provider retries. Use `calcom.onEvent` when one automation should receive every supported Cal.com event.
