Attachments and related documents
Many mailings carry more than the report: terms and conditions, a packing list, a signed page. Attachments are set up on the document rule, so every document of that kind carries them, and they can be merged into one file before they are sent.
Before you start
- The files that should be attached must be available, as document attachments on the document or as files the app can read.
- The rule must exist and name its report.
- You need the permission set QUADO All.
Select attachments and merge them
A rule can name several attachments. When the document is mailed, the app collects them and, if you want, merges them into one PDF.
- Open QUADO Document Rules and select the rule ADATUM-FINV.
- In Filename, enter the name the mailed file gets, here ADATUM.
- Open the attachments of the rule and choose Add Attachment for each file.
- Give each attachment its Attachment Type and its Filename.
- Choose Merge PDF Attachments, so the report and the attachments become one file.
- Choose Save.

Fix a duplicate attachment filename
Every attachment of a mailing needs its own file name. Two attachments with the same name cannot be told apart, and the app refuses the second one.
- Open QUADO Attachment Selection.
- Choose Add Attachment and give the file the name ADATUM.
- Choose Save.
- Choose Add Attachment again and give the second file the same name, ADATUM.
- The app refuses with a message that the name is a duplicate.
- Change the second name, for example to ADATUM-TERMS, and choose Save.

Use attachment type variants
An attachment type says when a file is added. A regular attachment goes with every mailing, a batch line attachment with its line, and a PDF settings attachment carries the settings of the PDF.
- Open QUADO Attachment Selection and choose Add Attachment.
- In Attachment Type, choose Regular, and in Filename enter ADATUM-TERMS.
- Choose Add Attachment again, choose Batch Line, and enter ADATUM-PACKING.
- Choose Add Attachment again, choose PDF Settings, and enter ADATUM-PDF.
- Choose Save; the three rows stay in the list with their types.

Order the files before merging the PDFs
When several PDFs are merged, their order is the order of the rows. Put the report first and the terms last.
- Open QUADO Merge PDF Attachments for the rule.
- Choose Add Attachment and add the first file, ADATUM-INVOICE.
- Choose Add Attachment and add the second file, ADATUM-TERMS.
- Use Move Down or Move Up until the order is right.
- Choose Merge Files; the merged file keeps the order of the rows.

Add, look at and delete an attachment
An attachment can be added to a batch line, looked at, and removed again as long as the batch has not gone out.
- Open the batch line that carries the attachment, here STMT-116.
- Choose Add Attachment, give the file the name ADATUM-PRICE, and choose Save.
- Choose Open to look at the attachment.
- Choose Delete Attachment when the file should not be sent.
- The app confirms that the attachment was deleted, and it is no longer in the list.

Example
The invoice mailing of Contoso Ltd. carries the terms of payment. The accountant opens the rule ADATUM-FINV, sets Filename to ADATUM, and adds the file ADATUM-TERMS with the attachment type Regular. She adds the price list ADATUM-PRICE as a Batch Line attachment, chooses Merge PDF Attachments, and saves. Every invoice for Adatum Corporation now leaves as one PDF with the terms at its end.
What happens
The app collects the attachments of the rule and of the line when the document is mailed. It merges them in the order of the rows when merging is switched on, and it refuses a second attachment with a name that is already used. An attachment that has been deleted is no longer sent, but the history keeps the line.
If something goes wrong
- The second attachment is refused. Its name is already used in this mailing. Give it a name of its own.
- The merged file has the wrong order. The rows are in the wrong order. Move the rows before you merge.
- The attachment is not in the mail. Its attachment type does not apply to this mailing. Check the type on the row.
- An attachment cannot be deleted. The batch has already gone out. The history keeps it; add the correction to a new mailing.
