The SequentialFile transport imports files in a strict sequence. It is used when every file from a partner must be received and processed in order, and processing should stop if a file is missing or arrives out of sequence.
The transport monitors an input folder and its subfolders. When it runs, it reads every file in the folder, sorts the files by the sequence number in the filename, and pulls each file.
After a file is imported and processed successfully, the transport deletes the file from the input folder. If the next expected sequence number is missing, or if a filename does not contain a valid sequence number, the transport stops and leaves the remaining files in the folder for investigation.
Open the incoming delivery type detail for the relevant partner or service provider and select `Incoming Sequential File`.
Enter these settings:
Action: `SEQUENTIAL`
Input Folder: The folder path that the transport will monitor, for example `D:\EDI\Inbound\PartnerA` or a UNC path such as `\\server\share\PartnerA`
Sequence Number Location: `filename`
Sequence Number Filename Start Index: The zero-based character position where the sequence number starts in the filename
Sequence Number Length: The number of digits in the sequence number
Max Sequence Number: Optional. Leave blank to use the highest value allowed by the sequence length, for example `999999` for a length of `6`
Only `filename` is currently supported for `Sequence Number Location`.
For a file named:
ORD_000123.xml
Use:
Sequence Number Filename Start Index: `4`
Sequence Number Length: `6`
The first character in the filename is position `0`, so the sequence number `000123` starts at position `4`.
The transport stores the last successfully processed sequence number for the partner. The next run expects the next number in the sequence.
For example, if the last processed file was `ORD_000123.xml`, the next expected file is `ORD_000124.xml`. If the transport finds `ORD_000125.xml` before `ORD_000124.xml`, it fails the run so the missing file can be supplied before processing continues.
If no previous sequence has been stored for the partner, the first expected sequence number is `1`. If your first file will use a different sequence number, ask Sandfield support to seed the current sequence to one less than the first file number before the transport starts.
When the current sequence number reaches `Max Sequence Number`, the next expected sequence number wraps back to `1`.
Use these rules when placing files in the input folder:
Put only files that should be imported by this transport in the folder.
Use a fixed-width, zero-padded sequence number in every filename, for example `000001`, `000002`, `000003`.
Do not reuse sequence numbers.
Do not skip sequence numbers unless Sandfield support has confirmed the sequence can be advanced.
Make sure files are fully written before they appear in the input folder. If possible, write files to a temporary location first and then move them into the input folder.
Do not manually delete files from the input folder unless Sandfield support asks you to.
The transport reports an invalid sequence number:
The next file in the folder is not the number the transport expected. Add the missing file, remove the incorrect file, or ask Sandfield support to adjust the stored sequence.
The transport reports an error parsing the sequence number:
The filename does not contain numeric digits at the configured start index and length. Rename the file or update the transport settings.
Files stay in the input folder:
The transport stopped before processing them, or the schedule has not run yet. Check the EDI Portal message/transport logs and confirm the schedule is running.
A file was imported but disappeared from the folder:
This is expected after successful processing. Check the message archive or processing history in EDI Portal.