SYNC DIAGNOSTICS

CLEARVIEW ADMIN

SYNC ARCHITECTURE

The Screening Log app pushes records to ClearView — ClearView does not pull. Configure the Screening Log app to POST each record to the endpoint below.

ENDPOINT: https://big-clear-view-flow.base44.app/functions/receiveScreeningLogUpdate
AUTH HEADER: x-api-key: [CLEARVIEW_INBOUND_API_KEY]
Required fields: mawb, screening_status (pending/hold/rejected/cleared), method, pieces, hold_reason, rejection_reason, notes, source_record_id, time/screening_cleared_at/screening_rejected_at/screening_hold_at

REBUILD FROM SCREENING LOG

Requires SCREENLOG_API_URL to point to a public API-key-authenticated export function on the Screening Log app. If not configured, use the push endpoint above instead.

…
ShipmentMaster Records
…
Duplicate Canonical MAWBs
…
Not Migrated to Master
…
Stale Pending (>2h)

SHIPMENT MASTER (0)

No records

PUSH SCREENINGENTRY → SHIPMENTMASTER

Reads all ScreeningEntry records in this app and upserts them directly into ShipmentMaster. Run this to bootstrap data.

CLEAN BAD RECORDS

Removes ShipmentMaster + history rows where MAWB is missing, NO MAWB, TEST, or not 11 digits. Run DRY RUN first to preview what will be deleted.

MIGRATE FROM SCREENING ENTRY (LEGACY)

Promotes old ScreeningEntry records into ShipmentMaster. Run this once after initial setup.

LATEST EVENT PER MAWB

No history data yet