Skip to content

Add BoxTop shipping invoice

Adds a commercial invoice and its lines to a job in Descartes BoxTop.

@lainstack/boxtop/add-shipping-invoice · TMS · Available on Lainstack Cloud

Use Add BoxTop shipping invoice to add a commercial invoice and its lines to a job in Descartes BoxTop, such as the job Find or create BoxTop job returned.

Good to know:

  • Lines takes a list from an earlier step, up to 500 lines. A line can have a part number, description, quantity, unit price, line total, currency, net and gross weight, HS code and origin. Any can be left out. A line with none of them fails the step and names its position. Other fields aren’t sent, and ignoredLineFields lists them.
  • Invoice date is YYYY-MM-DD. Anything else fails the step, in a draft too. Wired from an earlier step, it must be a date source: publish refuses plain text.
  • BoxTop’s API shows no duplicate check, and this block doesn’t look for an existing invoice. Every send can add an invoice, even with the same number.
  • recordId is the record BoxTop made. Its docs say the answer holds one but not in what form, so it can be empty when the invoice was added.
  • If BoxTop refuses the invoice, the step fails with the HTTP status it answered and never its reply. A rate limit, server error or timeout fails the step and says the invoice may have landed.
  • Running a step again: a step never repeats by itself, but a person or a resume can run it again. That can add a second invoice, so check the job in BoxTop first.
  • Draft runs: a draft run holds this block and shows the invoice and its lines as Would write. Nothing is sent. With no pin and no earlier real run, the branch goes on with your Invoice number, an empty recordId, and sample true.
  • Sample data: a Sample data connection sends nothing and answers with your Invoice number, an empty recordId, and sample true.
  • Not checked against real BoxTop: this block has only run against the public docs, which date from about 2014. How the key is sent, the answer’s format, how a repeated invoice number is treated, and how a line’s total is treated are unconfirmed.
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.
Invoice number (required) invoiceNumber Text
Invoice date invoiceDate Date Written as YYYY-MM-DD.
Currency currency Text
Total total Number
Terms terms Text
Lines (required) lines Value Up to 500 invoice lines, usually a list from an earlier step. Any field of a line can be left out.
Output Path Type
Invoice Number invoiceNumber Text
Record Id recordId Text
Ignored Line Fields ignoredLineFields List
Sample sample Yes or no

Last updated: