Customize Sample Smart Document Templates
Review, copy, and customize sample Smart Document code for common use cases.
Is This What I'm Looking For
Use this article when you want a starting point for building a Smart Document. Each example below includes the template code and, where applicable, the script that powers it. This article does not walk through creating a Smart Document from scratch or explain every available merge field.
Smart Documents are optional — most core InfoPlus workflows, like receiving, don't require a physical document to complete the task. Use one when your team or your customers need a printed or downloadable version of that data for a reason the app itself doesn't cover: a paper reference on the floor, a formal record for accounting, or a document a customer expects in hand.
Before You Begin
- Smart Document Templates are created and edited in the InfoPlus desktop web application, through the Smart Document Template table.
- You'll need permission to view and edit Smart Document Templates. See View / Edit Role Permissions.
- Not sure how to build a Smart Document Template from scratch? Start with How to Create and Use Smart Document Templates.
- Have your own company branding, contact information, and any custom field names ready to swap in, since the samples below use placeholder or sample data.
Sample Smart Documents
ASN Smart Document
This example generates a document from an Advance Shipping Notice (ASN), including vendor and warehouse details, line-item quantities, cases, pallets, and extended cost.
Paper documentation isn't required to begin receiving — the mobile receiving app supports searching by SKU, PO, vendor, and custom fields. A Smart Document still helps when:
- Dock staff want a physical checklist to work from and cross-reference against a vendor's packing slip, especially during a receiving rush
- Not every workstation on the floor has mobile device access
This example requires both the Smart Document Source Code and the Script below. The source code alone will not populate vendor, warehouse, quantity, or cost data. Copy and paste both into their respective tables, making any logo and hard-coded value updates as needed.
Example ASN Smart Document
/ExASNSmartDoc.png?width=547&height=360&name=ExASNSmartDoc.png)
Smart Document Template Source Code
ASN Smart Document Script
The Script runs first and looks up the vendor and warehouse records. Then it builds totalQty, totalCost, and itemMap — the values the template references as $scriptOutput.vendor, $scriptOutput.warehouse, $scriptOutput.totalQty, $scriptOutput.totalCost, and $scriptOutput.itemMap.
3PL Billing Invoice Worksheet
This example generates an invoice from a billing worksheet, including bill-to and remit-to addresses, line-item charges, and a total.
Billing data lives in InfoPlus regardless, but a Smart Document still helps when:
- Your accounting team needs a formal, shareable invoice document for accounts payable or recordkeeping
- You bill 3PL customers directly and need a polished, branded document to send them, rather than raw data from the app
This example does not use a separate script. Copy and paste the source code below on its own — all values are pulled directly through $record merge fields.
Example 3PL Billing Invoice Worksheet

Smart Document Source Code
Fulfillment Process - Append Order Files
This example generates an order summary and return form, appended as a file to a fulfillment process. It includes an order summary table, a return copy with barcodes, and return instructions.
This Smart Document utilizes standard Fulfillment Process fields coupled with a Smart Document script in order to pull files from orders within the smart document and append them to the Smart Document. This basis can be used to retrieve any order files.
This one leans more necessary than optional, since the output goes to the end customer, not your own team:
- Customers expect a physical return form and label in the box, since they don't have access to the InfoPlus app to initiate a return themselves
- A packing slip or order summary gives the customer a paper reference for what shipped, independent of any confirmation email
This example requires both the source code and the script below. The source code alone will not populate the logo, order date, customer order number, or return label. Copy and paste both into their respective fields on the Smart Document Template.
Smart Document Source Code
Smart Document Script
Next Steps
- If you need to write the script that feeds data into a Smart Document, see Introduction to InfoPlus Scripts.
- If you need a Smart Document that runs per sub-record (like each order in a fulfillment process), see Create Smart Documents and Barcode Templates for sub-records.
- If you're attaching a Smart Document's output as a file to a fulfillment process, see Working with Files in the InfoPlus API.
- Want to customize date formatting in your template? See How to Change the Format of a Date in Custom Emails, Smart Documents, and Barcode Templates.
- Building on the 3PL Billing example? See 3PL Billing Script - Customize 3PL Billing Invoice Worksheets.
- Not sure how to build or customize a Smart Document like these on your own? Our Professional Services team is happy to discuss your needs.