Customs flows
The main goal of CAS is to fully automate your customs flow. This is done by sending data from your backend system like an ERP to CAS, where the data will be processed and will result in the necessary declarations to customs.
To be able to process the data correctly, we'll need to configure one or more customs flows existing out of one or more steps. The configuration of the customs flows can be done through the user interface of CAS.
The flow starts with a customs shipment
A customs shipment describes your transfer of goods, and is the starting point for a customs flow in CAS. The customs flow in CAS will translate the customs shipment to 1 or more declarations with customs.
Therefore, creating a customs shipment successfully is one of the first steps when integrating with the CAS solution. This is done by using the Create customs shipment endpoint. After the creation of the customs shipment, CAS will process the declaration through different declaration statuses.
Deductions
It is not necessary to send all data with every customs shipment, even though this might be advisable, it is not always practical. Therefore, CAS is capable to deduce a lot of the necessary data based on the master data and the rules configured in decision tables. This part of the flow we refer to as the deductions.
Validations
With every step in the customs flow, CAS will execute a number of validations. If the validations detect an issue, the declaration are moved into the Invalid status.
Corrections
Corrections to a customs shipment can be done through the UI by editing the declaration. However, these corrections can also be done through the API. There are three possible correction mechanisms through the API:
- Replace
- Update
- Invalidate
The correct method depends on the declaration’s state in the customs flow.
Replace customs shipment by the ingestion API
Replacing a customs shipment is only possible when the declaration has not reached the Accepted status or beyond. Replacing is done by simply changing the message type to "Replace" when sending the customs shipment to CAS to the ingestion API. This will restart the complete customs flow and all manual edits will be lost. However, it will also mean that all relevant deductions can be executed again starting from the new data.
Update declaration
Update endpoints allow modifying an existing declaration including updating the header information and creating, updating, or deleting items. Updates are only possible when the declaration has not yet been sent to customs or the declaration has been rejected by customs. During the update process, all relevant deductions and validations are executed. Using the update endpoints allows targeted changes without restarting the entire customs flow.
Update endpoints follow a selective update model, meaning that only fields explicitly provided in the request body will be updated. Fields that are not included in the request remain unchanged. When a field is a collection of elements, if a collection is provided without casReference, the entire existing collection will be fully replaced by the new one. To update specific items within a collection, use casReference. For elements identified by casReference, only the fields provided will be updated, while non-provided fields for that element remain unchanged.
Invalidate declaration
When the declaration is already sent to customs (status Accepted and beyond), you'll need to invalidate the declaration as customs will need to be informed of the change.