Supply Lens

What the File Drop service does

Lesson 23 of 28 6 min read

Some partners can't be polled - they push files. Learn how the File Drop service accepts a file, hands it to the right Integration and turns it into a Document.

Most connectors in this course work by Supply Lens calling the warehouse's API on a schedule. Some partners work the other way: their system produces a file (a shipment confirmation, a stock report, an order) and needs somewhere to send it. The File Drop service is that somewhere.

By the end of this lesson you will be able to explain how File Drop works, what has to be in place before a partner can use it, and what a successful upload does and does not mean.

The idea

The File Drop service has one job: accept a file over HTTPS and keep it as source data for one of your Integrations. Supply Lens then converts the file into a Document automatically, using that Integration's configuration, exactly as if the Integration had fetched it.

Rendering diagram...

How Supply Lens picks the Integration

The partner does not name your Integration. It names an integration type (for example despatch-cloud, in lowercase) and your organisation id. Supply Lens finds the one enabled Integration of that type in that organisation.

Exactly one enabled Integration of the type

If the organisation has two or more enabled Integrations of the same type, File Drop rejects the file. Disabled or uninstalled Integrations are not counted.

What has to be in place

The partner needs five things, which your Supply Lens contact provides:

Client IDThe identifier of the partner's API client.
Client secretThe password of that API client. Keep it out of source control and email.
Organisation IDThe GUID (a long unique identifier) of your Supply Lens organisation.
Integration type IDThe lowercase identifier of the type of Integration, such as despatch-cloud. It identifies a type, not one Integration.
Document typeWhat the file contains, such as order or warehouse-shipment, from a fixed list.

And Supply Lens must:

  1. Enable the File Drop service for the integration type.
  2. Install one Integration of that type in your organisation.
  3. Enable that Integration.
  4. Configure that Integration to convert each Document type the partner will send.

File Drop does not check step 4

If the Integration cannot convert the Document type, File Drop still accepts the file, and the conversion then fails. A successful upload is not proof of a working setup.

What 201 Created means

A successful upload returns 201 Created, a Location header pointing at the file's source data page in the Supply Lens app, and an id. It means Supply Lens kept the file. It does not mean the conversion is complete or correct: you see that in the app, on the source data page and the resulting Document.

Sandpiper Gifts' warehouse pushes despatches

Sandpiper Gifts uses a small 3PL whose system cannot be polled but can send a file whenever an order is despatched. Supply Lens enables File Drop for the 3PL's integration type, installs and enables one Integration of that type in Sandpiper's organisation and configures it to convert warehouse-shipment files. The 3PL's developer receives the client id, secret, organisation id, integration type id and the document type to use. Each upload appears as source data on Sandpiper's Integration and becomes a Warehouse Shipment Document.

Recap

  • File Drop accepts a file over HTTPS and keeps it as source data for one Integration, which converts it into a Document.
  • The partner names an integration type and organisation; exactly one enabled Integration of that type must exist.
  • Supply Lens enables File Drop for the type and configures the Integration for each Document type.
  • 201 Created means the file was kept, not that it converted; check the result in the app.
Complete and continue

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