data-science-document-ai 1.58.0__py3-none-any.whl → 1.60.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {data_science_document_ai-1.58.0.dist-info → data_science_document_ai-1.60.0.dist-info}/METADATA +1 -1
  2. {data_science_document_ai-1.58.0.dist-info → data_science_document_ai-1.60.0.dist-info}/RECORD +22 -22
  3. src/postprocessing/common.py +0 -35
  4. src/prompts/library/bookingConfirmation/evergreen/placeholders.json +7 -7
  5. src/prompts/library/bookingConfirmation/evergreen/prompt.txt +45 -29
  6. src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt +3 -3
  7. src/prompts/library/bookingConfirmation/maersk/placeholders.json +5 -5
  8. src/prompts/library/bookingConfirmation/maersk/prompt.txt +48 -56
  9. src/prompts/library/bookingConfirmation/msc/placeholders.json +9 -9
  10. src/prompts/library/bookingConfirmation/msc/prompt.txt +57 -60
  11. src/prompts/library/bookingConfirmation/oocl/placeholders.json +12 -12
  12. src/prompts/library/bookingConfirmation/oocl/prompt.txt +38 -13
  13. src/prompts/library/bookingConfirmation/other/placeholders.json +11 -11
  14. src/prompts/library/bookingConfirmation/other/prompt.txt +36 -12
  15. src/prompts/library/bookingConfirmation/yangming/placeholders.json +12 -12
  16. src/prompts/library/bookingConfirmation/yangming/prompt.txt +45 -57
  17. src/prompts/library/customsInvoice/other/placeholders.json +1 -1
  18. src/prompts/library/customsInvoice/other/prompt.txt +6 -2
  19. src/prompts/library/partnerInvoice/other/placeholders.json +1 -1
  20. src/prompts/library/partnerInvoice/other/prompt.txt +6 -2
  21. src/utils.py +2 -6
  22. {data_science_document_ai-1.58.0.dist-info → data_science_document_ai-1.60.0.dist-info}/WHEEL +0 -0
@@ -7,73 +7,70 @@ The Freight Forwarding company receives Booking Confirmation from MSC Carrier (S
7
7
  These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
8
8
  They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
9
9
  Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
10
+
11
+ To provide context on the journey of a containers for both Export and Import shipments,
12
+ For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
13
+ For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
10
14
  <CONTEXT>
11
15
 
12
- bookingNumber: A unique identifier for the booking.
13
- cyCutOff: The deadline for cargo to be delivered to the Container Yard.
14
- gateInReference: A reference code for cargo entering the terminal.
15
- gateInTerminal: The specific terminal where cargo is gated in.
16
- mblNumber: The Master Bill of Lading number.
17
- pickUpReference: A reference code for cargo pickup.
18
- pickUpTerminal: The specific terminal for cargo pickup.
19
- siCutOff: The deadline for submitting shipping instructions.
20
- vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo.
21
- transportLegs:
22
- eta: The estimated time of arrival for a specific leg.
23
- etd: The estimated time of departure for a specific leg.
24
- imoNumber: The International Maritime Organization number for a specific leg.
25
- portOfDischarge: The port where cargo is unloaded for a specific leg.
26
- portOfLoading: The port where cargo is loaded for a specific leg.
27
- vesselName: The name of the vessel for a specific leg.
28
- voyage: The journey or route taken by the vessel for a specific leg.
16
+ <INSTRUCTIONS>
17
+ - gateInTerminalCode: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
18
+ - gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
19
+ - pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
20
+ - pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
21
+
22
+ - cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be found at CUT-OFF(Date/Time), FCL delivery cut-off, CY CUT OFF, CY Closing.
23
+
24
+ - carrierName and carrierAddress:
25
+ - Extract the name and address of the carrier who is the main parent company in the document.
26
+ - It can be found in the top section of the document, often near the logo or header.
27
+ - Example:
28
+ - "MSC" for carrierName
29
+ - Hamburg, Germany, NETHERLANDS, Poland, Italy, Vietnam, China SHANGHAI BRANCH etc... for carrierAddress.
30
+
31
+ - Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
29
32
 
30
- your task is to extract the text value of the following entities and page numbers starting from 0 where the value was found in the document:
31
- SCHEMA_PLACEHOLDER
33
+ - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
34
+ - eta: The estimated time of arrival for a specific leg.
35
+ - etd: The estimated time of departure for a specific leg.
36
+ - imoNumber: The International Maritime Organization number for a specific leg.
37
+ - portOfDischarge: The port where cargo is unloaded for a specific leg.
38
+ - portOfLoading: The port where cargo is loaded for a specific leg.
39
+ - vesselName: The name of the vessel for a specific leg.
40
+ - voyage: The journey or route taken by the vessel for a specific leg.
32
41
 
33
- Further explanation and Keywords for the transportLegs part as follows. The below 2 conditions is crucial. Take attention here:
34
- - if PORT OF TRANSHIPMENT N*1 value is avaliable, it means we have the second leg, otherwise skip the second and third leg instructions, make it only one leg!
35
- - if PORT OF TRANSHIPMENT N*2 value is avaliable, it means we have the third leg, otherwise skip the third leg instructions, make it only two leg!
42
+ IMPORTANT explanation for the transportLegs part as follows:
43
+ - There is at least one leg in each document.
44
+ - 'eta' must be equal or later than 'etd'!
45
+ - first leg's ETD is always second value in EST. TIME OF ARRIVAL/DEPARTURE. E.g. 30/08/2025 14:00 31/10/2025 22:00 you need the select 31/10/2025 22:00.
46
+ - Multiple legs are possible. When there are multiple legs,
47
+ - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
48
+ - "PORT OF TRANSHIPMENT N1" indicates the presence of a second leg. and "PORT OF TRANSHIPMENT N2" indicates the presence of a third leg.
49
+ - Transhipment Handling: Treat any mentioned "PORT OF TRANSHIPMENT N1" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
50
+ - The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
51
+ - PORT OF TRANSHIPMENT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
52
+ - PORT OF TRANSHIPMENT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
53
+ - Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
36
54
 
37
- - first leg instructions:
38
- - first leg's portOfLoading is always PLACE OF LOADING value.
39
- - first leg's vesselName is always VESSEL NAME value, Ignore the paranthesis part!.
40
- - first leg's portOfDischarge is PORT OF TRANSHIPMENT N*1 value if PORT OF TRANSHIPMENT N*1 value is exists.
41
- - first leg's portOfDischarge is PORT OF DISCHARGE value if PORT OF TRANSHIPMENT N*1 value is not exists.
42
- - first leg's voyage is always VOYAGE NUMBER value with the same row VESSEL NAME.
43
- - first leg's imoNumber is in the VESSEL NAME which the number following of LLOYDS NO.
44
- - first leg's eta is EST. TIME OF ARRIVAL value with the same row VESSEL NAME if PORT OF TRANSHIPMENT N*1 value is not exists.
45
- - first leg's etd is always EST. TIME OF ARRIVAL/DEPARTURE second value E.g. 30/08/2023 14:00 31/08/2023 22:00 you need the select 31/08/2023 22:00.
55
+ Structure of Multiple Leg Sequence & Mapping
56
+ Leg 1 (Initial):
57
+ - `portOfLoading`: PLACE OF LOADING.
58
+ - `portOfDischarge`: PORT OF TRANSHIPMENT N1 (if exists), otherwise PORT OF DISCHARGE.
59
+ - `vesselName`: VESSEL NAME (ignore parentheses).
60
+ - `imoNumber`: Number following LLOYDS NO. in Vessel Name.
61
+ - `etd`: 2nd timestamp in "EST. TIME OF ARRIVAL/DEPARTURE".
46
62
 
47
- - second leg instructions:
48
- - second leg's portOfLoading is always PORT OF TRANSHIPMENT N*1 value.
49
- - second leg's vesselName is always CONNECTING VESSEL N*1 value.
50
- - second leg's portOfDischarge is PORT OF TRANSHIPMENT N*2 value if PORT OF TRANSHIPMENT N*2 value is exists.
51
- - second leg's portOfDischarge is PORT OF DISCHARGE value if PORT OF TRANSHIPMENT N*2 value is not exists.
52
- - second leg's voyage is always VOYAGE NUMBER value with the same row CONNECTING VESSEL N*1.
53
- - second leg's imoNumber is in the CONNECTING VESSEL N*1 which the number following of LLOYDS NO.
54
- - second leg's eta is never available so set it to null.
55
- - second leg's etd is always EST. TIME OF DEPARTURE value with the same row PORT OF TRANSHIPMENT N*1.
56
63
 
57
- - third leg instructions:
58
- - third leg's portOfLoading is always PORT OF TRANSHIPMENT N*2 value.
59
- - third leg's vesselName is always CONNECTING VESSEL N*2 value.
60
- - third leg's portOfDischarge is always PORT OF DISCHARGE value.
61
- - third leg's voyage is always VOYAGE NUMBER value with the same row CONNECTING VESSEL N*2.
62
- - third leg's imoNumber is in the CONNECTING VESSEL N*2 which the number following of LLOYDS NO.
63
- - third leg's eta is never available so set it to null.
64
- - third leg's etd is always EST. TIME OF DEPARTURE value with the same row PORT OF TRANSHIPMENT N*2.
64
+ Leg 2 (Intermediate): Trigger: Only if PORT OF TRANSHIPMENT N1 exists.
65
+ - `portOfLoading`: PORT OF TRANSHIPMENT N1.
66
+ - `portOfDischarge`: PORT OF TRANSHIPMENT N2 (if exists), otherwise PORT OF DISCHARGE.
67
+ - `vesselName`: CONNECTING VESSEL N1.
68
+ - `etd`: EST. TIME OF DEPARTURE from Port of Transhipment row.
65
69
 
66
- - finalizing transporLegs:
67
- - Check number of legs
68
- - If the last item of the transportLegs' portOfLoading is the same value with PORT OF DISCHARGE DELETE THE ITEM!
69
70
 
70
- Further explanation for datapoints except transportLegs part as follows:
71
- - If gateInReference is null, assign it the same value as bookingNumber.
72
- - If pickUpReference is null, assign it the same value as bookingNumber.
71
+ Leg 3 (Final): Trigger: Only if PORT OF TRANSHIPMENT N2 exists.
72
+ - `portOfLoading`: PORT OF TRANSHIPMENT N2.
73
+ - `portOfDischarge`: PORT OF DISCHARGE.
74
+ - `vesselName`: CONNECTING VESSEL N2.
73
75
 
74
- You must apply the following rules:
75
- - The JSON schema must be followed during the extraction.
76
- - The values must only include text found in the document
77
- - Do not normalize any entity value.
78
- - If an entity is not found in the document, keep it empty or np.Nan.
79
- - Validate the JSON make sure its a valid JSON ! No extra text, no missing comma!
76
+ <INSTRUCTIONS>
@@ -4,12 +4,12 @@
4
4
  "bookingNumber": {
5
5
  "type": "STRING",
6
6
  "nullable": true,
7
- "description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking No.', 'Booking Ref.', 'Booking Reference', 'Booking ID', 'carrier's reference' or 'Order Ref'."
7
+ "description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking Reference', 'carrier's reference' or 'Order Ref'."
8
8
  },
9
9
  "contractNumber": {
10
10
  "type": "STRING",
11
11
  "nullable": true,
12
- "description": "It's a contract number between the carrier and Forto Logistics SE & Co KG."
12
+ "description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be referred as Rate Agreement Number or Contract No."
13
13
  },
14
14
  "pickUpTerminalCode": {
15
15
  "type": "STRING",
@@ -19,12 +19,12 @@
19
19
  "gateInTerminalCode": {
20
20
  "type": "STRING",
21
21
  "nullable": true,
22
- "description": "The specific terminal where cargo is gated in especially Export terminal delivery address"
22
+ "description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN LOCATION"
23
23
  },
24
24
  "serviceCode": {
25
25
  "type": "STRING",
26
26
  "nullable": true,
27
- "description": "The Shipping service code associated with the booking confirmation."
27
+ "description": "The Shipping service code associated with the booking confirmation. It can be found as SERVICE CODE"
28
28
  },
29
29
  "performaDate": {
30
30
  "type": "STRING",
@@ -39,12 +39,12 @@
39
39
  "cyCutOff": {
40
40
  "type": "STRING",
41
41
  "nullable": true,
42
- "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
42
+ "description": "The date by which the cargo to be delivered to the Container Yard. It can be found as Intended CY CUT OFF (First Full HUB) or Intended CY CUT OFF"
43
43
  },
44
44
  "gateInReference": {
45
45
  "type": "STRING",
46
46
  "nullable": true,
47
- "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be 'Our Reference'."
47
+ "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be 'Booking Number'."
48
48
  },
49
49
  "mblNumber": {
50
50
  "type": "STRING",
@@ -54,17 +54,17 @@
54
54
  "pickUpReference": {
55
55
  "type": "STRING",
56
56
  "nullable": true,
57
- "description": "A reference code for cargo pickup during the import shipment. Sometimes it can be 'Our Reference'"
57
+ "description": "A reference code for cargo pickup during the import shipment. Sometimes it can be 'Booking Number'."
58
58
  },
59
59
  "siCutOff": {
60
60
  "type": "STRING",
61
61
  "nullable": true,
62
- "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
62
+ "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found as Shipping Instruction/BL Master Due Date"
63
63
  },
64
64
  "vgmCutOff": {
65
65
  "type": "STRING",
66
66
  "nullable": true,
67
- "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
67
+ "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found as Verified Gross Mass (VGM) Due Date"
68
68
  },
69
69
  "containers": {
70
70
  "type": "ARRAY",
@@ -79,12 +79,12 @@
79
79
  "pickUpDepotCode": {
80
80
  "type": "STRING",
81
81
  "nullable": true,
82
- "description": "The depot code where the empty container will be picked up."
82
+ "description": "The depot code where the empty container will be picked up. It is found as EMPTY PICK UP LOCATION"
83
83
  },
84
84
  "dropOffDepotCode": {
85
85
  "type": "STRING",
86
86
  "nullable": true,
87
- "description": "The depot code where the empty container will be dropped off."
87
+ "description": "The depot code where the empty container will be dropped off. EMPTY DROPOFF LOCATION or EMPTY RETURN LOCATION"
88
88
  }
89
89
  }
90
90
  },
@@ -153,7 +153,7 @@
153
153
  "carrierName": {
154
154
  "type": "STRING",
155
155
  "nullable": true,
156
- "description": "The name of the carrier who issued the document."
156
+ "description": "The name of the carrier who issued the document. E.g., OOCL or Orient Overseas Container Line Ltd."
157
157
  }
158
158
  },
159
159
  "required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
@@ -7,18 +7,43 @@ The Freight Forwarding company receives Booking Confirmation from OOCL Carrier (
7
7
  These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
8
8
  They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
9
9
  Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
10
+
11
+ To provide context on the journey of a containers for both Export and Import shipments,
12
+ For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
13
+ For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
10
14
  <CONTEXT>
11
15
 
12
- bookingNumber: Extract the booking number. This information can be found near the labels "BOOKING ACKNOWLEDGEMENT" or "BOOKING NUMBER".
13
- gateInReference: This field should have the same value as the bookingNumber.
14
- cyCutOff: Look for the "INTENDED FCL CY CUT-OFF" label and extract the date and time value.
15
- vgmCutOff: Look for the "INTENDED VGM CUT-OFF" label and extract the date and time value.
16
- siCutOff: Look for the "INTENDED SI CUT-OFF" label and extract the date and time value.
17
- pickUpTerminal: Extract the pick-up terminal information, which can be found near the "EMPTY PICKUP LOCATION" label.
18
- transportLegs: This field should contain a list of two dictionaries. The first dictionary represents the first transport leg, starting with the initial "PORT OF LOADING" and ending with the "TRANSSHIPMENT PORT". The second dictionary represents the second transport leg, starting with the "TRANSSHIPMENT PORT" and ending with the "FINAL DESTINATION".
19
- eta: Within each transport leg, extract the estimated time of arrival (ETA) value, which is usually located near the "ETA" label. Eta should be a later date than etd! Ignore the first ETA label in the document that is on the line that starts with "INTENDED VESSEL/VOYAGE". For the first transport leg the correct eta is on the line that starts with "T/S". For the second leg the correct eta is on the line that starts with "FINAL DESTINATION".
20
- etd: Within each transport leg, extract the estimated time of departure (ETD) value, which is usually located near the "ETD" label.
21
- portOfDischarge: Within the second transport leg, extract the port of discharge information, which can be found near the "PORT OF DISCHARGE" label.
22
- portOfLoading: Extract the port of loading information, which can be found near the "PORT OF LOADING" label.
23
- vesselName: Within each transport leg, extract the vessel name, which can be found near the labels "INTENDED VESSEL/VOYAGE" or "T/S INTENDED VESSEL/VOYAGE".
24
- voyage: Within each transport leg, extract the voyage number, which is usually located right after the vessel name.
16
+ <INSTRUCTIONS>
17
+ - Populate fields as defined in the response schema.
18
+ - Use the data field description to understand the context of the data.
19
+
20
+ - bookingNumber: Extract the booking number. This information can be found at the top section of the document".
21
+
22
+ - gateInTerminalCode: The specific terminal where cargo is gated in. It can be called as FULL RETURN LOCATION. This sometimes can be the same as portOfLoading of the First transportLeg.
23
+ - gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
24
+ - pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
25
+ - pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
26
+
27
+ - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
28
+ - eta: The estimated time of arrival for a specific leg.
29
+ - etd: The estimated time of departure for a specific leg.
30
+ - imoNumber: The International Maritime Organization number for a specific leg.
31
+ - portOfDischarge: The port where cargo is unloaded for a specific leg.
32
+ - portOfLoading: The port where cargo is loaded for a specific leg.
33
+ - vesselName: The name of the vessel for a specific leg. It can be found as INTENDED VESSEL.
34
+ - voyage: The journey or route taken by the vessel for a specific leg. It can be found as VOYAGE.
35
+
36
+ IMPORTANT explanation for the transportLegs part as follows:
37
+ - There is at least one leg in each document.
38
+ - 'ETA' must be equal or later than 'ETD'!
39
+ - first leg's ETA is always after the first leg's ETD in the document.
40
+ - Multiple legs are possible. When there are multiple legs,
41
+ - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
42
+ - "TRANSHIPMENT PORT" indicates the presence of a second leg.
43
+ - Transhipment Handling: Treat any mentioned "TRANSHIPMENT PORT" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
44
+ - The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
45
+ - TRANSHIPMENT PORT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
46
+ - TRANSHIPMENT PORT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
47
+ - Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
48
+ - Make sure the ETA and ETD values are extracted from the correct lines as per the above instructions.
49
+ <INSTRUCTIONS>
@@ -19,12 +19,12 @@
19
19
  "gateInTerminalCode": {
20
20
  "type": "STRING",
21
21
  "nullable": true,
22
- "description": "The specific terminal where cargo is gated in especially Export terminal delivery address"
22
+ "description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Cargo Delivery At, Delivery Terminal, Full Return CY, eyc.."
23
23
  },
24
24
  "serviceCode": {
25
25
  "type": "STRING",
26
26
  "nullable": true,
27
- "description": "The Shipping service code associated with the booking confirmation."
27
+ "description": "The Shipping service code associated with the booking confirmation. It is often referred to as 'Service Code'"
28
28
  },
29
29
  "performaDate": {
30
30
  "type": "STRING",
@@ -39,12 +39,12 @@
39
39
  "cyCutOff": {
40
40
  "type": "STRING",
41
41
  "nullable": true,
42
- "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
42
+ "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys CARGO CUT OFF DATE/TIME, FCL delivery cut-off, CARGO CUT-OFF (Terminal Facility), CY CUT OFF, Terminal Cut-Off, Port Cut-off Date/Time."
43
43
  },
44
44
  "gateInReference": {
45
45
  "type": "STRING",
46
46
  "nullable": true,
47
- "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be 'Our Reference'."
47
+ "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be load ref., Turn-in reference, or if nothing mentioned, it is booking Number."
48
48
  },
49
49
  "mblNumber": {
50
50
  "type": "STRING",
@@ -54,17 +54,17 @@
54
54
  "pickUpReference": {
55
55
  "type": "STRING",
56
56
  "nullable": true,
57
- "description": "A reference code for cargo pickup during the import shipment. Sometimes it can be 'Our Reference'"
57
+ "description": "A reference code for cargo pickup during the import shipment. Sometimes it can be Pick-up reference, Our Reference or Booking Number."
58
58
  },
59
59
  "siCutOff": {
60
60
  "type": "STRING",
61
61
  "nullable": true,
62
- "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
62
+ "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys SI DEADLINE, SI DUE, SI CUT OFF, SI General CUT OFF, B/L INSTRUCTION DEADLINE, Closing B/L Date."
63
63
  },
64
64
  "vgmCutOff": {
65
65
  "type": "STRING",
66
66
  "nullable": true,
67
- "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
67
+ "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys VGM DEADLINE, VGM DUE, VGM CUT OFF, Doc Cut Off Date/Time, Closing VGM Date."
68
68
  },
69
69
  "containers": {
70
70
  "type": "ARRAY",
@@ -79,7 +79,7 @@
79
79
  "pickUpDepotCode": {
80
80
  "type": "STRING",
81
81
  "nullable": true,
82
- "description": "The depot code where the empty container will be picked up."
82
+ "description": "The depot code where the empty container will be picked up. It can be referred as EMPTY PICK UP AT, Pick Up Depot, Empty Container Pickup Location, Empty Pick Up Location, Pick Up Preff Depot."
83
83
  },
84
84
  "dropOffDepotCode": {
85
85
  "type": "STRING",
@@ -127,12 +127,12 @@
127
127
  "vesselName": {
128
128
  "type": "STRING",
129
129
  "nullable": true,
130
- "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE"
130
+ "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE. Need to extract the name only, excluding the voyage number. E.g., 'Maersk Alabama' from 'Maersk Alabama 123E"
131
131
  },
132
132
  "voyage": {
133
133
  "type": "STRING",
134
134
  "nullable": true,
135
- "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE"
135
+ "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE. Need to extract the voyage number only, excluding the vessel name. E.g., '123E' from 'Maersk Alabama 123E'"
136
136
  }
137
137
  }
138
138
  },
@@ -153,7 +153,7 @@
153
153
  "carrierName": {
154
154
  "type": "STRING",
155
155
  "nullable": true,
156
- "description": "The name of the carrier who issued the document."
156
+ "description": "The name of the carrier who issued the document. E.g,, Maersk, MSC, CMA CGM, Hapag-Lloyd, ONE, Evergreen etc."
157
157
  }
158
158
  },
159
159
  "required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
@@ -18,40 +18,64 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
18
18
  - Populate fields as defined in the response schema.
19
19
  - Use the data field description to understand the context of the data.
20
20
 
21
- - gateInTerminal: The specific terminal where cargo is gated in. It can be found as Export terminal delivery address, PORT OF LOADING (after the slash '/').
21
+ - gateInTerminal: The specific terminal where cargo is gated in. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Delivery Terminal, Full Return CY, Cargo Delivery At, etc... Sometimes, it might be same as PORT OF LOADING (after the slash '/').
22
22
  - gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
23
23
  - pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
24
24
  - pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
25
25
 
26
- - cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be referred to as FCL delivery cut-off, CY CUT OFF, CY Closing - Latest Return Container Date, Cargo Cut-off deadline
27
- - siCutOff: The deadline for submitting shipping instructions. It can be referred to as Shipping Instruction closing, SI Cut Off, Shipping Instruction deadline, INTENDED SI CUT-OFF
26
+ - cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be referred to as CARGO CUT OFF DATE/TIME, CARGO CUT-OFF (Terminal Facility), Terminal Cut-Off, Port Cut-off Date/Time, FCL delivery cut-off, CY CUT OFF, CY Closing - Latest Return Container Date, Cargo Cut-off deadline
27
+ - siCutOff: The deadline for submitting shipping instructions. It can be referred to as Shipping Instruction closing, SI Cut Off, Shipping Instruction deadline, INTENDED SI CUT-OFF, SI DEADLINE, SI DUE, SI General CUT OFF, B/L INSTRUCTION DEADLINE, Closing B/L Date.
28
28
  - vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo. It can be referred to as VGM cut-off, VGM Submission Deadline, Verified Gross Mass deadline
29
29
 
30
30
  - carrierName and carrierAddress:
31
31
  - Extract the name and address of the carrier who is the main parent company in the document.
32
+ - Example:
33
+ - "Hapag-Lloyd", "MSC", "CMA CGM", "ONE", "COSCO SHIPPING", "Evergreen", "Yang Ming", "ZIM", "PIL", "HMM" etc... for carrierName
34
+ - Hamburg, Germany, Poland, Italy, Vietnam, China etc... for carrierAddress
35
+
36
+ - Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
37
+ - containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
38
+ - pickupDepotCode: The code of the depot where the empty container is picked up. It can be referred as EMPTY PICK UP AT, Pick Up Depot, Empty Container Pickup Location, Empty Pick Up Location, Pick Up Preff Depot."
39
+ - dropOffDepotCode: The code of the depot where the empty container is dropped off. It can be referred as EMPTY RETURN TO, Empty Container Drop Off Location, Empty Return Location, Drop Off Preff Depot.
32
40
 
33
41
  - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
34
42
  - eta: The estimated time of arrival for a specific leg.
35
- - etd: The estimated time of departure for a specific leg.
43
+ - etd: The estimated time of departure for a specific leg. E,g. "EST. TIME OF ARRIVAL/DEPARTURE", Sailing Date ETS.
36
44
  - imoNumber: The International Maritime Organization number for a specific leg.
37
45
  - portOfDischarge: The port where cargo is unloaded for a specific leg.
38
46
  - portOfLoading: The port where cargo is loaded for a specific leg.
39
47
  - vesselName: The name of the vessel for a specific leg.
40
48
  - voyage: The journey or route taken by the vessel for a specific leg.
41
49
 
42
- - Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
43
- - containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
44
- - pickupDepotCode: The code of the depot where the empty container is picked up.
45
- - dropOffDepotCode: The code of the depot where the empty container is dropped off.
46
-
47
50
  IMPORTANT explanation for the transportLegs part as follows:
48
51
  - There is at least one leg in each document.
49
52
  - 'eta' must be equal or later than 'etd'!
50
53
  - Multiple legs are possible. When there are multiple legs,
51
54
  - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
52
- - The Connectivity Rule: For any sequence of legs, the Destination (Port of Discharge) of the previous leg must match the Origin (Port of Loading) of the following leg.
53
- - Transhipment Handling: Treat any mentioned "Transhipment Port" as the bridge between two legs (Discharge for Leg A / Loading for Leg B).
55
+ - "PORT OF TRANSHIPMENT N1", "T/S PORT OF LOADING", "TRANSHIPMENT PORT", "Transhipment", indicates the presence of a multi-leg journey. Sometimes, Having POD of the first leg and POL of the second leg indicates a multi-leg journey as well.
56
+ - "PORT OF TRANSHIPMENT N1" indicates the presence of a second leg. and "PORT OF TRANSHIPMENT N2" indicates the presence of a third leg.
57
+ - Transhipment Handling: Treat any mentioned "PORT OF TRANSHIPMENT N1", "T/S PORT OF LOADING", "TRANSHIPMENT PORT", "Transhipment" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
58
+ - The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
59
+ - PORT OF TRANSHIPMENT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
60
+ - PORT OF TRANSHIPMENT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
54
61
  - Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
55
- - Naming Convention: Look for Port Names followed by abbreviations in parentheses, e.g., "Port Name (ABCDE)".
62
+ - During the multi-leg, ETA of the first leg is the ETD of the second leg at the transhipment port.
63
+ - If Transhipment Date is empty therefore you may keep ETA of the first leg and ETD of the second leg as null if there is a transhipment.
64
+
65
+
66
+ Structure of Multiple Leg Sequence & Mapping
67
+ Leg 1 (Initial):
68
+ - `portOfLoading`: PLACE OF LOADING.
69
+ - `portOfDischarge`: PORT OF TRANSHIPMENT (if exists), otherwise PORT OF DISCHARGE or Destination.
70
+ - `vesselName`: VESSEL NAME (ignore parentheses).
71
+ - `etd`: EST. TIME OF DEPARTURE from PLACE OF LOADING.
72
+ - `eta`: Transhipment Date or ETA at TRANSHIPMENT (if exists), otherwise keep it null in case of multi-legs. Else, DISCHARGE Date for single leg.
73
+
74
+ Leg 2 (Intermediate): Trigger: Only if PORT OF TRANSHIPMENT N1 exists.
75
+ - `portOfLoading`: PORT OF TRANSHIPMENT or POD of Leg 1
76
+ - `portOfDischarge`: PORT OF TRANSHIPMENT N2 (if exists), otherwise PORT OF DISCHARGE.
77
+ - `vesselName`: CONNECTING VESSEL.
78
+ - `etd`: Transhipment Date or ETD at TRANSHIPMENT (if exists), otherwise keep it null in case of multi-legs. Sometimes, it can be same as ETA of Leg 1.
79
+ - `eta`: ETA at PORT OF TRANSHIPMENT N2 (if exists), otherwise DISCHARGE Date.
56
80
 
57
81
  <INSTRUCTIONS>
@@ -4,12 +4,12 @@
4
4
  "bookingNumber": {
5
5
  "type": "STRING",
6
6
  "nullable": true,
7
- "description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking No.', 'Booking Ref.', 'Booking Reference', 'Booking ID', 'carrier's reference' or 'Order Ref'."
7
+ "description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking No.', or 'Booking Reference'."
8
8
  },
9
9
  "contractNumber": {
10
10
  "type": "STRING",
11
11
  "nullable": true,
12
- "description": "It's a contract number between the carrier and Forto Logistics SE & Co KG."
12
+ "description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It is mentioned as SVC-NBR"
13
13
  },
14
14
  "pickUpTerminalCode": {
15
15
  "type": "STRING",
@@ -19,7 +19,7 @@
19
19
  "gateInTerminalCode": {
20
20
  "type": "STRING",
21
21
  "nullable": true,
22
- "description": "The specific terminal where cargo is gated in especially Export terminal delivery address"
22
+ "description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It is mentioned as Delivery Terminal."
23
23
  },
24
24
  "serviceCode": {
25
25
  "type": "STRING",
@@ -39,12 +39,12 @@
39
39
  "cyCutOff": {
40
40
  "type": "STRING",
41
41
  "nullable": true,
42
- "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
42
+ "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys Cargo Cut Off."
43
43
  },
44
44
  "gateInReference": {
45
45
  "type": "STRING",
46
46
  "nullable": true,
47
- "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be 'Our Reference'."
47
+ "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. It can be Turn-in reference or booking Number."
48
48
  },
49
49
  "mblNumber": {
50
50
  "type": "STRING",
@@ -59,12 +59,12 @@
59
59
  "siCutOff": {
60
60
  "type": "STRING",
61
61
  "nullable": true,
62
- "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
62
+ "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys Closing Date B/L."
63
63
  },
64
64
  "vgmCutOff": {
65
65
  "type": "STRING",
66
66
  "nullable": true,
67
- "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
67
+ "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys Closing Date VGM."
68
68
  },
69
69
  "containers": {
70
70
  "type": "ARRAY",
@@ -79,7 +79,7 @@
79
79
  "pickUpDepotCode": {
80
80
  "type": "STRING",
81
81
  "nullable": true,
82
- "description": "The depot code where the empty container will be picked up."
82
+ "description": "The depot code where the empty container will be picked up. Key to find is 'Pick Up Depot'."
83
83
  },
84
84
  "dropOffDepotCode": {
85
85
  "type": "STRING",
@@ -117,22 +117,22 @@
117
117
  "portOfDischarge": {
118
118
  "type": "STRING",
119
119
  "nullable": true,
120
- "description": "The port where the goods are discharged from the vessel. This is the destination port for the shipment."
120
+ "description": "The port where the goods are discharged from the vessel. This is the destination port for the shipment. It is referred as Discharge"
121
121
  },
122
122
  "portOfLoading": {
123
123
  "type": "STRING",
124
124
  "nullable": true,
125
- "description": "The port where the goods are loaded onto the vessel. This is the origin port for the shipment."
125
+ "description": "The port where the goods are loaded onto the vessel. This is the origin port for the shipment. It is referred as Sailing"
126
126
  },
127
127
  "vesselName": {
128
128
  "type": "STRING",
129
129
  "nullable": true,
130
- "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE"
130
+ "description": "The name of the vessel carrying the shipment. It can be found at VESSEL/VOYAGE e,.g. 'MAERSK LINE"
131
131
  },
132
132
  "voyage": {
133
133
  "type": "STRING",
134
134
  "nullable": true,
135
- "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE"
135
+ "description": "The journey or route taken by the vessel for a specific leg. It can be found at VESSEL/VOYAGE e.g. '123W'"
136
136
  }
137
137
  }
138
138
  },