Project-A - Export - Cargo Reporting & Declaration Contingency (Customs Business Continuity Plan)

A. Problem Statement / Objective In the event of an TPS outage, TPS slow response times, TPS specific issues, and/or client system problems it is critical that industry be able to continue normal daily business with minimal disruption through alternate cargo reporting procedures. B. Feature Benefit Hypothesis This functionality implements the TPS Customs Business Continuity Plan (BCP) to guide the risk assessment, reporting and clearance process for the legitimate movement of cargo during any declared contingency period i.e. contingency movement and release during TPS or client system outages. C. Business Process 1. Electronic communication is the only option by Industry and CBF for communicating contingency data. The new TPS Business Continuity System (TPS BCS) available from 2022. TPS users who register for the new TPS BCP subscription list will be able to access the new TPS BCS secure email channel. This channel will be used to submit Contingency files for processing and receive outcome notifications during an TPS BCP event. Only subscribed users with a valid TPS Digital Certificate linked to an email address can send Contingency files for processing during an TPS BCP event. To access the new TPS BCP secure email channel, users will need to sign emails and Contingency files using their TPS Digital Certificate and encrypt them using the TPS BCS Public Key that will be attached to notification event emails sent from the BCS. 2. All contingency files submitted to the Department MUST be submitted in the TPS within 24hrs of it becoming operational. 3. A contingency release is valid for 24 hours after the cessation of an outage. 4. The CSV files must not include any commas, inverted commas, brackets or slashes within the data provided against any field. 5. File Naming Convention Prefix The spreadsheet file is saved as a comma separated value (.csv) file in TEXT format. The number of alpha/numeric characters in the reference can vary between 0 and 70 There are no spaces or wildcard characters in the name. 6. Export Declarations and Export Sub-Manifests (1 hour) a. Multiple entries can be made on the same CSV export declaration file where those exports are being delivered to the same establishment – that is, the same “Port of Loading”. b. Generate a .csv file per Customs template. c. File Naming Convention Transaction Naming Convention Export Declaration EDN+Your Reporting Party ID+Export Date+Time+Sender's Reference No.csv EDN+Your Reporting Party ID+Export Date+Time+Port of Loading+MULTIPLE.csv i.e. EDN830039261812505121709B10195138.csv EDN830039261812505121709PERMULTIPLE.csv Search Criteria → Export Date, 1Z Lead HAWB (allow multiple HAWBs), Port of Loading Export Sub Manifest CRN+Your Reporting Party ID+Export Date+Time+MAWB.csv CRN+Your Reporting Party ID+Export Date+Time+Port of Loading+MULTIPLE.csv i.e. CRN83003926181250512170040612345678.csv CRN830039261812505121700MELMULTIPLE.csv Search Criteria → Export Date, MAWB, Port of Loading *** Search Criteria must apply independently or in combination with other criteria. *** To consider generating the .csv file for multiple lines in one report vs multiple reports for more than one declaration. 7. CSV File Formats and Outputs Export Declaration → 1 additional field Customs Status Contingency Number Can be presented for export Contingency number format 1M07CEDN3560 ‘1M’ – is the state and port code; ‘07’ - is the year; ‘CEDN’ - is for contingency EDN; ‘3560’ - a consecutive serial number, generated by the BCP Held May not be exported and is to be held pending secondary actions by Customs and Border Protection or AQIS Permit Required May not be exported Obtain a permit, update the contingency data and re-submit to Customs Same sender’s reference number Export Sub – Manifest → 1 additional field Contingency Number Can be presented for export Contingency number format 1M07CCRN3560 ‘1M’ – is the state and port code ‘07’ - is the year ‘CCRN’ - is for contingency CRN Held May not be exported and is to be held pending secondary actions by Customs and Border Protection or AQIS 8. Business Resumption Arrangements Industry Communicator System Outages Business Messages → not including control messages If a communicator is able to resume normal operations and only send messages generated for Cargo operations taking place after the system has been restored, the sending of those messages can recommence at the communicator’s convenience. A communicator processing a backlog of messages should do so at a rate no greater than 1000 messages being sent to CBF in any 15-minute period unless otherwise agreed. If a communicator has business messages due to operations conducted during the outage that needs to be sent to the TPS after the normal operations are resumed, the communicator should send these messages to the TPS between the hours of 6pm and 9am of any day. Any capability of communicator’s system to resend messages that are not responded to by the TPS in a specific period of time (i.e. 30 minutes) should be disabled during the processing of message backlogs. TPS Outages In the event that the TPS experiences an extended outage of three hours or greater, all communicators should cease to send messages to the TPS as soon as an extended outage is declared. When the TPS has been recovered the CI&SC will issue a notice indicating that normal business processing can be resumed. Export Declaration Input the Export Declaration into the TPS (Via EDI or Customs Interactive) Complete the mandatory fields required for an Export Declaration. Quote the C-EDN used to export the goods in the Unique Consignment Reference field. Quote the date of lodgement in the intended date of export field (rather than the actual proposed date of export), as the TPS will not accept a date in the past. Set the Goods Export Type to “Postal” so that the export declaration will self-acquit. If the goods are prescribed Warehouse goods, include the Establishment Id of the Warehouse the goods are being taken from and set the Customable/Excisable2 indicator to “YES”. Obtain an TPS Response Message The TPS will generate an Export Declaration Number (EDN) and will acquit the Export Declaration automatically. The C-EDN will be used to reconcile Customs records with documents received and processed during a declared outage and Customs will conduct compliance activity where required. Exporters who receive subsequent self-acquitting EDNs are to retain them with the information that was used to obtain the C-EDN for those goods. Export Consolidation Sub-Manifests Input the Export Consolidation Sub-Manifest into the TPS (EDI or Customs Interactive) Complete the mandatory fields required for an Export Consolidation Sub-Manifest. The first line of an MSG-ESM lodged in recovery must cite the C-CRN under which the consolidation was exported by citing the exempt code “EXCC” and quoting the C-CRN in the “C-CAN” field (CI) or appropriate RFF segment (EDI). Consolidations that contain goods covered by C-EDN must report each line by citing the exempt code “EXCC” and quoting the C-EDNs in the “C-CAN” field (CI) or appropriate RFF segment (EDI). Quote the date of lodgement in the date of departure field. Obtain an TPS Response Message The TPS will generate a Consolidation Reference Number (CRN). C-CANs, EDNs and other CRNs listed as lines on Sub-Manifest will be used by Customs to reconcile with documents received and processed during a declared outage and Customs will conduct compliance activity where required. Where C-CRNs have been provided under contingency for an outward manifest, the lodgement of the manifest should be delayed until either the legislated threshold for lodgement has been reached (three days), or the recovered CRNs from the TPS have been provided. If the subsequent electronic status of the cargo differs from that received under the contingency evaluation process after the system has again become operational, the contingency screening status takes precedence, and cargo may continue to move unless the reporter is contacted by Customs in relation to specific consignments. D. Business Value BCP ensures that in the event of an TPS outage, TPS slow response times, TPS specific issues, and/or client system problems it is critical that industry be able to continue normal daily business with minimal disruption through alternate cargo reporting procedures. E. Scope In Scope Contingency File Generation Recovery Procedures

Input documents:

title: SBSS Platform Knowledge Document
content: ## Carrier Co Australia Customs Brokerage System

---

## 1. Platform Overview

### What is SBSS?
SBSS (Brokerage Operations Support System) is Carrier Co Australia's customs brokerage platform used to manage import and export declarations for shipments entering or leaving Australia. It serves as the primary interface between Carrier Co customs brokers and the Customs Border Force (CBF) for regulatory compliance and customs clearance.

### Who Uses SBSS?
- **Customs Brokers (BRK)** – Process and submit declarations to customs authorities
- **Administrators (ADM)** – Configure system parameters and manage operational settings
- **Compilers (COM)** – Prepare and validate declaration data before submission
- **Operations Supervisors** – Oversee workflow and exception handling
- **Front Office Staff** – Handle day-to-day shipment processing and customer liaison

### Business Purpose
SBSS supports the end-to-end customs brokerage workflow for international shipments, including:
- Declaration preparation and validation
- Submission to customs authorities via integrated government systems
- Response handling (approvals, rejections, exceptions)
- Document management and record retention
- Charge calculation and billing
- Regulatory compliance with CBF requirements

---

## 2. System Architecture

### Core Systems in the SBSS Ecosystem

#### SBSS (Brokerage Operations Support System)
The central platform where all declaration work is performed. SBSS maintains shipment records, declarations, commodities, parties, and documents. It orchestrates communication between internal Carrier Co systems and external government platforms.

#### TPS (Trade Processing System)
The Customs Border Force's primary customs processing system. SBSS submits declarations to TPS and receives responses (permits, rejections, holds) via TradeNet messaging.

#### TradeNet
Singapore's national trade facilitation platform. For Singapore operations, SBSS communicates with TradeNet for customs approvals using EDIFACT-based messaging protocols.

#### BDIS (Brokerage Document Imaging System)
Document management system that stores scanned copies of invoices, packing lists, certificates of origin, and other supporting documents. BDIS integrates with SBSS to attach documents to declarations for customs review.

#### TCS (HAWB Management System)
Manages House Air Waybill (HAWB) records and shipment tracking references. TCS provides shipment master data to SBSS including consignee details, weights, values, and routing information.

#### MSG-ESM (Enterprise Shipment Management)
Carrier Co's enterprise-level shipment tracking system. MSG-ESM provides real-time visibility into shipment status across the Carrier Co network and feeds operational data to SBSS.

#### MSG-CSA (Cargo Release System - Trucking)
Manages cargo release for trucking operations and inland movement. MSG-CSA coordinates with SBSS to ensure shipments are physically released only after customs clearance.

#### OLAF (Operations Logistics and Forwarding)
Freight forwarding system that manages booking, routing, and carrier coordination. OLAF sends shipment forecast data to SBSS before physical arrival.

#### BCR (Broker Client Reporting)
Reporting and analytics platform that generates operational and compliance reports for brokers and customers. BCR extracts data from SBSS for business intelligence.

#### BSIS (Brokerage Statistical Information System)
Archives historical declaration data for regulatory reporting, audits, and compliance verification. BSIS ensures long-term retention of customs records as required by law.

---

## 3. Integration Patterns

### Message Exchange with Customs Authorities

#### EDIFACT Messaging
SBSS uses UN/EDIFACT (Electronic Data Interchange for Administration, Commerce and Transport) standard messages to communicate with TradeNet (Singapore) and TPS (Australia). Common message types include:

- **Declaration Messages**: Submit formal customs declarations
- **Permit Messages**: Receive customs approvals and permit numbers
- **Error Messages (ERRORM)**: Receive validation failures and rejection reasons
- **Status Messages (STATUS-R)**: Query and receive status updates on submitted declarations
- **Update Messages**: Submit amendments to previously lodged declarations

#### Message Patterns

**Synchronous Communication**:
- Real-time validation responses during declaration submission
- Immediate error feedback for malformed messages

**Asynchronous Communication**:
- Declaration submission → customs processing → permit issuance (can take minutes to hours)
- Status polling to track declaration progress through customs workflow
- Event-driven updates when customs officers complete manual review

#### Message Naming Conventions
- **INPDEC**: Import Payment Declaration (for formal clearances with duty/GST payable)
- **IPTDEC**: Import Payment Declaration (specific duty treatment types)
- **TNPDEC**: Transhipment Declaration (Batam consolidation scenario)
- **INPUPD**: Import Payment Update (amend existing declarations)
- **IPTUPD**: Import Payment Update (specific treatment amendments)
- **OUTDEC**: Outbound/Export Declaration
- **COODEC**: Country of Origin Declaration
- **INPPMT**: Import Permit (approval response)
- **IPTPMT**: Import Permit (specific treatment approval)
- **TNPPMT**: Transhipment Permit
- **OUTPMT**: Export Permit
- **COODCI**: Country of Origin Declaration Information response

### APIs and File Transfers
- **Shipment Download**: TCS pushes shipment manifests to SBSS via batch file transfer
- **Document Upload**: BDIS receives document images via API calls triggered by SBSS
- **Charge File Generation**: SBSS exports charge files to billing systems via scheduled jobs
- **Reference Data Sync**: Tariff codes, exchange rates, and regulatory tables updated via periodic feeds

---

## 4. Data Model Overview

### Key Entities and Relationships

#### Shipment
The central object representing a physical cargo movement from origin to destination.
- **Identifiers**: Shipment ID, MAWB (Master Air Waybill), HAWB (House Air Waybill), 1Z Tracking Number
- **Routing**: Origin country/port, destination country/port, transit country (for transhipments)
- **Parties**: Shipper, consignee, importer, broker
- **Weights/Values**: Gross weight, net weight, declared value, freight charges
- **Status**: Shipment status codes (e.g., 03 = in-process, 04 DA = cleared)

#### Declaration
The formal customs submission for one or more shipments.
- **Declaration Number**: Customs Reference Number (CRN) assigned by SBSS, Customs Control Number (CCN) assigned by CBF
- **Clearance Type (CT)**: FML (Formal), DEM (De minimis), LND (Low-value No-Duty), FTZ (Free Trade Zone)
- **Declaration Type**: Import/Export, Treatment codes (APS/GTR/SHO/DES/REX/GST/DUT/DNG/BKT)
- **Totals**: Declaration total value, statistical value, freight amount, insurance, duties
- **Brokerage Status**: Tracks workflow stages (RAT, EBC, CUS statuses)

#### Commodity Line
Individual line items within a declaration representing distinct products.
- **Classification**: HS Code (Harmonized System tariff code), commodity description
- **Values**: Commodity value, duty amount, supplementary quantities
- **Origin/Treatment**: Country of origin, preference codes, treatment applications
- **Linkages**: Maps back to shipment ID and invoice number via Form Type references (SHP, INV, TRK)

#### Invoice
Commercial invoice associated with shipment.
- **Invoice Number**: Unique identifier from shipper
- **Currency**: Original currency and converted value (to AUD/SGD)
- **Line Items**: Commodity details, quantities, unit prices
- **Charges**: Freight, insurance, discount allocations

#### Consignment
Grouping of related shipments for consolidated processing.
- **CONSREF#**: Consolidation Reference Number generated based on matching criteria
- **Virtual Shipment**: Temporary shipment record (prefixed with #) representing consolidated group
- **Lead Shipment**: Primary shipment within consolidation used for customs submission
- **Child Shipments**: Related shipments rolled up into virtual declaration

#### Party
Entities involved in the shipment transaction.
- **Types**: Shipper, Consignee, Importer of Record (IOR), Broker, Carrier
- **Identifiers**: TIN (Australian Business Number), OEM Client ID (Client Code ID), Tax ID
- **Attributes**: Name, address, contact details, postal code

---

## 5. User Roles and Permissions

### Front Office Roles

**Broker (BRK)**
- Primary role for declaration processing
- Can create, edit, and submit declarations to customs
- Handles document attachment and commodity classification
- Resolves exceptions and holds
- Consolidation of shipments assigned to BRK can proceed

**Administrator (ADM)**
- Configures system parameters including consolidation criteria
- Manages reference data (tariff codes, ports, countries)
- Sets up user roles and permissions
- Monitors system health and integration status
- Consolidation of shipments assigned to ADM can proceed

**Compiler (COM)**
- Prepares declarations for review before broker submission
- Validates data completeness and accuracy
- Attaches supporting documents via BDIS
- Consolidation of shipments assigned to COM can proceed

### Back Office Roles
- **Operations Supervisor**: Assigns shipments to front office staff, monitors workflow bottlenecks
- **Compliance Officer**: Audits declarations for regulatory adherence
- **Customer Service**: Responds to client inquiries about shipment status

### Assignment Logic (AST)
- Shipments must be assigned (AST) to a front office role (BRK/ADM/COM) before they can be consolidated
- Consolidation criteria can include AST status as a parameter to ensure only properly assigned shipments are grouped
- Unassigned shipments (back office) are excluded from consolidation until assignment occurs

---

## 6. Consolidation Reference System

### CONSREF# (Consolidation Reference Number)
A dynamically generated identifier that groups shipments with matching attributes for consolidated declaration submission.

#### Purpose
- Combine multiple low-value or related shipments into a single declaration
- Reduce processing overhead and submission costs
- Ensure accurate duty/tax calculation on aggregated values
- Prevent tax evasion on de minimis thresholds

#### Generation Logic
CONSREF# is constructed by parsing and concatenating values from configured matching parameters:

| Parameter | Max Chars | Parsing Rule | Example |
|-----------|-----------|--------------|---------|
| Importer Account # | 6 | Last 6 chars (exclude leading zeros) | 123456 |
| Movement Number | 8 | Full value | 12345678 |
| MAWB | 8 | Last 8 digits | 81542000 |
| Import Date | 8 | DDMMYYYY | 18032024 |
| Transit Country | 2 | Full country code | SG |
| Clearance Type | 3 | Full code | DEM |
| Shipment Indicator | Variable | Full value | TTR |
| Forecast Status | 6 | Literal value | FORCMP |

**Maximum Length**: 35 characters (right-trimmed if exceeded)

#### Matching Criteria Sets
Admins configure multiple criteria sets, each with a primary parameter:

- **Set A (Trusted Traders)**: Shipment Indicator (TTR) + Importer Account + Import Date
- **Set B (Batam Transhipments)**: Transit Country (SG/MY) + Destination Country + Import Date
- **Set C (De minimis)**: Clearance Type (DEM) + Import Date + Consignee Telephone + Movement Number
- **Set D (Forecast Complete)**: Forecast Status (FOR=CMP) + Importer Account + MAWB

#### Priority Order
Systems check criteria sets in configured sequence:
- **Australia**: Set A → Set C (Trusted Traders → De minimis)
- **Singapore**: Set B → Set C (Batam → De minimis)

### Virtual Shipments
When consolidation occurs:
1. System creates a **Virtual Shipment** with ID starting with # (e.g., #000000035)
2. Virtual shipment aggregates declaration data from all child shipments
3. **Lead Shipment** (highest value or package count) represents the group in customs submission
4. Child shipments retain individual records but reference virtual/lead via comments and events

---

## 7. Environment and Infrastructure

### Deployment Architecture
- **Production Environment**: Live system processing real customs declarations
- **Testing Environment**: Mirrors production for user acceptance testing and regression testing
- **Development Environment**: Sandbox for feature development and integration testing

### Connectivity
- **CBF TPS Connection**: Secure gateway for Australian customs messaging (encrypted, VPN-tunneled)
- **TradeNet Connection**: Singapore customs network access via certified messaging protocol
- **SBSS Internal Network**: Connects to TCS, MSG-ESM, OLAF, BDIS, MSG-CSA within Carrier Co infrastructure

### Data Residency
- Australian operations: Data stored in Australia to comply with CBF data sovereignty requirements
- Singapore operations: Data stored in Singapore for TradeNet compliance

---

## 8. Glossary of Domain Terms

### Shipment and Routing
- **MAWB**: Master Air Waybill – carrier's shipment identifier
- **HAWB**: House Air Waybill – freight forwarder's sub-shipment identifier
- **1Z Number**: Carrier Co tracking number format
- **PTN**: Package Tracking Number
- **OCC**: Origin Country Code
- **OPC**: Origin Port Code
- **DCC**: Destination Country Code
- **DPC**: Destination Port Code
- **TCC**: Transit Country Code

### Declaration Types and Clearance
- **FML**: Formal Entry – full customs declaration with duty/tax calculation
- **DEM**: De minimis – low-value exemption clearance
- **LND**: Low-value No-Duty – clearance for goods below duty threshold
- **FTZ**: Free Trade Zone – special customs area treatment
- **INF**: Informal Entry (deprecated, replaced by DEM)

### Brokerage Status Codes
- **RAT**: Rating Status (duty calculation stage)
- **EBC**: E-Broker Complete (internal validation complete)
- **CUS**: Customs Status (submission and response tracking)
- **FOR**: Forecast Status (document scanning/preparation stage)
- **AST**: Assignment Status (which user role owns the shipment)
- **MAN**: Manual Review Status (customs hold for examination)

### CUS Status Values
- **SNT**: Sent to Customs
- **SCR**: Successfully Received (acknowledgment from customs)
- **SCA**: Scanning Required (customs document request)
- **APP**: Approved
- **ERR**: Error (validation failure)
- **REJ**: Rejected (customs refusal)
- **INS**: Inspection Required
- **CLR**: Cleared for Release
- **CMP**: Complete

### RAT Status Values
- **CMP**: Complete (rating calculation finished)
- **RFC**: Ready for Customs (validation passed, ready to submit)
- **HLD1**: Hold Level 1 (pending additional information)

### Exception and Hold Codes
- **RTS**: Return to Sender
- **RTO**: Return to Origin
- **BYP**: Bypass (skip validation)
- **HLD1**: Hold Level 1 (broker action required)
- **1U**: Specific exception reason code (customs query)
- **NST**: Not Sent (message content validation failed)
- **NRQ**: No Request (declaration not yet submitted)

### Message Types
- **INPDEC**: Import Payment Declaration
- **IPTDEC**: Import Payment (Treatment-specific) Declaration
- **TNPDEC**: Transhipment Declaration
- **INPUPD**: Import Payment Update
- **IPTUPD**: Import Payment (Treatment) Update
- **OUTDEC**: Outbound/Export Declaration
- **COODEC**: Country of Origin Declaration
- **INPPMT**: Import Permit (approval)
- **IPTPMT**: Import Payment Permit
- **TNPPMT**: Transhipment Permit
- **OUTPMT**: Export Permit
- **ERRORM**: Error Message (rejection with reasons)
- **STATUS-R**: Status Request/Response

### Treatment and Preference Codes
- **APS**: ASEAN Preferential Scheme
- **GTR**: General Tariff Rate
- **SHO**: Special Handling Order
- **DES**: Destruction
- **REX**: Re-export
- **GST**: Goods and Services Tax
- **DUT**: Duty Treatment
- **DNG**: Dangerous Goods
- **BKT**: Blanket Treatment

### Parties and Identifiers
- **IOR**: Importer of Record (entity legally responsible for duties)
- **COD**: Consignee on Demand
- **TIN**: Australian Business Number
- **OEM Client ID**: Client Code ID
- **Shipper**: Party sending goods
- **Consignee**: Party receiving goods
- **Broker**: Customs agent filing declarations

### Consolidation Terms
- **CONSREF#**: Consolidation Reference Number
- **VRT/VID**: Virtual Shipment ID (prefixed with #)
- **Lead Shipment**: Primary shipment in consolidated group
- **Child Shipment**: Individual shipment rolled into consolidation
- **TTR**: Trusted Trader (shipment indicator for preferential processing)
- **Batam**: Singapore-Indonesia transhipment consolidation scenario

### Document Types
- **INV**: Commercial Invoice
- **SHP**: Shipment Identifier reference
- **TRK**: Tracking Number reference
- **CA**: Customs Acknowledgment
- **SC**: Special Conditions
- **AFD**: Additional Fee Detail
- **ERD**: Error Detail

### Financial and Charges
- **COD**: Cash on Delivery
- **FRT**: Freight Charges
- **INS**: Insurance
- **DIS**: Discount
- **UNS**: Upload Not Sent (charge file suppression flag)
- **Sigma**: Summation/total across multiple shipments

### Reference Numbers
- **CRN**: Customs Reference Number (SBSS-assigned)
- **CCN**: Customs Control Number (CBF-assigned)
- **PMT#**: Permit Number
- **PMTSD**: Permit Start Date
- **PMTED**: Permit End Date
- **CAADT**: Customs Approval Actual Date/Time
- **PMADT**: Permit Actual Date/Time
- **DESDT**: Declaration Submission Date/Time

### Shipment Status Codes
- **03**: In-Process/Submitted
- **04 DA**: Cleared/Delivered Available

---

## 9. Regulatory Context

### Customs Border Force (CBF) Requirements
- All import/export declarations must be lodged electronically via TPS
- Declarations must include accurate HS codes for tariff classification
- Supporting documents (invoices, certificates) must be retained for 5 years
- Duty and GST calculations must follow CBF guidelines
- Permit numbers must be obtained before cargo release

### Singapore Customs (TradeNet) Requirements
- Transhipment declarations required for cargo moving through Singapore en route to final destination
- De minimis thresholds apply for low-value goods
- Preferential tariff treatment requires certificates of origin
- TradeNet messaging must conform to UN/EDIFACT standards

### Compliance Obligations
- Brokers must hold valid customs broker licenses
- Declarations must be signed electronically by authorized brokers
- Tariff classification errors can result in penalties and audits
- False declarations are criminal offenses
- Record retention: 5-7 years depending on jurisdiction

---

title: Customs Brokerage Process Flow
content: ## Import and Export Clearance for Carrier Co Australia

---

## 1. Import Declaration Process (End-to-End)

### Phase 1: Shipment Arrival and Manifest Download

**Trigger**: Cargo arrives at destination airport/port or manifest is transmitted by carrier

**Activities**:
1. **Manifest Receipt**: TCS receives cargo manifest from airline/carrier with shipment details (MAWB, HAWB, consignee, origin, declared value, weight)
2. **Shipment Download to SBSS**: Manifest data flows from TCS to SBSS, creating shipment records
3. **Consolidation Matching** (if configured):
   - SBSS checks shipment attributes against configured consolidation criteria (importer account, import date, transit country, clearance type, etc.)
   - If matching criteria are met, SBSS generates CONSREF# and groups shipments
   - Admin reviews consolidation report showing CONSREF# and matching shipment counts
4. **Assignment**: Shipment assigned (AST) to broker (BRK), compiler (COM), or admin (ADM) role in front office

**Key Data Captured**:
- Shipment ID, MAWB, HAWB, tracking number
- Parties (shipper, consignee, importer)
- Declared value, weight, package count
- Routing (origin, destination, transit points)
- Movement number, flight/vessel details

**System Interactions**: TCS → SBSS → (Optional) Consolidation Engine

---

### Phase 2: Document Receipt and Validation

**Trigger**: Shipment assigned to broker for processing

**Activities**:
1. **Document Collection**:
   - Broker receives commercial invoice, packing list, certificate of origin, permits (if applicable) from shipper/consignee
   - Documents scanned and uploaded to BDIS
2. **Document Attachment**:
   - Broker attaches BDIS images to shipment declaration
   - For consolidated shipments, documents from all child shipments are merged and grouped by shipment ID in virtual declaration
3. **Forecast Status Update**:
   - Forecast status (FOR) updated to CMP (Complete) once all documents received and scanned
   - If consolidation criteria include FOR=CMP, shipments only receive CONSREF# after forecast completion

**Key Validations**:
- Invoice value matches declared shipment value
- HS codes are present and valid
- Required certificates/permits are attached
- Consignee/importer details are accurate

**System Interactions**: Broker → BDIS → SBSS

---

### Phase 3: Declaration Preparation

**Trigger**: FOR=CMP and broker begins declaration entry

**Activities**:
1. **Clearance Type Determination**:
   - **FML (Formal)**: Shipment value exceeds de minimis threshold or specific commodity requires formal entry
   - **DEM (De minimis)**: Low-value consignments below duty threshold
   - **LND (Low-value No-Duty)**: Goods below duty threshold but requiring GST
   - **FTZ**: Free trade zone clearance for bonded warehouses
2. **Declaration Data Entry**:
   - Broker enters/validates summary data (declaration type, clearance type, gross weight, declared value)
   - Customer details (shipper, consignee, importer with TIN/tax ID)
   - Movement details (arrival date, import date, movement number, port codes)
   - Charges (freight, insurance, other charges)
3. **Commodity Classification**:
   - Broker assigns HS code to each commodity line
   - Enters commodity description, quantity, unit value
   - Specifies country of origin
   - Applies treatment codes (APS/GTR/SHO/DES/REX) if preferential tariff treatment claimed
   - Attaches licenses, permits, or quota references if required
4. **Invoice Processing**:
   - For single-currency invoices: Use original declared value
   - For multi-currency invoices: SBSS converts all values to local currency (AUD/SGD) using declaration exchange rate
   - For consolidated shipments with mixed currencies: Use declaration total value (already in AUD/SGD) as baseline
5. **Consolidation (if applicable)**:
   - Broker selects matching shipments via CONSREF# from consolidation report
   - SBSS creates **Virtual Shipment** (ID starting with #) combining:
     - All commodity lines from child shipments
     - Sigma (sum) of declared values, gross weights, freight, insurance, duties
     - Common clearance type (FML forced for consolidated declarations)
     - Form type references (SHP, INV, TRK) mapping commodities back to original shipment IDs
   - **Lead Shipment** selected (highest value or package count) as primary reference for customs submission
   - Virtual shipment's declaration number (CRN) assigned

**Key Calculations**:
- **Declaration Total Value**: Sum of all invoice values (converted to local currency if needed)
- **Statistical Value**: Includes freight and insurance added to invoice value
- **Duty Amount**: Calculated per commodity line based on HS code tariff rate
- **GST/Tax**: Applied to sum of invoice value + freight + insurance + duty

**System Interactions**: SBSS (Declaration Module) → Rating Engine → Tariff Database

---

### Phase 4: Rating and Validation

**Trigger**: Broker completes data entry and initiates rating

**Activities**:
1. **Rating Calculation**:
   - SBSS rating engine retrieves tariff rates for each HS code
   - Calculates duty per commodity line (value × tariff rate)
   - Applies treatment codes (preferential rates if applicable)
   - Calculates GST on dutiable value
   - Computes total declaration charges
2. **Internal Validation**:
   - **RAT (Rating) Status** checks:
     - All commodity HS codes valid
     - Quantities and values within acceptable ranges
     - Treatment codes match HS code eligibility
     - Licenses/permits present for restricted goods
   - **EBC (E-Broker Complete) Status** checks:
     - All required fields populated
     - Party details complete (TIN, addresses)
     - Documents attached for all invoice line items
     - No conflicting data between shipment and declaration
3. **Manual Review (if needed)**:
   - High-value shipments flagged for supervisor approval
   - Unusual commodity classifications escalated to compliance officer
   - Missing document exceptions logged

**Status Progression**:
- RAT = CMP → EBC = CMP → CUS = RFC (Ready for Customs)

**System Interactions**: SBSS → Rating Engine → Validation Rules Engine

---

### Phase 5: Submission to Customs

**Trigger**: CUS = RFC and broker approves submission

**Activities**:
1. **Message Generation**:
   - SBSS constructs EDIFACT message based on declaration type and treatment:
     - **INPDEC**: Standard formal import declaration (APS/GTR/SHO/DES/REX)
     - **IPTDEC**: Import declaration with specific duty treatment (GST/DUT/DNG/BKT)
     - **TNPDEC**: Transhipment declaration (Batam consolidation scenario with inbound/outbound MAWB/HAWB)
   - For consolidated shipments:
     - Message includes all commodity lines (up to 50 per message per TradeNet limit)
     - Each commodity tagged with Form Type references (SHP/INV/TRK) to original shipment
     - Lead shipment HAWB used as declaration reference (virtual # ID not sent to customs)
2. **Message Transmission**:
   - SBSS sends message to TPS (Australia) or TradeNet (Singapore)
   - **CUS Status** updated to **SNT (Sent)**
   - Shipment status updated to **03** (In-Process)
   - Exception reason code **1U** logged (message sent, awaiting response)
   - **MAN Status** updated to **NST (Not Sent)** if validation fails, or **NRQ (No Request)** if awaiting customs action
3. **Acknowledgment**:
   - Customs system sends synchronous acknowledgment (message received and queued)
   - **CUS Status** updated to **SCR (Successfully Received)**
   - Broker sees confirmation in SBSS that declaration is in customs processing queue

**System Interactions**: SBSS → TradeNet/TPS Gateway → Customs Backend

---

### Phase 6: Customs Processing and Response

**Customs Processing (External)**:
1. Customs system validates message format and content
2. Runs risk assessment algorithms
3. Routes to officer review if flagged, otherwise auto-processes
4. Generates permit or rejection

**SBSS Receives Response**:

#### Scenario A: Approval (Permit Issued)

**Inbound Message**: INPPMT, IPTPMT, or TNPPMT

**Activities**:
1. SBSS receives permit message with:
   - **CCN (Customs Control Number)**: Official customs identifier
   - **Permit Number (PMT#)**: Authorization to release cargo
   - **PMTSD/PMTED**: Permit validity period
   - **CAADT/PMADT**: Customs approval date/time
2. **CUS Status** updated to **APP (Approved)**
3. **Shipment Status** updated to **04 DA (Cleared/Delivered Available)**
4. **For Consolidated Shipments**:
   - Virtual shipment receives response first
   - SBSS automatically syncs permit details to **Lead Shipment** declaration
   - Lead shipment's permit details copied to all **Child Shipments** via:
     - Declaration > Customs > Reference Number fields (CCN, PMT#, PMTSD, PMTED, CAADT, PMADT)
     - Shipment comments (Customer Supplied References synced)
     - Brokerage events logged for each child ("Consolidated under Shipment ID XXXXX", "Permit received: PMT#")
5. **Charge File Generation**:
   - For consolidated shipments, single charge file generated from **Lead Shipment** only
   - Charge file includes:
     - Government charges (duties, GST) from declaration
     - Accessorial charges (brokerage fees, document fees) from shipment
   - Child shipments flagged **UNS (Upload Not Sent)** to suppress duplicate charge files
6. **Document Update**:
   - Approved declaration form (PDF) generated and attached to BDIS
   - For consolidated shipments, declaration form available on virtual, lead, and all child shipments
7. **Release Notification**:
   - SBSS notifies MSG-CSA that shipment is cleared for release
   - Warehouse receives pickup authorization

**System Interactions**: TPS/TradeNet → SBSS → Lead/Child Shipments → MSG-CSA → Billing System

---

#### Scenario B: Rejection (Declaration Refused)

**Inbound Message**: ERRORM or STATUS-R with rejection codes

**Activities**:
1. SBSS receives rejection message with:
   - Error codes and descriptions (e.g., "HS code invalid", "Missing license", "Value discrepancy")
   - Line-level or declaration-level errors
2. **CUS Status** updated to **ERR (Error)** or **REJ (Rejected)**
3. **Shipment Status** remains **03** (not cleared)
4. **MAN Status** may update to specific hold code indicating reason
5. Broker reviews error details in SBSS
6. **For Consolidated Shipments**:
   - If entire declaration rejected, all child shipments receive rejection status sync
   - If specific commodity lines rejected, broker identifies faulty child shipments via Form Type SHP references
7. **Exception Handling**:
   - Broker corrects errors (amends HS code, uploads missing document, adjusts value)
   - Broker submits **INPUPD/IPTUPD** (update message) with corrections
   - Or broker withdraws declaration and resubmits fresh INPDEC

**System Interactions**: TPS/TradeNet → SBSS → Broker Worklist

---

#### Scenario C: Hold for Inspection

**Inbound Message**: Customs inspection request or SCA (Scanning Required) status

**Activities**:
1. SBSS receives hold notification
2. **CUS Status** updated to **INS (Inspection Required)** or **SCA (Scanning Required)**
3. **MAN Status** updated to **HLD1** or specific hold code
4. Broker coordinates with customs officer:
   - Provides additional documents
   - Arranges physical inspection at cargo facility
   - Responds to queries via SBSS messaging or email
5. Once inspection cleared:
   - Customs issues permit (follows Scenario A path)
   - Or requests amendment (follows Scenario B path)

**System Interactions**: SBSS ↔ Customs Officer (manual intervention) → TPS/TradeNet

---

### Phase 7: Cargo Release and Finalization

**Trigger**: CUS = APP and shipment status = 04 DA

**Activities**:
1. **Cargo Release**:
   - MSG-CSA receives clearance notification from SBSS
   - Warehouse releases cargo to consignee or delivery carrier
   - Physical handover confirmed in MSG-ESM
2. **Billing**:
   - Charge file sent to billing system
   - Customer invoiced for duties, GST, brokerage fees, accessorial charges
   - For consolidated shipments, single invoice issued to lead shipment's importer
3. **Record Archival**:
   - Declaration, commodity, document, and message data archived in BSIS
   - Retention period: 5 years minimum for compliance
4. **Reporting**:
   - BCR generates reports for:
     - Daily clearance volumes
     - Duty/GST collected
     - Exception rates (rejections, holds)
     - Consolidation efficiency metrics

**System Interactions**: SBSS → MSG-CSA → MSG-ESM → Billing System → BSIS/BCR

---

## 2. Export Declaration Process (End-to-End)

### Phase 1: Booking and Shipment Creation

**Trigger**: Customer books export shipment via OLAF or Carrier Co sales channel

**Activities**:
1. **Booking Entry**:
   - Customer provides shipper, consignee, commodity details, destination, requested pickup date
   - OLAF creates shipment booking record
2. **Manifest Generation**:
   - OLAF transmits shipment manifest to SBSS
   - SBSS creates export shipment record
3. **Assignment**:
   - Shipment assigned to broker for export declaration preparation

**Key Data Captured**:
- Shipper (exporter), consignee (foreign buyer)
- Commodity descriptions, HS codes, values
- Export country, port of exit, destination country
- Export date, outbound movement number

**System Interactions**: OLAF → SBSS

---

### Phase 2: Export Declaration Preparation

**Trigger**: Broker receives assigned export shipment

**Activities**:
1. **Document Collection**:
   - Commercial invoice, packing list, certificate of origin (if required)
   - Export licenses/permits for controlled goods
2. **Declaration Entry**:
   - Export declaration type selected (OUTDEC or COODEC)
   - Commodity classification (HS code, description, quantity, value)
   - Party details (exporter with TIN, foreign consignee)
   - Movement details (export date, port of exit, vessel/flight details)
3. **Validation**:
   - Restricted/prohibited goods checks
   - Export license verification for dual-use or strategic goods
   - Country-of-origin certification for FTA eligibility

**System Interactions**: SBSS → Tariff/License Database

---

### Phase 3: Submission to Customs

**Trigger**: Broker completes and approves export declaration

**Activities**:
1. **Message Generation**:
   - **OUTDEC**: Standard export declaration
   - **COODEC**: Certificate of origin declaration (for FTA preferential treatment in destination country)
2. **Transmission**:
   - SBSS sends message to TPS/TradeNet
   - **CUS Status** = **SNT**
   - **Shipment Status** = **03**
   - **Exception Reason** = **1U**
3. **Acknowledgment**:
   - Customs acknowledges receipt
   - **CUS Status** = **SCR**

**System Interactions**: SBSS → TPS/TradeNet

---

### Phase 4: Customs Response and Clearance

#### Scenario A: Approval

**Inbound Message**: OUTPMT or COODCI

**Activities**:
1. SBSS receives export permit
2. **CUS Status** = **CLR (Cleared)**
3. **Shipment Status** = **04 DA**
4. Cargo released for loading onto vessel/aircraft
5. Permit attached to shipment for carrier handover

**System Interactions**: TPS/TradeNet → SBSS → MSG-CSA

---

#### Scenario B: Hold/Rejection

**Inbound Message**: ERRORM or hold notification

**Activities**:
1. **CUS Status** = **ERR** or **HLD (Hold)**
2. Broker coordinates with customs officer to resolve issue
3. Submits correction via **OUTUPD** (export update message)
4. Re-approval follows Scenario A path

---

### Phase 5: Departure and Finalization

**Trigger**: Cargo loaded and vessel/aircraft departs

**Activities**:
1. Carrier confirms departure to SBSS
2. Final shipment status updated in MSG-ESM
3. Export declaration archived in BSIS
4. Customer invoiced for brokerage fees

**System Interactions**: Carrier → MSG-ESM → SBSS → BSIS

---

## 3. Message Lifecycle (Import/Export)

### Creation
- Declaration data entered in SBSS UI
- SBSS constructs EDIFACT message per customs schema (INPDEC/IPTDEC/TNPDEC/OUTDEC/COODEC)

### Validation
- **Pre-Submission**: SBSS validates message structure, mandatory fields, data types
- **Post-Submission**: Customs performs content validation (HS codes, party IDs, value ranges)

### Submission
- SBSS transmits message via secure gateway to TPS/TradeNet
- CUS = SNT, Shipment Status = 03, Exception = 1U

### Response Handling
- **Acknowledgment**: SCR (message received, queued for processing)
- **Approval**: APP → Permit issued (INPPMT/IPTPMT/TNPPMT/OUTPMT/COODCI)
- **Rejection**: ERR/REJ → Error message returned (ERRORM)
- **Hold**: INS/SCA/HLD1 → Manual review required

### Status Update
- **Synchronous**: Immediate feedback (acknowledgment, validation errors)
- **Asynchronous**: Delayed response (permit issuance after officer review, can take minutes to hours)

### Retry/Amendment
- If rejected, broker submits update message (INPUPD/IPTUPD/OUTUPD)
- Or withdraws and resubmits fresh declaration

---

## 4. Clearance Types

### FML (Formal Entry)
- **Trigger**: Shipment value exceeds de minimis threshold, or commodity requires formal declaration (e.g., restricted goods)
- **Process**: Full declaration with commodity classification, duty calculation, GST
- **Outcome**: Permit issued after customs approval, duties/taxes payable

### DEM (De minimis)
- **Trigger**: Low-value consignments (typically below AUD 1,000 or SGD 400)
- **Process**: Simplified declaration, often auto-cleared
- **Outcome**: No duty, minimal GST or exempt, faster clearance

### LND (Low-value No-Duty)
- **Trigger**: Goods below duty threshold but subject to GST
- **Process**: Declaration focuses on GST calculation, no tariff classification needed
- **Outcome**: GST payable, no customs duty

### FTZ (Free Trade Zone)
- **Trigger**: Cargo entering bonded warehouse or FTZ for storage/re-export
- **Process**: Suspended duty/tax until cargo leaves FTZ for domestic consumption
- **Outcome**: No immediate payment, duty deferred or waived on re-export

### Alternate Broker / Transhipment
- **Trigger**: Cargo transiting through country en route to final destination (e.g., Batam scenario: air into Singapore, sea out to Indonesia)
- **Process**: Transhipment declaration (TNPDEC) with inbound and outbound MAWB/HAWB
- **Outcome**: Permit issued for cargo to continue journey, no import duty (cargo not entering commerce)

---

## 5. Exception Handling

### Rejection Scenarios
- **HS Code Invalid**: Tariff code not found or incorrect format → Broker corrects and resubmits
- **Missing License**: Restricted goods require permit → Broker uploads permit document and updates declaration
- **Value Discrepancy**: Invoice value doesn't match declared value → Broker amends value or provides explanation
- **Party Details Incorrect**: TIN invalid, address incomplete → Broker updates party data

### Hold Scenarios
- **Document Request (SCA)**: Customs officer requests additional supporting documents → Broker uploads to BDIS and notifies customs
- **Physical Inspection (INS)**: Cargo examination required → Broker coordinates inspection appointment with warehouse and customs
- **Valuation Query (HLD1)**: Declared value under question → Broker provides additional invoices or valuation evidence

### Refund/Withdrawal
- **Overpayment**: Duty calculated incorrectly → Broker submits refund request with corrected calculation
- **Withdrawal (BYP)**: Declaration no longer needed (shipment cancelled, returned to sender) → Broker withdraws declaration, cargo re-exported or destroyed

---

## 6. Status Lifecycle

### Shipment Status Progression
- **Downloaded** → Shipment created in SBSS from manifest
- **Assigned (AST)** → Allocated to broker/compiler/admin
- **03** → Declaration submitted to customs, awaiting response
- **04 DA** → Cleared by customs, available for delivery
- **RTS/RTO** → Return to sender/origin (clearance failed or shipment refused)

### Declaration Brokerage Status Progression
- **RAT**: Rating calculation in progress
  - **RAT = CMP**: Rating complete, duty/tax calculated
- **EBC**: Internal validation in progress
  - **EBC = CMP**: Validation complete, ready for submission
- **CUS**: Customs submission and response tracking
  - **CUS = RFC**: Ready for Customs (internal approval to submit)
  - **CUS = SNT**: Sent to Customs
  - **CUS = SCR**: Successfully Received (acknowledged by customs)
  - **CUS = APP**: Approved (permit issued)
  - **CUS = ERR**: Error (validation failed)
  - **CUS = REJ**: Rejected (declaration refused)
  - **CUS = INS**: Inspection Required
  - **CUS = CLR**: Cleared (export approved)
  - **CUS = CMP**: Complete (all processing finished)

### Forecast Status (FOR)
- **Initiated** → Document scan process started
- **In Progress** → Some documents scanned, others pending
- **CMP (Complete)** → All documents scanned and attached
- **Note**: FOR = CMP may be consolidation criterion trigger

### Manual Review Status (MAN)
- **NST (Not Sent)**: Message content validation failed before submission
- **NRQ (No Request)**: Awaiting broker action to submit
- **HLD1**: Hold for manual review
- **Specific Exception Codes**: 1U (customs query), etc.

---

## 7. Regulatory Context

### CBF Import Requirements
- All cargo arriving in Australia must be declared electronically via TPS before release
- Importers must provide accurate HS codes for tariff classification
- Duty and GST calculated based on customs value (transaction value + freight + insurance)
- Permits required for restricted goods (food, pharmaceuticals, weapons, etc.)
- Supporting documents must be retained for 5 years for audit

### CBF Export Requirements
- Export declarations required for controlled goods (strategic exports, dual-use items)
- Certificate of origin declarations for FTA preferential treatment
- Exporters must provide accurate commodity descriptions and HS codes
- Departure confirmation required before cargo leaves Australian jurisdiction

### Singapore TradeNet Requirements
- All imports/exports/transhipments must be declared via TradeNet
- EDIFACT messaging mandatory for electronic submissions
- Transhipment permits required for cargo moving through Singapore (Batam scenario)
- De minimis threshold: SGD 400 for GST exemption
- Preferential tariff schemes (ASEAN, FTA) require certificates of origin

### Compliance Obligations
- **Broker Licensing**: Customs brokers must hold valid licenses issued by CBF or Singapore Customs
- **Electronic Signatures**: Declarations must be electronically signed by authorized brokers
- **Tariff Classification Accuracy**: Errors in HS codes can result in penalties, back-duty assessments, or criminal charges for deliberate misclassification
- **False Declarations**: Submitting false information (undervaluation, misdescription) is a criminal offense
- **Record Retention**: 5-7 years depending on jurisdiction and commodity type
- **Audit Cooperation**: Brokers must provide records upon request during customs audits

---

## 8. Consolidation-Specific Process Flow

### Identification Phase
1. Shipment downloads from manifest
2. SBSS checks shipment attributes against configured consolidation criteria sets (in priority order)
3. If match found on primary parameter + secondary parameters, CONSREF# generated and assigned
4. Shipment flagged for consolidation (viewable in consolidation matching report)

### Selection Phase
1. Broker reviews consolidation matching report (sorted by CONSREF# with highest shipment count first)
2. Broker selects shipments under same CONSREF# for consolidation
3. SBSS creates Virtual Shipment (# ID) combining:
   - All declarations and commodity lines from selected shipments
   - Sigma values (declared value, gross weight, freight, insurance, duties)
   - Common clearance type (forced to FML for consolidated submissions)
   - Form Type references mapping commodities to original shipment IDs

### Lead Shipment Assignment
1. SBSS selects lead shipment (highest value, or highest package count if values equal, or alphabetically if tied)
2. Lead shipment HAWB becomes declaration reference (virtual # ID not sent to customs)

### Submission Phase
1. Virtual declaration submitted to customs (INPDEC/IPTDEC/TNPDEC)
2. Message includes all commodity lines with Form Type tags (SHP/INV/TRK)
3. CUS = SNT on virtual, lead, and child shipments

### Response Sync Phase
1. Customs response received on virtual shipment
2. SBSS syncs permit details to lead shipment
3. Lead shipment syncs to all child shipments:
   - Declaration references (CCN, PMT#, dates)
   - Customer supplied references
   - Brokerage events
   - CUS and shipment status
   - Exception codes

### Charge File Phase
1. Single charge file generated from lead shipment
2. Child shipments flagged UNS to suppress duplicate billing

### Document Availability Phase
1. Approved declaration form available on virtual, lead, and all child shipments
2. BDIS documents merged and tagged by originating shipment ID

---

This process flow serves as the operational blueprint for all customs brokerage activities in SBSS. Brokers, compilers, and administrators follow these workflows to ensure compliant, efficient, and accurate customs clearance for Carrier Co customers.

title: Project-A - Export - Cargo Reporting & Declaration Contingency (Customs Business Continuity Plan) — Feature Brief
content: # Export Cargo Reporting & Declaration Contingency
## Business Continuity Plan (BCP) for TPS Outages

**Document Version:** 1.0  
**Effective Date:** 2022  
**Business Owner:** Customs Brokerage Operations  
**Regulatory Authority:** Customs Border Force (CBF)

---

## 1. Business Need

The Customs Border Force Trade Processing System (TPS) is the primary platform for lodging export declarations and cargo manifests. When TPS experiences outages, slow response times, or technical issues — or when Carrier Co's internal systems cannot communicate with TPS — customs brokerage operations halt, preventing legitimate cargo movement and causing significant business disruption.

The TPS Business Continuity System (TPS BCS) provides an alternate cargo reporting channel using secure email and CSV file submission. Industry participants who register for the TPS BCP subscription can submit contingency export declarations (C-EDN) and consolidation sub-manifests (C-CRN) during declared contingency periods and receive outcome notifications via secure email.

Carrier Co Australia requires SBSS system enhancements to support this contingency workflow, enabling brokers to generate compliant CSV files, process TPS responses, and reconcile contingency submissions once TPS operations resume.

---

## 2. Business Objectives

### Primary Objectives
1. **Maintain Export Operations During TPS Outages**: Enable brokers to generate and submit export declarations and consolidation sub-manifests in CSV format when TPS is unavailable
2. **Process TPS Contingency Responses**: Ingest and apply TPS status responses (UCN assignments, holds, permit requirements) received via CSV files during contingency periods
3. **Support Post-Outage Reconciliation**: Enable recovery procedures to re-submit contingency data to TPS within 24 hours of restoration and reconcile electronic records with contingency submissions

### Regulatory Compliance Objectives
- Comply with CBF TPS Business Continuity Plan requirements
- Maintain audit trail of contingency submissions and TPS responses
- Ensure data integrity between contingency records and post-recovery TPS submissions
- Support mandatory 24-hour reconciliation window after TPS restoration

### Operational Objectives
- Minimize cargo release delays during TPS outages
- Reduce manual effort in contingency file preparation
- Provide visibility into contingency submission status
- Enable efficient bulk processing of TPS response files

---

## 3. Scope

### In Scope

**Contingency File Generation**
- Generate Export Declaration (EDN) CSV files compliant with CBF template specifications
- Generate Export Consolidation Sub-Manifest (CRN) CSV files compliant with CBF template specifications
- Apply search criteria (export date, MAWB, HAWB, port of loading) to filter shipments for contingency reporting
- Implement file naming conventions mandated by CBF (EDN/CRN prefix + reporting party ID + date/time + port/MAWB + MULTIPLE indicator)
- Export CSV files with proper character encoding, field trimming, and comma removal from data values
- Configure reporting party identifiers (name, TIN) for EDN and CRN reports via lookup codes

**TPS Response Processing**
- Ingest TPS EDN response CSV files via data loader
- Ingest TPS CRN response CSV files via data loader
- Validate response file structure, mandatory fields, character limits, and data integrity
- Assign Unique Contingency Numbers (UCN) to shipments based on TPS responses
- Apply hold statuses (HELD, PERMIT REQUIRED) and trigger rating holds when TPS flags shipments
- Set export goods type to POSTAL for UCN-assigned shipments (EDN scenario only)
- Log processing outcomes (success, failure, partial success) with detailed error messages
- Restrict data loader access to authorized BCP user groups

**Post-Outage Recovery**
- Display contingency reference numbers (C-EDN, C-CRN) in shipment comments for reconciliation
- Distinguish between HELD and PERMIT REQUIRED statuses via shipment comments
- Enable brokers to identify shipments requiring TPS re-submission after restoration
- Support backlog submission rate limiting (1000 messages per 15-minute period, off-peak hours submission)

**Audit and Logging**
- Maintain file upload logs (success/failure, timestamp, user, error details) for EDN and CRN response files
- Preserve contingency submission data for 5-year retention period
- Generate compliance reports showing contingency activity volumes and outcomes

### Out of Scope

- Secure email integration with TPS BCS (manual email submission assumed)
- Digital certificate signing and encryption of contingency files (performed outside SBSS)
- Automated TPS status polling or real-time outage detection
- Integration with CBF notifications for contingency event declarations or cessations
- Processing of import declarations or other non-export contingency scenarios
- Backlog message transmission logic (assumed handled by TPS gateway layer)
- Physical cargo release workflows (MSG-CSA integration unchanged)

---

## 4. Stakeholders and Actors

### Primary Users
- **Customs Brokers (BRK)**: Generate EDN/CRN CSV files during outages, submit to TPS BCS via email, upload TPS response files to SBSS, manage holds and exceptions
- **Administrators (ADM)**: Configure reporting party identifiers, manage BCP user group access, oversee contingency report generation
- **Compilers (COM)**: Prepare export declarations for contingency submission, validate data completeness before CSV generation

### Secondary Users
- **Operations Supervisors**: Monitor contingency submission volumes, track recovery progress after TPS restoration
- **Compliance Officers**: Audit contingency records, verify reconciliation completeness

### External Stakeholders
- **Customs Border Force (CBF)**: Receives contingency files via TPS BCS secure email, processes during outages, returns status responses via CSV
- **Carrier Co Billing Systems**: Process charges for exports cleared via contingency procedures (unchanged workflow)
- **MSG-CSA (Cargo Release)**: Releases cargo based on contingency approval statuses (unchanged workflow)

---

## 5. Dependencies

### Technical Dependencies
- **TPS BCS Subscription**: Carrier Co must register for CBF TPS BCP subscription list and obtain valid TPS Digital Certificate
- **Data Loader Infrastructure**: Existing SBSS data loader framework must support new EDN/CRN report loader types
- **Lookup Code System**: Must support new CONRPT-X reference type for storing reporting party credentials
- **Shipment Comment Types**: Must support new BCP comment type for status differentiation

### Data Dependencies
- **Declaration Reference Numbers (URN)**: Must exist on export declarations to serve as sender reference in CSV files
- **Port of Loading Codes**: Export port must be populated and mappable to UN/LOCODE format (AUBNE, AUMEL, AUPER, AUSYD)
- **Mode of Transport (MTE)**: Must be configured with AIR/SEA descriptions for flight/vessel logic
- **Commodity Tariff Numbers (AHECC)**: Must exist on commodity lines for EDN report generation

### Process Dependencies
- **Declaration Completion**: Export declarations must reach rating complete (RAT=CMP) before contingency report generation
- **Document Attachment**: Commercial invoices and supporting documents must be attached before CSV submission
- **Post-Outage TPS Availability**: TPS must be restored and operational within reasonable timeframe for 24-hour reconciliation window

### Regulatory Dependencies
- **CBF Contingency Event Declaration**: CBF must formally declare an TPS outage/contingency period for CSV submissions to be accepted
- **TPS BCS Email Channel Availability**: CBF secure email channel must be operational during outages
- **24-Hour Submission Window**: Contingency data must be re-submitted to TPS within 24 hours of restoration (manual broker action)

---

## 6. Success Criteria

### Functional Success Criteria
1. Brokers can generate EDN CSV files containing all mandatory fields per CBF template for single or multiple shipments filtered by export date, MAWB, HAWB, and port of loading
2. Brokers can generate CRN CSV files containing all mandatory fields per CBF template for consolidation manifests
3. Generated CSV files comply with CBF naming conventions and contain no commas in data values, no column headers, and properly trimmed fields
4. Data loader successfully ingests and validates EDN response CSV files with field-level error reporting
5. Data loader successfully ingests and validates CRN response CSV files with field-level error reporting
6. UCN assignments from TPS responses are correctly mapped to declaration custom code reference numbers
7. HELD and PERMIT REQUIRED statuses trigger rating holds (RAT=HLD) with PED hold reason
8. POSTAL goods type is set only for EDN shipments receiving UCN assignments
9. Shipment comments capture contingency statuses (HELD vs PERMIT REQUIRED) for broker visibility
10. File upload logs capture success, failure, and partial success outcomes with row-level error details

### Operational Success Criteria
- Zero export cargo delays exceeding 24 hours during TPS outages (contingency window)
- 100% of contingency submissions reconciled with TPS within 24 hours of restoration
- Less than 5% error rate on TPS response file processing (validation failures)
- No compliance violations or CBF penalties due to incorrect CSV file formats

### User Experience Success Criteria
- Brokers can generate and download CSV files within 2 minutes for typical batch sizes (50-100 shipments)
- Data loader provides clear error messages identifying specific validation failures (row number, field name, reason)
- Search criteria support flexible filtering (date ranges, multiple MAWBs/HAWBs, port selection)
- CSV file download initiates immediately upon clicking export button

### Audit and Compliance Success Criteria
- All contingency file uploads logged with timestamp, user, filename, outcome
- Logs retained for 5-year audit period
- Contingency reference numbers (C-EDN, C-CRN) visible in shipment records for compliance verification

---

## 7. Assumptions and Risks

### Assumptions
1. **CBF TPS BCS Availability**: Secure email channel remains operational during TPS outages and can accept CSV file attachments up to reasonable size limits (e.g., 10MB)
2. **Broker Training**: Brokers are trained on CBF BCP procedures including manual email submission, digital certificate usage, and 24-hour reconciliation requirements
3. **Outage Notification**: CBF will notify industry of contingency event declarations and cessations via standard communication channels
4. **CSV Template Stability**: CBF EDN/CRN CSV templates will not change significantly; any changes will be communicated with advance notice
5. **MAWB Format Consistency**: MAWB numbers in SBSS do not contain spaces; user input may contain spaces but will be stripped for matching
6. **Container/Vessel ID**: Container number field in CRN report can remain blank (optional per CBF guidance)
7. **Goods Owner ID Priority**: Shipper Tax ID takes precedence over Client ID (OID) for goods owner identifier

### Risks

| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| **CBF Template Changes**: CBF updates CSV template format without advance notice | Medium | High | Monitor CBF communications; implement configurable field mappings where feasible; maintain test data sets for regression testing |
| **Data Quality Issues**: Missing or invalid data (e.g., blank URN, invalid port codes) prevents CSV generation | High | Medium | Implement pre-validation checks; provide clear error messages; enable brokers to correct data before re-generating reports |
| **Character Limit Violations**: Mapped data exceeds CBF field character limits after comma removal | Medium | Medium | Apply trimming logic during CSV generation; log truncated values for audit; consider data cleansing rules for upstream systems |
| **TPS Response File Delays**: CBF delays sending response CSV files, causing uncertainty about shipment status | Medium | High | Implement status tracking in shipment comments; train brokers to follow up via TPS BCS email; establish CBF escalation contacts |
| **User Error in File Upload**: Brokers upload incorrect CSV files (wrong format, corrupt data) | High | Low | Implement robust validation with row-level error reporting; provide sample files and user guides; restrict upload to BCP-trained users |
| **Reconciliation Backlog**: High volume of contingency submissions overwhelms brokers during 24-hour recovery window | Medium | High | Automate data pre-population where possible; enable bulk re-submission; coordinate off-peak processing (6pm-9am) |
| **Duplicate Charge Files**: Contingency and post-recovery submissions generate duplicate billing entries | Low | High | Implement UNS flag logic (Upload Not Sent); reconcile charge file generation with contingency flag status; coordinate with billing system team |

---

## 8. Business Value

### Quantitative Benefits
- **Reduced Cargo Delay Costs**: Estimated 80% reduction in export cargo delay penalties during TPS outages (based on historical 3-hour+ outage frequency: 2-3 times per year)
- **Operational Efficiency**: Estimated 60% reduction in manual effort for contingency file preparation (automated CSV generation vs manual Excel compilation)
- **Compliance Cost Avoidance**: Avoidance of potential CBF penalties for non-compliance with BCP requirements (estimated $50K-$200K per incident)

### Qualitative Benefits
- **Customer Satisfaction**: Maintained export service levels during TPS outages, preserving customer confidence in Carrier Co reliability
- **Regulatory Relationship**: Demonstrates Carrier Co commitment to CBF compliance and cooperative industry participation in contingency planning
- **Operational Resilience**: Enhanced business continuity capability reduces vulnerability to external system dependencies
- **Audit Readiness**: Comprehensive logging and reconciliation supports compliance audits and incident investigations

### Strategic Alignment
- Supports Carrier Co Australia's commitment to operational excellence and service reliability
- Aligns with CBF's industry-wide resilience objectives for trade facilitation
- Positions Carrier Co as a responsive partner in government-industry collaboration
- Builds organizational capability for handling external system disruptions

---

**Document Control**  
Prepared by: Customs Brokerage Product Management  
Reviewed by: Compliance, IT Architecture, Operations Leadership  
Approved by: General Manager, Customs Brokerage Australia

---

title: Project-A - Export - Cargo Reporting & Declaration Contingency (Customs Business Continuity Plan) — Technical Specification
content: # Export Cargo Reporting & Declaration Contingency
## Technical Specification for Business Continuity Plan Implementation

**Document Version:** 1.0  
**Effective Date:** 2022  
**System:** SBSS (Brokerage Operations Support System)  
**Regulatory Framework:** CBF TPS Business Continuity Plan

---

## 1. Overview

This specification defines the technical requirements for implementing Customs Border Force (CBF) Trade Processing System (TPS) Business Continuity Plan (BCP) functionality in SBSS. The implementation enables export declaration and consolidation sub-manifest contingency reporting via CSV file generation and TPS response file processing during TPS outages or system disruptions.

---

## 2. Reference Data Configuration

### 2.1 Lookup Code Structure

**Reference Type Code: CONRPT-X**

| Code | Description | Purpose |
|------|-------------|---------|
| CRN-RNA | Carrier Co Pty Ltd | CRN Reporting Party Name |
| CRN-RID | 83003926181 | CRN Reporting Party TIN/ID |
| EDN-RNA | Carrier Co Pty Ltd | EDN Reporting Party Name |
| EDN-RID | 83003926181 | EDN Reporting Party TIN/ID |

**Configuration Path**: Admin > Local Lookup Codes > Reference Type Code > CONRPT-X

**Purpose**: Store reporting party credentials used in CSV file generation. Values must be configurable by administrators to support changes in reporting entity or TIN registration.

**Validation Rules**:
- CRN-RID and EDN-RID must be exactly 11 numeric characters (Australian Business Number format)
- CRN-RNA and EDN-RNA must not exceed 70 characters
- Codes must not contain commas (comma removal logic applies during CSV generation)

### 2.2 Comment Type Extension

**New Shipment Comment Type: BCP (Business Continuity Plan)**

| Field | Value |
|-------|-------|
| Code | BCP |
| Description | Business Continuity Plan |
| Type | 01 (Shipment) |
| Enabled | Yes |
| Original Description | Business Continuity Plan |

**Configuration Path**: Admin > Shipment Comments > Type Codes

**Purpose**: Enable differentiated storage of TPS contingency response statuses (HELD vs PERMIT REQUIRED) in shipment comment records for broker visibility and reconciliation.

**Usage Context**: Applied when processing TPS EDN response CSV files containing HELD or PERMIT REQUIRED status values. See §5.3 for status assignment logic.

---

## 3. Report Generation: Export Declaration Contingency (EDN)

### 3.1 Report Definition

**Report Title**: Export Declaration Contingency Report  
**Report Type**: CSV Export  
**Access Control**: BRK, ADM, COM roles  
**Search Interface**: Web UI with filter criteria submission

### 3.2 Search Criteria Fields

| Field | Type | Mandatory | Validation | Filter Target |
|-------|------|-----------|------------|---------------|
| Export Date | Date Range | Conditional | YYYYMMDD format. If "All Dates" checkbox selected, omit filter. | Shipment > Status > Dates > Export Date |
| MAWB | Text (Multi-value) | Optional | Comma-separated list. Strip spaces before matching. No length limit. | Shipment > Movement > Movement > MAWB Number |
| HAWB | Text (Multi-value) | Optional | Comma-separated list. Strip spaces before matching. No length limit. | Packages > Packages > Lead (True) > Tracking Num |
| Port of Loading | Drop-down | Mandatory | Single selection only. Options: AUBNE, AUMEL, AUPER, AUSYD. | Declaration > Movement > Export > Export Port of Exit (mapped via GetAirportCodeAndCountryFromPortCode function) |

**All Dates Checkbox Behavior**: When checked, Export Date filter is disabled. Report includes all shipments regardless of export date, constrained only by MAWB, HAWB, and Port of Loading criteria.

**MAWB/HAWB Space Handling**:
- User input: `837 5550 7641` → Search for: `83755507641`
- User input: `304 44097942` → Search for: `30444097942`
- System MAWB/HAWB values stored without spaces; comparison performed on space-stripped user input.

### 3.3 Data Mapping and Field Structure

**Character Limit Enforcement**: All fields trimmed to specified character limits AFTER comma removal. Truncation applies from right (excess characters discarded).

**Comma Removal Rule**: Before field population, scan mapped value for commas (`,`) and remove all instances. Example: `Acme, Inc.` → `Acme Inc.`

| Column | Character Limit | Source Mapping | Conditional Logic |
|--------|-----------------|----------------|-------------------|
| Reporting Party Name | 70 | Local Lookup Codes > CONRPT-X > EDN-RNA (Description) | - |
| Reporting Party TIN | 11 | Local Lookup Codes > CONRPT-X > EDN-RID (Description) | - |
| Email | 70 | Admin > User Edit (User) > General > Email Address. If blank: User ID + "@Carrier Co.com" | User-based (logged-in user executing report) |
| Sender Reference ID | 35 | Declaration > Customs > Reference Numbers > URN (Ref Number) | - |
| MAWB / Ocean Bill | 35 | Shipment > Movement > Movement > MAWB Number | - |
| HAWB / House Bill | 35 | Packages > Packages > Lead (True) > Tracking Num | - |
| Goods Owner Name | 35 | Declaration > Customer > Shipper > Name | - |
| Goods Owner ID | 11 | Declaration > Customer > Shipper > Tax ID. If blank: Shipper Profile > Reference Numbers > OID (Number) | Priority: Tax ID > OID |
| Consignee | 35 | Declaration > Customer > Consignee > Name | - |
| Final Destination Country Code | 2 | Shipment > Address > Type 02 (Consignee) > Country | ISO 2-letter country code |
| Intended Date of Export | 8 | Shipment > Status > Dates > Export Date | Format: YYYYMMDD |
| Mode of Transport | 3 | Declaration > Customs > Customs Codes > MTE (Description) | Value is AIR or SEA (not numeric code 6/11) |
| Flight No. / Vessel ID | 8 | If MTE = AIR: Shipment > Movement > Export > Flight/Voyage Number. If MTE = SEA: Declaration > Movement > Import > Inbound Transport ID | Conditional on MTE value |
| AHECC | 8 | Commodity > Commodity Line Detail > Commodity Information > Tariff Number | Row per commodity line |
| Goods Description | 128 | Commodity > Commodity Line Detail > Commodity Information > Description | Row per commodity line |
| Permit Numbers | 35 | Commodity > Customs Reference > License Codes > EXP-1 through EXP-9 (where existing). Separate with forward-slash "/" | Row per commodity line. Concatenate multiple permits. |
| FOB Line Value | 15 | Commodity > Commodity Line Detail > Amounts > Statistical Value (exclude currency code) | Row per commodity line. Numeric only, no currency symbol. |
| Port of Loading | 5 | Declaration > Customs > Reference Numbers > EAC (Ref Number) | UN/LOCODE format (e.g., AUSYD) |
| Voyage Number | 6 | If MTE = SEA: Shipment > Movement > Export > Flight/Voyage Number | Conditional on MTE = SEA |

**Commodity Line Expansion**: Each commodity line in the parent declaration generates a separate row in the report. All non-commodity fields (Reporting Party Name, MAWB, Shipper, etc.) repeat for each commodity row.

**Example Multi-Commodity Scenario**:
- Declaration with 3 commodity lines → 3 rows in CSV
- Row 1: AHECC = 12345678, Goods Description = "Electronics", FOB = 5000.00
- Row 2: AHECC = 87654321, Goods Description = "Textiles", FOB = 3000.00
- Row 3: AHECC = 11223344, Goods Description = "Machinery", FOB = 12000.00
- All rows share: Reporting Party Name = "Carrier Co Pty Ltd", MAWB = "83755507641", etc.

### 3.4 File Naming Convention

**Format**: `EDN[ReportingPartyID][DateTime][PortOfLoading][MAWBIndicator].csv`

**Components**:
- `[ReportingPartyID]`: Local Lookup Codes > CONRPT-X > EDN-RID (Description) — 11 characters
- `[DateTime]`: Current date/time at file generation — Format: YYYYMMDDHHMM (12 characters)
- `[PortOfLoading]`: User-selected port from search criteria — 5 characters (e.g., AUBNE)
- `[MAWBIndicator]`: Conditional based on unique MAWB count in report results
  - If result set contains exactly 1 unique MAWB: Use that MAWB (space-stripped, up to 35 characters)
  - If result set contains >1 unique MAWB: Use literal string "MULTIMAWB"

**Examples**:
- Single MAWB: `EDN83003926181202212151430AUBNE83755507641.csv`
- Multiple MAWBs: `EDN83003926181202212151430AUBNEMULTIMAWB.csv`

**Total Filename Length Limit**: 70 characters (including .csv extension). If constructed filename exceeds 70 characters, truncate [MAWBIndicator] component from right.

### 3.5 File Output Specifications

**Format**: CSV (Comma-Separated Values), UTF-8 encoding without BOM  
**Column Headers**: MUST NOT be included in output file  
**Row Structure**: One row per commodity line (declaration may generate multiple rows)  
**Cell Formatting**: All cells formatted as Text (prevent Excel auto-conversion of numeric fields like MAWB)  
**Line Terminator**: Windows CRLF (`\r\n`)  
**Delimiter**: Comma (`,`)  
**Quote Encapsulation**: Only if field value contains delimiter, newline, or quote character (standard CSV escaping)

**Download Mechanism**: Report interface displays results grid. User clicks "Export" button to initiate download. Browser prompts save dialog with pre-populated filename per §3.4.

---

## 4. Report Generation: Export Consolidation Sub-Manifest Contingency (CRN)

### 4.1 Report Definition

**Report Title**: Export Sub Manifest Contingency Report  
**Report Type**: CSV Export  
**Access Control**: BRK, ADM, COM roles  
**Search Interface**: Web UI with filter criteria submission (identical to EDN report search interface)

### 4.2 Search Criteria Fields

| Field | Type | Mandatory | Validation | Filter Target |
|-------|------|-----------|------------|---------------|
| Export Date | Date Range | Conditional | YYYYMMDD format. If "All Dates" checkbox selected, omit filter. | Shipment > Status > Dates > Export Date |
| MAWB | Text (Multi-value) | Optional | Comma-separated list. Strip spaces before matching. | Shipment > Movement > Movement > MAWB Number |
| HAWB | Text (Multi-value) | Optional | Comma-separated list. Strip spaces before matching. | Packages > Packages > Lead (True) > Tracking Num |
| Port of Loading | Drop-down | Mandatory | Single selection only. Options: AUBNE, AUMEL, AUPER, AUSYD. | Declaration > Movement > Export > Export Port of Exit |

**Behavior**: Identical to EDN report search criteria (see §3.2).

### 4.3 Data Mapping and Field Structure

**Character Limit Enforcement**: Identical to EDN report (see §3.3).  
**Comma Removal Rule**: Identical to EDN report (see §3.3).

| Column | Character Limit | Source Mapping | Conditional Logic |
|--------|-----------------|----------------|-------------------|
| Reporting Party Name | 70 | Local Lookup Codes > CONRPT-X > CRN-RNA (Description) | - |
| Reporting Party TIN | 11 | Local Lookup Codes > CONRPT-X > CRN-RID (Description) | - |
| Email | 70 | Admin > User Edit (User) > General > Email Address. If blank: User ID + "@Carrier Co.com" | User-based |
| Sender Reference ID | 35 | Declaration > Customs > Reference Numbers > URN (Ref Number) | - |
| MAWB / Ocean Bill | 35 | Shipment > Movement > Movement > MAWB Number | - |
| HAWB / House Bill | 35 | Packages > Packages > Lead (True) > Tracking Num | - |
| Flight / Voyage No. | 8 | Shipment > Movement > Export > Flight/Voyage Number | - |
| Mode of Transport | 3 | Declaration > Customs > Customs Codes > MTE (Description) | AIR or SEA |
| Date of Departure | 8 | Shipment > Status > Dates > Export Date | Format: YYYYMMDD |
| Export Exemption Code / CAN | 20 | Priority cascade: 1. Declaration > Customs > Customs Codes > EEC (Value); 2. Declaration > Customs > Reference Numbers > CCN (Ref Number); 3. Shipment > Summary > Reference Numbers > TRS (Number); 4. Declaration > Customs > Reference Numbers > TRS (Ref Number) | First non-blank value used |
| Goods Owner Name | 35 | Declaration > Customer > Shipper > Name | - |
| Goods Description | 128 | Shipment > Summary > General > Description | - |
| Destination Country Code | 2 | Shipment > Address > Type 02 (Consignee) > Country | ISO 2-letter country code |
| Port of Loading | 5 | Country + Port Name identified via GetAirportCodeAndCountryFromPortCode(Declaration > Movement > Export > Export Port of Exit) | UN/LOCODE format |
| Vessel ID | 8 | If MTE = SEA: Declaration > Movement > Import > Inbound Transport ID | Conditional on MTE = SEA |
| Container No. / Non-Containerised ID | 17 | BLANK (field intentionally left empty per CBF guidance) | Optional field; leave blank |

**Row Structure**: One row per shipment (unlike EDN, which expands per commodity line).

### 4.4 File Naming Convention

**Format**: `CRN[ReportingPartyID][DateTime][PortOfLoading][MAWBIndicator].csv`

**Components**: Identical to EDN report naming (see §3.4), except prefix is `CRN` instead of `EDN`.

**Examples**:
- Single MAWB: `CRN83003926181202212151430AUMEL30444097942.csv`
- Multiple MAWBs: `CRN83003926181202212151430AUMELMULTIMAWB.csv`

### 4.5 File Output Specifications

**Format**: CSV (Comma-Separated Values), UTF-8 encoding without BOM  
**Column Headers**: MUST NOT be included  
**Row Structure**: One row per shipment (no commodity line expansion)  
**Cell Formatting**: All cells formatted as Text  
**Line Terminator**: Windows CRLF (`\r\n`)  
**Delimiter**: Comma (`,`)  
**Download Mechanism**: Identical to EDN report (see §3.5)

---

## 5. TPS Response File Processing

### 5.1 Data Loader Framework Extension

**New Loader Types**:
- EDN Report Loader
- CRN Report Loader

**Access Control**: Restricted to BCP user group membership. Users without BCP group assignment cannot access EDN/CRN loaders in data loader interface.

**User Interface**:
- Data Loader menu displays "EDN Report Loader" and "CRN Report Loader" options for authorized users
- File upload dialog accepts `.csv` files only
- Post-upload: Display validation results with success/failure/partial success messaging
- Error grid: Row-level detail (row number, field name, error description) for validation failures

### 5.2 File Validation Rules (Common to EDN and CRN)

**Pre-Processing Validation**:
1. **File Format**: Must be CSV format with comma delimiters
2. **Header Row**: Must NOT contain header row (first row must be data)
3. **Character Encoding**: UTF-8 or ASCII
4. **Comma Presence in Data**: If any data field contains commas WITHIN the field value (e.g., `Acme, Inc.`), fail validation with message: "Data fields must not contain commas. Found comma in row [X], field [Y]."
5. **Mandatory Field Presence**: All mandatory fields (per §5.3 and §5.4 field tables) must be non-blank

**Field-Level Validation**:
- **Character Limit Enforcement**: Each field validated against max character limit (per §5.3 and §5.4 tables)
- **Mandatory vs Optional**: Mandatory fields (uppercase in CBF specification) cannot be blank; optional fields (lowercase) may be blank
- **Data Type**: Dates validated as YYYYMMDD format; numeric fields (FOB, TIN) validated as numeric-only

**Validation Outcome Categories**:
- **SUCCESSFUL**: All rows pass validation → Process all rows → Display message: "Uploaded file successfully processed!"
- **FAILED**: File structure invalid (wrong format, headers present, encoding issue) → Process zero rows → Display message: "Uploaded file failed to process. Please re-upload with correct format."
- **PARTIAL SUCCESS**: File structure valid, but ≥1 rows contain field-level errors → Process valid rows only → Display error grid with affected row numbers and specific error messages

**Partial Success Error Message Examples**:
- Character limit exceeded: `Row 5: SENDER REFERENCE: K00097178 character limit exceeded (max 35). Row skipped.`
- Mandatory field missing: `Row 9: SENDER REFERENCE is missing (mandatory field). Row skipped.`
- Invalid date format: `Row 12: INTENDED DATE OF EXPORT: 2022-12-15 invalid format (expected YYYYMMDD). Row skipped.`

**Processing Behavior on Partial Success**: Valid rows are processed (status updates applied to shipments). Invalid rows are skipped and logged. User must correct errors and re-upload affected rows separately.

### 5.3 EDN Response File Processing

**Field Validation Table**:

| Field | Character Limit | Mandatory | Data Type | Purpose |
|-------|-----------------|-----------|-----------|---------|
| Reporting Party Name | 70 | Yes | Text | Match against CONRPT-X > EDN-RNA |
| Reporting Party ID | 11 | Yes | Numeric | Match against CONRPT-X > EDN-RID |
| Email | 70 | Yes | Email | User email (informational) |
| Sender Reference | 35 | Yes | Text | Match to Declaration > Customs > Reference Numbers > URN |
| MAWB / Ocean Bill | 35 | No | Alphanumeric | Match to Shipment > Movement > MAWB (optional for matching) |
| HAWB / House Bill | 35 | No | Alphanumeric | Match to Packages > Lead Tracking Num (optional for matching) |
| Goods Owner Name | 35 | Yes | Text | Shipper name (informational) |
| Goods Owner ID | 11 | No | Alphanumeric | Tax ID or OID (informational) |
| Consignee | 35 | Yes | Text | Consignee name (informational) |
| Final Destination Country Code | 2 | Yes | ISO Country Code | Destination country (informational) |
| Intended Date of Export | 8 | Yes | Date (YYYYMMDD) | Export date (informational) |
| Mode of Transport | 3 | Yes | Text (AIR/SEA) | Transport mode (informational) |
| Flight No. / Vessel ID | 8 | Conditional | Alphanumeric | Conditional mandatory if MTE=AIR or SEA |
| AHECC | 8 | Yes | Numeric (Tariff) | Commodity tariff code (informational) |
| Goods Description | 128 | Yes | Text | Commodity description (informational) |
| Permit Numbers | 35 | No | Text | License codes (informational) |
| FOB Line Value | 15 | Yes | Numeric | Commodity value (informational) |
| Port of Loading | 5 | Yes | UN/LOCODE | Port code (informational) |
| Voyage Number | 6 | No | Alphanumeric | Voyage number (informational) |
| **Status (from TPS)** | 20 | Yes | Enumerated | **Critical field**: UCN / HELD / PERMIT REQUIRED |

**Matching Logic**: Use Sender Reference (URN) as primary key to locate declaration in SBSS. If URN not found, log error and skip row.

**Status Processing Logic**:

| TPS Status Value | Action | Target Field | Value | Conditional Logic |
|------------------|--------|--------------|-------|-------------------|
| UCN | Assign UCN | Declaration > Customs > Custom Code > Reference Number > UCN | [TPS-provided UCN value from file] | Format: `1M07CEDN3560` (2-char state/port + 2-digit year + "CEDN" + serial number) |
| UCN | Set Goods Export Type | Declaration > Customs > Custom Codes > Export Goods Type (DGX) | POSTAL (code: PO) | **ONLY for EDN** (not CRN) |
| HELD | Set RAT Status | Declaration > Brokerage Status > RAT | HLD | - |
| HELD | Set Hold Reason | Declaration > Exception > Hold Reason | PED | - |
| HELD | Add Shipment Comment | Comments > Shipment Comments > Type (BCP) | "HELD" | - |
| PERMIT REQUIRED | Set RAT Status | Declaration > Brokerage Status > RAT | HLD | - |
| PERMIT REQUIRED | Set Hold Reason | Declaration > Exception > Hold Reason | PED | - |
| PERMIT REQUIRED | Add Shipment Comment | Comments > Shipment Comments > Type (BCP) | "PERMIT REQUIRED" | - |

**UCN Format Validation**: If TPS Status = UCN, validate that UCN value matches pattern: `[A-Z0-9]{2}\d{2}CEDN\d+` (2 alphanumeric + 2 digits + "CEDN" + numeric serial). If format invalid, log warning but still assign value.

**Goods Export Type POSTAL Logic**: Apply ONLY when TPS Status = UCN. Do NOT apply for HELD or PERMIT REQUIRED statuses.

### 5.4 CRN Response File Processing

**Field Validation Table**:

| Field | Character Limit | Mandatory | Data Type | Purpose |
|-------|-----------------|-----------|-----------|---------|
| Reporting Party Name | 70 | Yes | Text | Match against CONRPT-X > CRN-RNA |
| Reporting Party TIN | 11 | Yes | Numeric | Match against CONRPT-X > CRN-RID |
| Email | 70 | Yes | Email | User email (informational) |
| Sender Reference | 35 | Yes | Text | Match to Declaration > Customs > Reference Numbers > URN |
| MAWB / Ocean Bill | 35 | No | Alphanumeric | Match to Shipment > Movement > MAWB (optional) |
| HAWB / House Bill | 35 | No | Alphanumeric | Match to Packages > Lead Tracking Num (optional) |
| Flight / Voyage No. | 8 | Yes | Alphanumeric | Flight or voyage identifier (informational) |
| Mode of Transport | 3 | Yes | Text (AIR/SEA) | Transport mode (informational) |
| Date of Departure | 8 | Yes | Date (YYYYMMDD) | Departure date (informational) |
| Export Exemption Code / CAN | 20 | Yes | Text | Exemption code or CAN (informational) |
| Goods Owner Name | 35 | Yes | Text | Shipper name (informational) |
| Goods Description | 128 | Yes | Text | Cargo description (informational) |
| Destination Country Code | 2 | Yes | ISO Country Code | Destination country (informational) |
| Port of Loading | 5 | Yes | UN/LOCODE | Port code (informational) |
| Vessel ID | 8 | Conditional | Alphanumeric | Conditional mandatory if MTE=SEA |
| Container No. | 17 | No | Alphanumeric | Container ID (informational) |
| **Status (from TPS)** | 20 | Yes | Enumerated | **Critical field**: UCN / HELD |

**Matching Logic**: Identical to EDN (match on URN).

**Status Processing Logic**:

| TPS Status Value | Action | Target Field | Value | Conditional Logic |
|------------------|--------|--------------|-------|-------------------|
| UCN | Assign UCN | Declaration > Customs > Custom Code > Reference Number > UCN | [TPS-provided UCN value from file] | Format: `1M07CCRN3560` (2-char state/port + 2-digit year + "CCRN" + serial number) |
| HELD | Set RAT Status | Declaration > Brokerage Status > RAT | HLD | - |
| HELD | Set Hold Reason | Declaration > Exception > Hold Reason | PED | - |
| HELD | Add Shipment Comment | Comments > Shipment Comments > Type (BCP) | "HELD" | - |

**Note**: CRN does NOT set Goods Export Type to POSTAL (POSTAL logic applies only to EDN).

**UCN Format Validation**: If TPS Status = UCN, validate that UCN value matches pattern: `[A-Z0-9]{2}\d{2}CCRN\d+` (2 alphanumeric + 2 digits + "CCRN" + numeric serial). If format invalid, log warning but still assign value.

### 5.5 Logging and Audit Trail

**Log Location**: File upload logs stored in text files (`.txt`) in the same directory where the user uploaded the CSV file (if accessible), or in a default system log directory.

**Log File Naming**: `[LoaderType]_[UploadDateTime]_[Outcome].log`  
- Example: `EDN_20221215143022_PARTIAL_SUCCESS.log`

**Log Entry Format**:
```
[Timestamp] [UserID] [Filename] [Outcome] [Details]
```

**Log Entry Examples**:
- Success: `2022-12-15 14:30:22 | USER123 | EDN830039261812505121709AUBNE83755507641.csv | SUCCESSFUL | 15 rows processed, 0 errors`
- Failure: `2022-12-15 14:35:10 | USER456 | CRN830039261812505121700MELMULTIPLE.csv | FAILED | File format invalid, headers detected`
- Partial: `2022-12-15 14:40:05 | USER789 | EDN830039261812505121709AUBNEMULTIMAWB.csv | PARTIAL SUCCESS | 20 rows processed, 3 rows skipped. Errors: Row 5 (Sender Reference exceeds 35 chars), Row 9 (Sender Reference missing), Row 12 (Invalid date format)`

**Database Logging**: In addition to text file logs, create database records in a `ContingencyFileUploadLog` table (new table):

| Column | Type | Description |
|--------|------|-------------|
| UploadID | INT (PK) | Auto-increment unique ID |
| UploadDateTime | DATETIME | Timestamp of upload |
| UserID | VARCHAR(50) | User who uploaded file |
| LoaderType | VARCHAR(10) | EDN or CRN |
| Filename | VARCHAR(255) | Uploaded CSV filename |
| Outcome | VARCHAR(20) | SUCCESSFUL / FAILED / PARTIAL SUCCESS |
| TotalRows | INT | Total rows in file |
| ProcessedRows | INT | Rows successfully processed |
| SkippedRows | INT | Rows skipped due to errors |
| ErrorDetails | TEXT | JSON array of error objects: `[{"row":5,"field":"Sender Reference","error":"Exceeds 35 chars"},...]` |

**Retention**: Logs retained for 5 years (compliance with CBF audit requirements).

---

## 6. Post-Outage Recovery and Reconciliation

### 6.1 Shipment Comment Visibility

**Purpose**: Display contingency reference numbers and status flags in shipment comments to enable brokers to identify shipments requiring TPS re-submission after outage recovery.

**Comment Assignment Triggers**:
- When TPS Status = HELD or PERMIT REQUIRED (from EDN or CRN response processing)
- Comment Type = BCP
- Comment Text = Literal value from TPS Status field (e.g., "HELD" or "PERMIT REQUIRED")

**Comment Display**:
- Shipment > Comments > Type (BCP) tab
- Comment displays in Remark popup when broker views shipment details

**Reconciliation Workflow** (Manual Broker Actions, Outside Scope of This Spec):
1. Broker queries shipments with BCP comments (HELD or PERMIT REQUIRED)
2. Broker corrects data issues (e.g., uploads missing permits, corrects HS codes)
3. Broker submits corrected declarations to TPS via standard EDIFACT messaging (OUTDEC, COODEC) within 24 hours of TPS restoration
4. Broker cites UCN (C-EDN or C-CRN) in TPS submission to reconcile contingency records
5. TPS processes submission and issues standard permit or error response

**System Support for Reconciliation**:
- UCN values visible in Declaration > Customs > Custom Code > Reference Number > UCN field
- Brokers can search/filter shipments by UCN presence to identify contingency-processed shipments
- Export Goods Type = POSTAL flag indicates shipment was processed via contingency (EDN scenario)

### 6.2 Charge File Suppression

**Context**: Contingency-processed shipments may generate duplicate charge files if both contingency approval and post-recovery TPS approval trigger billing events.

**Specification** (Deferred to Charge File Module):
- If Declaration > Customs > Reference Number > UCN exists, evaluate whether to suppress charge file generation until post-recovery TPS permit received
- UNS (Upload Not Sent) flag logic applies: If UCN assigned, set shipment flag to suppress charge upload until reconciliation complete
- Coordinate with billing system integration spec (see Platform Knowledge §3 for SBSS→Billing integration patterns)

**Out of Scope for This Feature**: Detailed charge file suppression logic. Note: Further analysis required in billing module specification.

---

## 7. Data Model Extensions

### 7.1 Declaration Custom Code Reference Number

**New Reference Number Type: UCN (Unique Contingency Number)**

| Field | Type | Length | Purpose |
|-------|------|--------|---------|
| UCN | VARCHAR | 20 | Store TPS-assigned contingency reference number (C-EDN or C-CRN format) |

**Storage Path**: Declaration > Customs > Custom Code > Reference Number > UCN

**Format Examples**:
- EDN UCN: `1M07CEDN3560`
- CRN UCN: `1M07CCRN3560`

**Validation**: No format validation enforced at storage time (TPS may change format over time). Accept any alphanumeric string up to 20 characters.

**Indexing**: Add database index on UCN field to support search/filter queries by contingency reference number.

### 7.2 Export Goods Type Code

**New Code: POSTAL (PO)**

**Existing Field**: Declaration > Customs > Custom Codes > Export Goods Type (DGX)

**Purpose**: Indicate shipment processed via EDN contingency with UCN assignment. Per CBF BCP procedures, contingency-approved exports set to POSTAL to enable self-acquittal when re-submitted to TPS.

**Code Definition**:
- Code: PO
- Description: POSTAL
- Apply Condition: EDN response with TPS Status = UCN

**Validation**: Code restricted to BCP loader assignment (not manually settable by brokers).

### 7.3 Shipment Comment Type

**New Type: BCP (Business Continuity Plan)**

See §2.2 for detailed specification.

---

## 8. Validation Rules Summary

### 8.1 CSV Generation Validation (Pre-Export)

| Rule | Condition | Error Message |
|------|-----------|---------------|
| Missing URN | Declaration > Customs > Reference Numbers > URN is blank | "Cannot generate CSV: Declaration [ID] missing Sender Reference (URN)" |
| Invalid Port Code | Declaration > Movement > Export > Export Port of Exit cannot be mapped to UN/LOCODE | "Cannot generate CSV: Declaration [ID] has invalid Export Port of Exit" |
| Blank Mandatory Field | Any mandatory field (per §3.3 or §4.3) is blank after mapping | "Cannot generate CSV: Declaration [ID] missing required field [FieldName]" |
| Commodity Line Limit (EDN Only) | Declaration contains >50 commodity lines | "Warning: Declaration [ID] exceeds 50 commodity lines. CSV will be truncated per CBF limit." |

**Processing on Validation Failure**: Exclude affected declaration from CSV generation. Display error summary to user listing all excluded declarations with reasons.

### 8.2 CSV File Upload Validation (TPS Response Processing)

| Rule | Condition | Error Message |
|------|-----------|---------------|
| File Format Invalid | File is not CSV format or contains headers | "Uploaded file failed to process. Please re-upload with correct format." |
| Commas in Data | Any data field contains embedded commas | "Row [X]: Data fields must not contain commas. Found comma in field [Y]." |
| Mandatory Field Missing | Mandatory field (per §5.3 or §5.4) is blank | "Row [X]: [FieldName] is missing (mandatory field). Row skipped." |
| Character Limit Exceeded | Field value exceeds max character limit (per §5.3 or §5.4) | "Row [X]: [FieldName] character limit exceeded (max [N]). Row skipped." |
| Invalid Date Format | Date field not in YYYYMMDD format | "Row [X]: [FieldName] invalid format (expected YYYYMMDD). Row skipped." |
| URN Not Found | Sender Reference (URN) does not match any declaration in SBSS | "Row [X]: Sender Reference [URN] not found in system. Row skipped." |
| Invalid Status Value | Status field contains value other than UCN / HELD / PERMIT REQUIRED | "Row [X]: Status value [Value] invalid (expected UCN, HELD, or PERMIT REQUIRED). Row skipped." |

**Processing on Validation Failure**: Skip affected row, log error, continue processing subsequent rows. Display error grid to user after processing complete.

---

## 9. Integration Points

### 9.1 User Authentication and Authorization

**BCP User Group**:
- New user group: `BCP_EXPORT_CONTINGENCY`
- Members: Brokers, Admins, Compilers authorized for contingency operations
- Permissions: Access EDN Report Loader, CRN Report Loader, generate EDN/CRN reports

**Access Control Logic**:
- Check user membership in BCP_EXPORT_CONTINGENCY group before displaying loader options
- If user not in group, loaders hidden from data loader menu

### 9.2 Report Generation Engine

**SBSS Reporting Module**:
- Integrate EDN and CRN report definitions into existing SBSS report framework
- Use standard search criteria UI components (date range picker, text input, dropdown)
- Apply existing report export mechanism (CSV download via browser save dialog)

**Cell Formatting** (Excel Integration Consideration):
- Investigate setting cell format to "Text" in generated CSV to prevent Excel auto-formatting of MAWBs (e.g., 12345678910 displayed as 1.23E+10)
- If achievable via CSV metadata or Excel-specific CSV dialect, implement
- If not achievable, document user guidance to manually format columns as Text in Excel after opening

### 9.3 Data Loader Framework

**Existing Data Loaders** (Context):
1. [Existing Loader 1]
2. [Existing Loader 2]
3. [Existing Loader 3]
4. [Existing Loader 4]

**New Loaders**:
5. EDN Report Loader
6. CRN Report Loader

**Common Loader Features**:
- File upload via web UI
- Validation engine with row-level error capture
- Success/failure/partial success outcome messaging
- Database logging of upload events

---

## 10. Exception Handling and Error Scenarios

### 10.1 CSV Generation Errors

| Scenario | System Behavior | User Notification |
|----------|-----------------|-------------------|
| No matching shipments | Zero rows in report | Display message: "No shipments found matching search criteria." |
| All declarations missing URN | Zero rows in report | Display error summary: "All declarations excluded due to missing Sender Reference (URN). Please ensure declarations have URN populated before generating CSV." |
| Mixed valid/invalid declarations | Report includes only valid declarations | Display warning: "X declarations excluded due to validation errors. See error log for details." |

### 10.2 CSV Upload Errors

| Scenario | System Behavior | User Notification |
|----------|-----------------|-------------------|
| File too large (>10MB) | Reject upload before processing | Display message: "File size exceeds limit (10MB). Please split file and upload in batches." |
| Encoding issue (non-UTF-8) | Reject upload before processing | Display message: "File encoding invalid. Please save file as UTF-8 CSV and re-upload." |
| Zero valid rows | Process zero rows | Display message: "All rows failed validation. See error log for details." |
| Partial processing with >50% failure rate | Process valid rows, log errors | Display warning: "High error rate detected (X% rows failed). Please review file and re-upload corrected rows." |

### 10.3 Status Assignment Errors

| Scenario | System Behavior | Recovery Action |
|----------|-----------------|-----------------|
| UCN already assigned | Skip row, log warning | No override of existing UCN |
| RAT status already HLD | Update hold reason to PED, log info | Existing hold reason replaced |
| Declaration not found by URN | Skip row, log error | Broker must correct URN in CSV and re-upload |

---

## 11. Performance Considerations

### 11.1 CSV Generation Performance Targets

| Scenario | Target Performance |
|----------|-------------------|
| 1-50 shipments | <10 seconds to generate report |
| 51-100 shipments | <30 seconds to generate report |
| 101-500 shipments | <2 minutes to generate report |
| 500+ shipments | Display warning: "Large report detected. Processing may take several minutes." |

**Optimization Strategies**:
- Use indexed queries on MAWB, HAWB, Export Date, Port of Exit
- Batch-fetch commodity lines for all declarations in single query (avoid N+1)
- Stream CSV output directly to download buffer (avoid in-memory accumulation)

### 11.2 CSV Upload Processing Performance Targets

| Scenario | Target Performance |
|----------|-------------------|
| 1-50 rows | <5 seconds to validate and process |
| 51-100 rows | <15 seconds to validate and process |
| 101-500 rows | <1 minute to validate and process |
| 500+ rows | Display warning: "Large file detected. Processing may take several minutes." |

**Optimization Strategies**:
- Validate all rows in-memory before database writes (fail fast on format errors)
- Batch update declarations (commit every 50 rows to reduce transaction overhead)
- Use prepared statements for status updates and comment inserts

---

## 12. Testing Considerations

### 12.1 CSV Generation Test Scenarios

| Test Case | Description | Expected Outcome |
|-----------|-------------|------------------|
| Single shipment, single commodity | Generate EDN report with 1 row | CSV contains 1 data row, all mandatory fields populated |
| Single shipment, 3 commodities | Generate EDN report | CSV contains 3 rows (1 per commodity), non-commodity fields repeated |
| Multiple shipments, mixed MAWBs | Generate CRN report | Filename contains "MULTIMAWB", all shipments included |
| Search with date range | Filter shipments by export date | Only shipments within date range included |
| Search with MAWB containing spaces | Input "837 5550 7641" | Matches shipment with MAWB "83755507641" |
| Missing URN | Declaration lacks Sender Reference | Declaration excluded, error logged |
| Character limit overflow | Goods Description >128 chars | Field trimmed to 128 chars in CSV |
| Comma removal | Shipper name "Acme, Inc." | CSV field contains "Acme Inc." (comma removed) |

### 12.2 CSV Upload Test Scenarios

| Test Case | Description | Expected Outcome |
|-----------|-------------|------------------|
| Valid EDN file, all UCN status | Upload 10 rows, all status=UCN | 10 shipments receive UCN, Goods Type=POSTAL, RAT unchanged |
| Valid CRN file, all HELD status | Upload 5 rows, all status=HELD | 5 shipments set RAT=HLD, hold reason=PED, BCP comment added |
| Mixed statuses (UCN + HELD) | Upload 10 rows, 5 UCN + 5 HELD | 5 receive UCN+POSTAL, 5 receive RAT=HLD+BCP comment |
| Missing mandatory field (Sender Ref) | Row 3 missing Sender Reference | Row 3 skipped, error logged, other 9 rows processed |
| Character limit exceeded | Row 5 Sender Reference = 40 chars | Row 5 skipped, error logged, other rows processed |
| Invalid URN (not found in system) | Row 7 URN does not match any declaration | Row 7 skipped, error logged |
| File with headers | Upload CSV with column headers in row 1 | Entire file rejected, FAILED outcome |
| Commas in data fields | Row 2 contains "Acme, Inc." in Goods Owner Name | Row 2 fails validation, skipped, error logged |

### 12.3 End-to-End Test Scenarios

| Test Case | Description | Expected Outcome |
|-----------|-------------|------------------|
| Generate EDN → Submit to TPS → Process Response | Broker generates EDN CSV, emails to TPS BCS, receives UCN response, uploads response CSV | Shipments receive UCN, POSTAL type, visible in shipment comments, ready for post-recovery submission |
| Generate CRN → Submit to TPS → Process HELD Response | Broker generates CRN CSV, submits via email, receives HELD response, uploads response CSV | Shipments set RAT=HLD, BCP comment "HELD", broker resolves hold, re-submits to TPS after restoration |
| Multi-user concurrent upload | 2 users upload different EDN response files simultaneously | Both files processed independently, no data corruption, separate log entries |
| Post-recovery TPS reconciliation | Broker identifies UCN-assigned shipments via BCP comments, submits OUTDEC with C-EDN reference | TPS accepts submission, issues standard permit, broker clears BCP comment |

---

## 13. Regulatory Compliance Notes

### 13.1 CBF BCP Requirements

**Mandatory CSV File Characteristics**:
- No commas in data field values (enforced by comma removal logic)
- No inverted commas, brackets, slashes in data values (consider extending validation to remove these characters)
- File naming convention strictly followed (EDN/CRN prefix + party ID + timestamp + port + MAWB/MULTIPLE)
- CSV format is TEXT (not Excel binary format)

**24-Hour Reconciliation Window**:
- This specification supports data preparation for reconciliation (UCN visibility, comment tracking)
- Actual TPS re-submission workflow is manual (broker responsibility, outside system scope)
- SBSS must retain contingency records for audit (5-year retention in BSIS)

**Secure Email Submission** (Out of Scope):
- Brokers use TPS BCS secure email channel with digital certificate signing and TPS BCS Public Key encryption
- SBSS generates CSV files; email submission and encryption performed externally

### 13.2 Data Retention and Audit

**Retention Periods**:
- Contingency file upload logs: 5 years (database + text file logs)
- UCN reference numbers: Permanent (part of declaration record)
- BCP shipment comments: Permanent (part of shipment comment history)

**Audit Requirements**:
- CBF may request evidence of contingency submissions during compliance audits
- SBSS must produce reports showing: date/time of CSV generation, user who generated file, shipments included, UCN assignments received, post-recovery reconciliation status
- Recommend creating audit report: "BCP Activity Summary" listing all contingency events, CSV files generated, TPS responses processed, reconciliation outcomes

---

**End of Technical Specification**

---

**Document Control**  
Prepared by: Technical Architecture and Development Team  
Reviewed by: Customs Operations SME, Compliance, QA  
Approved by: IT Manager, Customs Brokerage Systems

---

**Cross-Reference to Shared Context**  
- Platform Knowledge: §2 (System Architecture - TPS Integration), §3 (Integration Patterns - EDIFACT Messaging), §8 (Glossary - EDN, CRN, UCN, BCP)  
- Process Flow: §2 (Export Declaration Process), §5 (Message Lifecycle), §7 (Regulatory Context - CBF Requirements)

User stories:

title: LOP - Project-A - Export - Cargo Reporting Contingency (Customs Business Continuity Plan)
description: LOP for Project-A - Export - Cargo Reporting Contingency (Customs Business Continuity Plan)
acceptance_criteria: Create LOP diagram in Visio for Project-A - Export - Cargo Reporting Contingency (Customs Business Continuity Plan) Create Test Strategy Create Architectural Assessment

title: Architectural Assessment Support
description: To support the BCP feature: https://tfs.Carrier Co.com/tfs/UpsProd/P07AGit_GTS/_workitems/edit/5321157 and supporting and re analyzing the architectural assessment work item and providing the solutions for the below task: https://tfs.Carrier Co.com/tfs/UpsProd/P07AGit_GTS/_workitems/edit/6773543
acceptance_criteria: Supporting in creating the Architectural tasks, need to connect with @Manmohan Ghai(NBC2SYW)

title: EDN - Assign UCN & Goods type = postal to the shipment
description: As a RATER I want to process EDN response (.csv) from customs and update the unique contingent number (UCN) to the shipment so that I once the TPS is up, we can send back the shipment with UCN as identifier.
acceptance_criteria: Continuation of User Story 6821644: Data loader | Validate EDN response from TPS Assigning status to shipment: If the shipment status = UCN, system need to assign same to shipment Mapping: Declaration > Customs > Custom code > Reference number > UCN (unique contingent number) If the shipment status = HELD, system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED If the shipment status = Permit required, system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED Set Goods type = POSTAL After successfully assigned UCN to the shipment set the Goods export type = POSTAL Mapping: declaration-->Customs-->Custom Codes --> Export goods type (DGX) --> POSTAL (PO) Note: Set Goods type = POSTAL is applies only for the shipment which is received with UCN

title: CRN - Assign UCN & HLD
description: As a RATER I want to process CRN response (.csv) from customs and update the unique contingent number (UCN) to the shipment so that I once the TPS is up, we can send back the shipment with UCN as identifier.
acceptance_criteria: Continuation of User Story 6821643: Data loader | validate CRN response from TPS Assigning UCN to shipment: If the TPS response status = UCN (unique contingent number), system need to assign same to shipment Mapping: Declaration > Customs > Custom code > Reference number > UCN (unique contingent number) If the TPS response status = HELD, system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED

title: Data loader | validate CRN response from TPS
description: As a RATER I want to process the CRN response .csv file which I'll upload in data loader so that I can save the response to respective shipment.
acceptance_criteria: Ability to process the CRN response .csv from TPS Once the user uploads the .csv file in the data loader, system need to validate and then read the status of each shipment. Steps need to be followed upon file uploaded. Validate the uploaded .csv file check whether it passes all the validation if pass proceed further by reading the status of each line. if fail, throw the error, log both success & failure in DB. Assign the status to the respective shipment. make sure whether only BCP user group only able to access sending back the shipment to TPS -? any specific message we need to send 4th column (mandatory check & field size limit) REPORTING PARTY NAME (70) – MANDATORY REPORTING PARTY TIN (11) – MANDATORY EMAIL (70) – MANDATORY SENDERS REF (35) – MANDATORY Mawb/Ocean Bill (35) – OPTIONAL Hawb/House Bill (35) – OPTIONAL FLIGHT NO/VOYAGE NO (8) – MANDATORY MODE OF TRANSPORT (3) – MANDATORY DATE OF DEPARTURE (8) – MANDATORY (YYYYMMDD) EXPORT EXEMPTION CODE/CAN (20) – MANDATORY GOODS OWNER NAME (35) – MANDATORY GOODS DESCRIPTION (128) – MANDATORY DESTINATION COUNTRY CODE (2) – MANDATORY PORT OF LOADING (5) – MANDATORY (UNLocode) Vessel ID (8) – Conditional (MANDATORY if SEA) Container No/Non Containerised ID (17) – OPTIONAL Status (from TPS) Other validations: None of the field should not contains commos. Header should not be there is .csv file. Size of the field should not exceed max limit (as it mentioned in above) Mandatory fields (CAPITALS) conditional and optional (lower case) leave blank (in optional fields only) if information unavailable Error message: Type of error & condition: SUCCESSFUL -> If the file is in right format Message: Uploaded file is successful processed!!! FAILED If the file format itself is wrong Message: Uploaded file is failed to process so, please re upload with correct format. PARTIAL SUCCESS If file is in right format but any one of the row sender reference fields is missing or exceeds 35 characters E.g. Message If character limit exceeds -> error message: SENDER REFERNECE: K00097178 character limit exceeded, so kindly re upload the file with correct sender reference. If the sender reference is missing for row no: 9 -> error message: SENDER REFERNECE is missing for row no: 9, so kindly re upload the file with sender reference. Note: Only for affected rows we need to display the error in data loader pop up other rows should process. Note: we need to log the success and failure of uploading .csv file. Sample file: https://upsinc-my.sharepoint.com/:x:/g/personal/8539197_ups_com/EUsCfwE2nQFDgXIYKd8Lm6gBFMLLnWFRGTXNfEvrWVcDEQ?e=T7nxwz

title: Data loader | Validate EDN response from TPS
description: As a RATER I want to process the ERN response .csv file which I'll upload in data loader so that I can save the response to respective shipment.
acceptance_criteria: Ability to process the EDN response .csv from TPS Once the user uploads the .csv file in the data loader, system need to validate and then read the status of each shipment. Steps need to be followed upon file uploaded. Validate the uploaded .csv file check whether it passes all the validation if pass proceed further by reading the status of each line. if fail, throw the error, log both success & failure in DB. Assign the status to the respective shipment. make sure whether only BCP user group only able to access sending back the shipment to TPS -? any specific message we need to send 4th column validation (mandatory check & field size limit) REPORTING PARTY NAME (70) – Mandatory REPORTING PARTY ID (11) – Mandatory EMAIL (70) – Mandatory SENDERS REF (Every Line) (35) – Mandatory mawb/ocean bill (35) – Optional hawb/house bill (35) – Optional GOODS OWNER NAME (35) – Mandatory goods owner ID (11) – Optional CONSIGNEE (35) – Mandatory FINAL DEST COUNTRY CODE (2) – Mandatory INTENDED DATE OF EXPORT (8) – Mandatory (YYYYMMDD) MODE OF TRANSPORT (3) – Mandatory flight number/vessel ID (8) – Conditional AHECC (8) – Mandatory GOODS DESCRIPTION (128) – Mandatory permit number (35) – Optional FOB LINE VALUE (15) – Mandatory PORT OF LOADING (5) – Mandatory (UNLocode, full code e.g. AUSYD) voyage number (6) – optional Status Other validations: None of the field should not contains commos Header should not be there is .csv file. Size of the field should not exceed max limit (as it mentioned in above) Mandatory fields (CAPITALS) conditional and optional (lower case) leave blank (in optional fields only) if information unavailable Error message: Type of error & condition: SUCCESSFUL -> If all the rows & field passed the validation Message: Uploaded file is successful processed!!! FAILED If the file format itself is wrong Message: Uploaded file is failed to process so, please re upload with correct format. PARTIAL SUCCESS If file is in right format but any one of the row sender reference fields is missing or exceeds 35 characters E.g. Message If character limit exceeds -> error message: SENDER REFERNECE: K00097178 character limit exceeded, so kindly re upload the file with correct sender reference. If the sender reference is missing for row no: 9 -> error message: SENDER REFERNECE is missing for row no: 9, so kindly re upload the file with sender reference. Note: Only for affected rows we need to display the error in data loader pop up other rows should process. Note: we need to log the success and failure of uploading .csv file. Sample file: https://upsinc-my.sharepoint.com/:x:/g/personal/8539197_ups_com/EXRh-Y6vwBhLm_EabTqlQPEBeyhC3mjRT5yZHSN7lNVfvA?e=pmyhhx Export_Declaration_Help Guide

title: Data loader | Ability to upload- EDN & CRN loader
description: As a RATER I want to able upload the EDN & CRN .csv file to data loader so that I can process the response file and update the status to each shipment.
acceptance_criteria: As is: Already we have 4 Loader To be: Introduce two new data loaders. EDN Report Loader CRN Report Loader

title: Configuration of Reporting Party Local Lookup Codes for Export (Consolidation) Sub Manifest (CRN) and Export Declaration (EDN) Reports
description: As a SBSS user, I want the ability to configure the Reporting Party Name and Reporting Party TIN to-be-used in the Export (Consolidation) Sub Manifest (CRN) and Export Declaration (EDN) contingency reports, respectively.
acceptance_criteria: Create a new Local Lookup Codes > Reference Type Code: Reference Type Code Description CONRPT-X Contingency Report (Export) Create the following Local Lookup Codes: Lookup Code Reference Type Code Description Represents CRN-RNA CONRPT-X Carrier Co Pty Ltd CRN Reporting Party Name CRN-RID CONRPT-X 83003926181 CRN Reporting Party ID EDN-RNA CONRPT-X Carrier Co Pty Ltd EDN Reporting Party Name EDN-RID CONRPT-X 83003926181 EDN Reporting Party ID

title: Export (Consolidation) Sub Manifest (CRN) Contingency Report
description: As a SBSS user, I want to be able to generate an Export (Consolidation) Sub Manifest (CRN) report which contains information necessary for the fulfilment of contingency procedures.
acceptance_criteria: Create a new SBSS Report titled Export Sub Manifest Contingency Report. The following Search Fields must be provided: Export Date Type: Date Range There should be a checkbox adjacent (to the right) - labelled All Dates. If it is checked, the Export Date should not be filtered. Filter: Shipment > Status > Dates > Export Date MAWB Type: Text Field (Optional. User may leave blank or provide an input. Multiple MAWBs may be entered, separated with commas.) Filter: Shipment > Movement > Movement > MAWB Number HAWB Type: Text Field (Optional. User may leave blank or provide an input. Multiple HAWBs may be entered, separated with commas.) Filter: Packages > Packages > Lead (True) > Tracking Num Port of Loading Type: ComboBox / Drop-Down List (Mandatory. User must select only one option.) Options: AUBNE AUMEL AUPER AUSYD Filter: Country + Port Name to be identified using GetAirportCodeAndCountryFromPortCode(Declaration > Movement > Export > Export Port of Exit) A button - Submit - must be provided which, when clicked, generates the report described in Point 2, having applied the aforementioned filters. The following report should be generated, as described: Mapped data must not contain any commas. After removing commas, mapped data must be trimmed (where necessary) according to the character limit of each field (See Point 2C). Column headings: Reporting Party Name Character Limit: 70 Mapping: Local Lookup Codes > CONRPT-X > CRN-RNA (Description) Reporting Party TIN Character Limit: 11 Mapping: Local Lookup Codes > CONRPT-X > CRN-RID (Description) Email Character Limit: 70 Mapping: (User-Based) If Admin > User Edit (User) > General > Email Address is not blank: Use Admin > ... > Email Address Else: Use Admin > User Edit (User) > General > User Information > User ID + “@Carrier Co.com” Sender Reference ID Character Limit: 35 Mapping: Declaration > Customs > Reference Numbers > URN (Ref Number) MAWB / Ocean Bill Character Limit: 35 Mapping: Shipment > Movement > Movement > MAWB Number HAWB / House Bill Character Limit: 35 Mapping: Packages > Packages > Lead (True) > Tracking Num Flight / Voyage No. Character Limit: 8 Mapping: Shipment > Movement > Export > Flight/Voyage Number Mode of Transport Character Limit: 3 Mapping: Declaration > Customs > Customs Codes > MTE (Description) ⁽¹⁾ Date of Departure Character Limit: 8 Mapping: Shipment > Status > Dates > Export Date (Formatted as YYYYMMDD) Export Exemption Code / CAN Character Limit: 20 Mapping: If Declaration > Customs > Customs Codes > EEC (Value) exists: Use Declaration > ... > EEC (Value) Else, if Declaration > Customs > Reference Numbers > CCN (Ref Number) exists: Use Declaration > ... > CCN (Ref Number) Else, if Shipment > Summary > Reference Numbers > TRS (Number) exists: Use Shipment > ... > TRS (Number) Else, if Declaration > Customs > Reference Numbers > TRS (Ref Number) exists: Use Declaration > ... > TRS (Ref Number) Goods Owner Name Character Limit: 35 Mapping: Declaration > Customer > Shipper > Name Goods Description Character Limit: 128 Mapping: Shipment > Summary > General > Description Destination Country Code Character Limit: 2 Mapping: Shipment > Address > Type (02) > Country ⁽²⁾ Port of Loading Character Limit: 5 Mapping: (Country + Port Name (e.g., AUBNE)) Identified using GetAirportCodeAndCountryFromPortCode(Declaration > Movement > Export > Export Port of Exit) Vessel ID Character Limit: 8 Mapping: If Declaration > Customs > Customs Codes > MTE (Description) ⁽¹⁾ is SEA: Use Declaration > Movement > Import > Inbound Transport ID Container No. / Non-Containerized ID Character Limit: 17 Mapping: Blank. ⁽³⁾ ⁽¹⁾ Currently, MTE has two values - 6 for AIR; and 11 for SEA - and it is the Description (AIR, SEA) which must be mapped, not the Value (6, 11). ⁽²⁾ Specifically, Shipment > Address > Type > 02 is the Consignee. This address details "ultimate destination" of the goods, which is why we have chosen to map the associated Country to this field on the report. ⁽³⁾ At present, providing information in this field is indicated as "Optional", according to official documentation (Export_Sub_Manifest__CRN__Help guide). Due to uncertainty regarding this mapping, @Buenaventura Gail (HRD6FRX) has agreed to leave it blank for now.

title: Export Declaration (EDN) Contingency Report
description: As a SBSS user, I want to be able to generate an Export Declaration (EDN) report which contains information necessary for the fulfilment of contingency procedures.
acceptance_criteria: Create a new SBSS Report titled Export Declaration Contingency Report. The following Search Fields must be provided: Export Date Type: Date Range There should be a checkbox adjacent (to the right) - labelled All Dates. If it is checked, the Export Date should not be filtered. Filter: Shipment > Status > Dates > Export Date MAWB Type: Text Field (Optional. User may leave blank or provide an input. Multiple MAWBs may be entered, separated with commas.) Filter: Shipment > Movement > Movement > MAWB Number HAWB Type: Text Field (Optional. User may leave blank or provide an input. Multiple HAWBs may be entered, separated with commas.) Filter: Packages > Packages > Lead (True) > Tracking Num Port of Loading Type: ComboBox / Drop-Down List (Mandatory. User must select only one option.) Options: AUBNE AUMEL AUPER AUSYD Filter: Country + Port Name to be identified using GetAirportCodeAndCountryFromPortCode(Declaration > Movement > Export > Export Port of Exit) A button - Submit - must be provided which, when clicked, generates the report described in Point 2, having applied the aforementioned filters. The following report should be generated, as described: Mapped data must not contain any commas. After removing commas, mapped data must be trimmed (where necessary) according to the character limit of each field (See Point 2C). Column headings: Reporting Party Name Character Limit: 70 Mapping: Local Lookup Codes > CONRPT-X > EDN-RNA (Description) Reporting Party TIN Character Limit: 11 Mapping: Local Lookup Codes > CONRPT-X > EDN-RID (Description) Email Character Limit: 70 Mapping: (User-Based) If Admin > User Edit (User) > General > Email Address is not blank: Use Admin > ... > Email Address Else: Use Admin > User Edit (User) > General > User Information > User ID + “@Carrier Co.com” Sender Reference ID Character Limit: 35 Mapping: Declaration > Customs > Reference Numbers > URN (Ref Number) MAWB / Ocean Bill Character Limit: 35 Mapping: Shipment > Movement > Movement > MAWB Number HAWB / House Bill Character Limit: 35 Mapping: Packages > Packages > Lead (True) > Tracking Num Goods Owner Name Character Limit: 35 Mapping: Declaration > Customer > Shipper > Name Goods Owner ID Character Limit: 11 Mapping: If Declaration > Customer > Shipper > Tax ID is not blank: Use Declaration > ... > Tax ID Else, if Declaration > Customer > Shipper (Shipper Profile) > Reference Numbers > OID (Number) exists: Use Declaration > ... > OID (Number) Consignee Character Limit: 35 Mapping: Declaration > Customer > Consignee > Name Final Destination Country Code Character Limit: 2 Mapping: Shipment > Address > Type (02) > Country ⁽¹⁾ Intended Date of Export Character Limit: 8 Mapping: Shipment > Status > Dates > Export Date (Formatted as YYYYMMDD) Mode of Transport Character Limit: 3 Mapping: Declaration > Customs > Customs Codes > MTE (Description) ⁽²⁾ Flight No. / Vessel ID Character Limit: 8 Mapping: If Declaration > Customs > Customs Codes > MTE (Description) ⁽²⁾ is AIR: Use Shipment > Movement > Export > Flight/Voyage Number Else, if Declaration > Customs > Customs Codes > MTE (Description) ⁽²⁾ is SEA: Use Declaration > Movement > Import > Inbound Transport ID AHECC Character Limit: 8 Mapping: Commodity > Commodity Line Detail > Commodity Information > Tariff Number ⁽³⁾ Goods Description Character Limit: 128 Mapping: Commodity > Commodity Line Detail > Commodity Information > Description ⁽³⁾ Permit Numbers Character Limit: 35 Mapping: Commodity > Customs Reference > License Codes > EXP-1 (Up to EXP-9, where existing, separated with forward-slashes "/") ⁽³⁾ FOB Line Value Character Limit: 15 Mapping: Commodity > Commodity Line Detail > Amounts > Statistical Value (Exclude Currency Code) ⁽³⁾ Port of Loading Character Limit: 5 Mapping: Declaration > Customs > Reference Numbers > EAC (Ref Number) Voyage Number Character Limit: 6 Mapping: If Declaration > Customs > Customs Codes > MTE (Description) ⁽²⁾ is SEA: Use Shipment > Movement > Export > Flight/Voyage Number ⁽¹⁾ Specifically, Shipment > Address > Type > 02 is the Consignee. This address details "ultimate destination" of the goods, which is why we have chosen to map the associated Country to this field on the report. ⁽²⁾ Currently, MTE has two values - 6 for AIR; and 11 for SEA - and it is the Description (AIR, SEA) which must be mapped, not the Value (6, 11). ⁽³⁾ Each commodity line in the parent declaration must have a separate row in the report (See Discussion Point Scenario).

title: Contingency Report Custom CSV Download Functionality
description: As a SBSS user, I want to be able to export / download the Export Declaration (EDN) and Export (Consolidation) Sub Manifest (CRN) reports containing (correctly-formatted) information necessary for the fulfilment of contingency procedures.
acceptance_criteria: Upon creating either the Export Declaration Contingency Report or Export Sub Manifest Contingency Report, the user should have a button available...(Ideally Located Here)(Preferred Design)...which - when clicked - initiates the process of downloading the report data. Specifications for the downloaded file: The file must be in the .CSV (Comma-Separated Values) format. The file name must be created with the following convention: [1] = Local Lookup Codes > CONRPT-X > EDN-RID (Description) [2] = Current Date/Time (Formatted as YYYYMMDDHHMM) [3] = (Original Search Criteria) > Port of Loading [4] = Conditional (Based on the number of unique MAWBs returned report.) If the number of unique MAWBs is 1: Use this MAWB. Else: Use "MULTIPLE". Export Declaration Contingency Report:EDN[1][2][3][4].csv Export Sub Manifest Contingency Report:CRN[1][2][3][4].csv Headers must not be included in the file. Investigate whether all cells in the resulting spreadsheet can be formatted as Text when the user downloads the file:

title: EDN and CRN - Assigning UCN & PED HLD and Custom codes
description: Technical verification of Stored procedure mentioned from below task https://tfs.Carrier Co.com/tfs/UpsProd/P07AGit_GTS/_workitems/edit/6773543
acceptance_criteria: Continuation of User Story 6821643: Data loader | validate CRN response from TPS Assigning UCN to shipment: If the shipment status = UCN, system need to assign same to shipment Mapping: Declaration > Customs > Custom code > Reference number > UCN (unique contingent number) If the shipment status = HOLD, system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED Continuation of User Story 6821644: Data loader | Validate EDN response from TPS Assigning status to shipment: If the shipment status = UCN, system need to assign same to shipment Mapping: Declaration > Customs > Custom code > Reference number > UCN (unique contingent number) If the shipment status = HOLD, system need to assign system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED If the shipment status = Permit required, system need to assign system need to assign PED HOLD under RAT status set RAT = HLD and assign hold reason as PED Set Goods type = POSTAL After successfully assigned UCN to the shipment set the Goods export type = POSTAL Mapping: declaration-->Customs-->Custom Codes --> Export goods type (DGX) --> POSTAL (PO) Note: Set Goods type = POSTAL is applies only for the shipment which is received with UCN

title: EDN & CRN - Logs in txt file
description: As a RATER I want to save the logs of each and every file I upload in data loader so that I can refer the status of file I uploaded for both CRN & EDN.
acceptance_criteria: Logs for EDN & CRN file upload in Data loader Whenever RATER upload the EDN or CRN .csv file in the data loader system need to capture the logs of each and every upload rater does. Logs need to be saved in txt file It needs to be saved in path were RATER upload the file to the data loader.

title: Enhancement to EDN / CRN Contingency Report Search Fields
description: As a SBSS user, when generating the EDN or CRN Contingency Reports, I may include multiple MAWBs in my search criteria - which should be separated using commas and absent of any spaces.
acceptance_criteria: Information entered by the user into the MAWB search fields of the Export Declaration Contingency Report and the Export Sub Manifest Contingency Report may contain spaces. For example: 100 1468 0588 100 14680588 10014680588 MAWB numbers in the system will not include spaces. ⁽¹⁾ For matching purposes, the user input should be stripped of spaces before comparison with MAWBs in the system (See Below). If a match is found, it should be included in the generated report. Example 1 Example 2 Example 3 User Input: 837 5550 7641 304 44097942 61934392359 Search For: 83755507641 30444097942 61934392359 MAWBs listed in the generated report must not contain spaces. ⁽²⁾ Example 1 Example 2 Example 3 In Report: 83755507641 30444097942 61934392359 Modify this section of the naming convention when exporting either report in CSV format: In the generated report, if there is only one unique MAWB Number: Use that unique MAWB Number. Else: Use the word "MULTIMAWB". ⁽¹⁾ Based on current understanding. ⁽²⁾ In other words - if the user inputs 123 4567 8910 - this should be matched to 12345678910 in the system and displayed as 12345678910 in the generated report.

title: End-to-End Testing of Business Continuity Plan (Export)
description: As a Tester I want to do the complete end to end testing of Business continuity plan of export side.
acceptance_criteria: Thing to be cover: Data loader check Assignment of UCN (C-EDN) under declaration custom code based on the TPS status Assignment of UCN (C-CRN) under declaration custom code based on the TPS status Assignment of Postal code only for EDN case based on the TPS status Assignment of RAT HLD for both EDN & CRN based on the TPS status

title: Data setup - Addition of new code in Shipment comments
description: As a RATER I want to add new type (BCP) in shipment reference so that I can differentiate the status we receive from TPS between permit required & held.
acceptance_criteria: Add new code under shipment comments: Code Description Type enabled Type Original description BCP Business continuity Plan 01 SH Business continuity Plan Mapping: Comments > shipment comments

title: Assign EDN report status to shipment comments
description: As a RATER I want to assign the EDN report status to the shipment reference so that I can differentiate the status we receive from TPS between HELD & PERMIT REQUIRED
acceptance_criteria: Assign status from EDN report to shipment comment Logic: Whenever we process the EDN report if the TPS status = HELD If the TPS status = PERMIT REQUIRED For above 2 scenarios assign the value (HELD & PERMIT REQUIRED) to shipment comments Mapping: Comments > Shipping comments > Type (BCP) Same will be reflect in Remark pop up: