Multi-Document Envelopes in the Vault

Loyva supports envelopes that contain multiple documents. A contract, a disclosure, an addendum, and so on. When you vault that envelope, every document is preserved as its own Authoritative Copy and Copy.

How storage works

The completed envelope webhook stores all signed files in a JSONB signed_documents array on the envelope record. When you vault the envelope, each entry is processed in turn: each document gets its own Authoritative Copy (green) and Copy (blue).

Viewing in the vault

Open the vaulted envelope to see every document listed. Each one is labelled with its original filename and carries its own badge. You can switch between documents without leaving the envelope view.

Directory-scan fallback

Older envelopes (vaulted before multi-document storage was added) may not have a signed_documents JSONB entry. The vault automatically falls back to scanning the storage directory and rebuilds the list, so legacy envelopes still display correctly.

Note: All documents inside a vaulted envelope follow the same view / download / print rules. Authoritative Copies are view-only, Copies are downloadable.