Supply Lens

Set up Costco

Lesson 26 of 30 6 min read

Collect Costco order files from an SFTP folder, choose which files count, and import every order against one customer and Location.

Costco orders don't come from an API. They arrive as files on an SFTP server, a secure file transfer site, and Supply Lens collects them on each run. That makes the Costco Configuration less about statuses and more about files: where they are, which ones to read, how to read them and whether to tidy up afterwards.

By the end of this lesson you'll be able to configure the Costco SFTP Order Configuration and avoid the two classic file problems: files read twice, and files never read.

How the flow works

Rendering diagram...

Where and which files

directoryThe folder on the Costco SFTP server that order files are read from.
fileRegexA regular expression that file names must match. Only matching files are downloaded and processed as orders.
contentTypeThe type of the files, which tells the parser how to read them, for example CSV or fixed-width.

A regular expression is a pattern for matching text. Use it to pick out order files and ignore anything else in the folder, such as acknowledgements or readme files. Ask Costco or the customer for the file naming convention before writing it.

After download

deleteFilesAfterDownloadDefault true. Files are deleted from the SFTP server once downloaded successfully. When off, they stay on the server.

Turning off deletion

With deletion off, processed files stay in the folder. The guide doesn't say how Supply Lens avoids reading them again, so confirm with Support before turning it off.

Customer and Location

defaultCustomerIdThe Party assigned to every Costco order. Always required for this Integration.
defaultFulfillmentLocationIdThe Location assigned to every Costco order.

Because every order belongs to Costco, the default customer isn't a fallback here; it's the customer on every order.

Brightwater Drinks supplies Costco

Brightwater Drinks starts supplying Costco. Costco drops order files into a folder called /outbound/orders, alongside summary files.

  • directory is /outbound/orders.
  • fileRegex matches only the order file naming pattern Costco supplied, so summary files are ignored.
  • contentType matches the file format in Costco's specification.
  • deleteFilesAfterDownload stays on.
  • defaultCustomerId is the "Costco" Party; defaultFulfillmentLocationId is the main warehouse.

Recap

  • Costco orders arrive as files on an SFTP server.
  • directory, fileRegex and contentType say where the files are, which to read and how.
  • Files are deleted after download by default.
  • Every order is assigned to the required default customer and the default Location.
Complete and take the quiz

Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.