---
title: Cancel an in-progress import
summary: Removes the local import-status tracking row for a call recording without contacting the CallRex vendor system.
status: draft
owner: <owner>
last_reviewed: 2026-09-15
library: SAIF.Application.Services.AudioVideo
reference_type: package
operation_id: OP-AV-03
trigger: External caller invokes IAudioVideoService.CancelImport with a call recording ID
---

# Cancel an in-progress import

This operation clears the local import-status tracking row for a recording without any CallRex interaction, letting a caller abandon an in-progress or errored import.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AV-03 |
| **Trigger** | External caller invokes `IAudioVideoService.CancelImport(Guid callRecordingId)`. |
| **Inputs** | `Guid callRecordingId` |
| **Outputs** | None (void). |
| **Primary components** | `AudioVideoService.CancelImport` |
| **Entry point** | `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs` |

## Steps

1. Guard: throw `NotImplementedException` if the service was constructed via the degraded constructor (`_enableServicesFlag == false`).
2. Remove the `AudioImportStatus` row by calling `_importStatusManager.RemoveStatus(callRecordingId)`. No CallRex interaction occurs.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([CancelImport invoked]) --> Guard{Degraded mode?}
	Guard -->|Yes| ErrNotImpl([NotImplementedException])
	Guard -->|No| Remove[Remove AudioImportStatus row]
	Remove --> End([Return])
```

## Failure and edge-case behavior
- Degraded-mode construction blocks this operation entirely with `NotImplementedException`.
- Calling this operation for a `callRecordingId` with no tracked status row is a no-op.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs`
- `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\ImportStatusManager.cs`
