1. To add attributes to a document template, click here
2. Click "Document Templates"
3. Edit a document template
4. Click "Search Variables"
5. Type "Attribute" in the search to list the variables. Note that the attribute name is put between "{ItemAttribute" and the display type (i.e. Value, Label).
6. Click "Close Tags List"
7. Add the variables to the document
8. Click "Step 1: Preview"
9. Note how it appears only for the item with that attribute and not for the other. Click "Save"