Attach BoxTop documents
Uploads files to a job in Descartes BoxTop, one request per file.
@lainstack/boxtop/attach-documents · TMS · Available on Lainstack Cloud
How to use it
Section titled “How to use it”Use Attach BoxTop documents to upload files to a job in Descartes BoxTop, for example an invoice and its certificates. It sends one request per file, in the order of Files.
Good to know:
- Files takes up to 32 files of up to 10 MB each. BoxTop publishes no limit of its own and may refuse smaller files. Each request has 25 seconds to finish, and no new file starts after 4 minutes, so a long list leaves on Failed saying which files didn’t fit rather than hitting the platform’s limit.
- Each file’s name is sent as its file name and title. Comment is saved with every file. BoxTop stores a document against the job and account together, so set Account number when you have it.
- The block leaves on Attached when BoxTop accepts every file, with their names in attached.
- The block leaves on Failed at the first file that cannot be attached, and sends no more. Files already accepted stay on the job and are listed in attached. failedFile, status and message say what stopped it, and never quote BoxTop’s reply.
- A file with no name, or one known to be over the limit, stops the block before anything is sent.
- Running a step again: a step never repeats by itself, but a person or a resume can run it again. It starts from the first file and can add files twice. A server error or timeout says the file may have landed, so check the job first.
- Draft runs: a draft run holds this block and shows the job and file names as Would write. No file is read or sent. With no pin and no earlier real run, the branch goes on through Attached with those names and sample true, or through Failed for a file a real run would refuse up front.
- Sample data: a Sample data connection reads and checks the files, then sends nothing. sample is true.
- Not checked against real BoxTop: we have only its public docs, from about 2014. How the key is sent, base64 file content and repeated names are unconfirmed.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| BoxTop connection (required) | credentialId |
Connection | Use a Sample data connection until you have a BoxTop key. At most 160 characters. |
| Job number (required) | jobNumber |
Text | The BoxTop job, up to 12 characters. Find or create BoxTop job returns it. |
| Account number | accountNumber |
Text | The customer’s BoxTop account, up to 8 characters. BoxTop stores a document against the job and account together. Its docs don’t say what happens without one. |
| Files (required) | files |
Value | Up to 32 files of up to 10 MB each, attached in this order. |
| Comment | comment |
Text | Saved with every file. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Attached | attached |
List |
| Failed File | failedFile |
Text |
| Status | status |
Number |
| Message | message |
Text |
| Sample | sample |
Yes or no |
| Exit | Port | Notes |
|---|---|---|
| Attached | out |
|
| Failed | failed |
Failure exit. |