Best Practice for Linking Uploaded PDFs (Agreements, Vehicle RCs, etc.) to Lot Objects in Foundry

Hey everyone,

We’re working on a data pipeline where information comes in lots. Each lot contains multiple related documents — like agreements, vehicle RCs, and other PDFs. We’ve created a Lot object to represent each batch of data, and we have separate objects for the document metadata (agreements, vehicles, RC info, etc.).

The part I’m not totally clear on:
We’re uploading the actual PDFs through the Media Uploader widget in Foundry. What’s the best way to associate each uploaded PDF with its corresponding Lot?

My initial thought was to:

  • Create a Lot object,

  • Link or reference all other objects (agreements, vehicle RCs, etc.) under that Lot,

  • But I’m not sure how to cleanly assign those uploaded PDFs to the correct Lot — especially since uploads happen independently via the widget.

Is there a recommended pattern for this in Foundry? Maybe a way to capture the Lot reference during the upload or through a pipeline that auto-links files post-upload?

Any tips or examples from folks who’ve handled similar “batched document ingestion” setups would be awesome.

Thanks!


Hey! Looks like you could use Media Uploader’s “On upload” Action trigger to automatically link PDFs to the active Lot. You can then capture the Lot context via a Workshop variable and pass it into the Action alongside the file reference.

Here’s the pattern:

  1. Lot Selector sets currentLot variable

  2. Media Uploader widget uploads to your media set

  3. On upload, Action receives:

    • File reference (from uploader output)

    • Current Lot (from currentLot variable)

  4. Action creates a Document object (Agreement, Vehicle RC, etc.) and links it to the Lot

Workshop wiring:

Lot Selector (sets currentLot)
  → Media Uploader (destination: media set)
    → On upload Action (file ref + currentLot)
      → Creates Document + links to Lot

A few things to know:

  • Media Uploader outputs a media reference (media sets), filename (datasets), or RID (Compass folders)

  • Configure the Action to accept both file identifier and Lot as parameters. File identifier is available as a special parameter in the “On upload” trigger config.

  • Multiple uploads fire the Action per file with each linked to the same active Lot.

For bulk/pipeline uploads:

Encode the Lot ID in the upload path (e.g., lot-123/agreement.pdf). Then, you can write a transform that parses the path, extracts the Lot reference, and auto-links the metadata objects.

Docs: Media Uploader widget — upload destination, file identifier output, on-upload Action trigger