Link Documents
Customer Documents can automatically link uploaded files to Magento entities (orders, invoices, shipments) based on filename patterns.
What “Linking” Means
Linking allows you to show related documents on:
- order view
- invoice view
- shipment view
Configuration
Configure under:
Stores >Configuration > MageB2B > Customer Documents > Link Documents
Settings:
- Enabled automatic link of documents
- Entity Patterns (pattern list)
- Show message when linked documents are empty
Pattern Syntax
Patterns use placeholders in curly braces, replaced with entity data.
Example (order PDF by increment id):
order-{increment_id}.pdfThe nightly process builds expected filenames from your configured patterns and links matching documents automatically.
Supported entity types in the core module:
orderinvoiceshipment
Additional entity types can be provided by compatible add-ons or custom integrations.
Cron
The linking process runs nightly:
link_customer_documents(daily 03:00)
See: Cron Jobs
Known Limitation
Depending on installed version/customization, the option "Show message when linked documents are empty" may behave inconsistently in some storefront contexts.
If you rely on this message for customer guidance, test it in your exact theme and checkout/account setup.
