Creating Document Templates
With NetSuite CPQ Proposal Generator, you can create templates to outline the document structure and store the content of your documents.
Before creating a template, you should create a draft to visualize the look and feel of the final document. Drafting the document helps you make decisions about the type, order, and frequency of groups and sections.
Regarding the document layout, you can define the header and footer. Additionally, you can customize the look and feel with CSS code, as well as set up various formatting options—including the page format.
Documents can be automatically generated from templates, and you can also export and import templates. For more information, see Automatically Creating Documents, Exporting Document Templates, and Importing Document Templates.
To create a template:
-
In NetSuite, go to CPQ > Proposal Generator> Templates.
-
Click New CPQP Template.
-
Provide a descriptive name for the template.
When users click the Proposal button on transactions, this name appears in the template list.
-
(Optional) In the Description field, enter a brief explanation of the template.
The description is for internal reference only and isn't displayed to users.
-
To define the page format for the final document, two options are available:
-
In the Format field, select a predefined page format, such as A3 or A5. If you leave this field blank, the default format is A4.
-
Check the Custom Size box. Then, provide the page height and width in millimeters.
-
-
In the Custom Styles field, enter CSS code to style the final document as you would in an external CSS file.
To identify CSS classes, create the document from the transaction and inspect the browser preview.
-
(Optional) In the Pages Without Padding field, specify any pages that shouldn't include margins.
Enter page numbers separated by commas.
-
Provide the content for the header and footer.
You can use the text editor or HTML and CSS code to format the text.
Note:The header and footer aren't included in the browser preview.
-
Provide the header and the footer height in pixels.
If you leave these fields blank, the default values are:
-
Header – 150 pixels.
-
Footer – 100 pixels.
-
-
The header and footer are displayed on every page of the final document. To hide them on the cover page, check the Hide header and footer on the first page box.
-
To automatically create documents when saving or editing a transaction:
-
Check the Automatically generate PDF box to create PDF files.
-
Check the Automatically generate DOCX box to create Microsoft® Word documents (DOCX files).
For more information, see Automatically Creating Documents.
-
-
Click Save.
To hide a template from the template list users see on the transaction, check the Disabled box on the template record.
Automatically Creating Documents
Documents can be automatically created or updated with the latest transaction data every time users save a transaction. To automatically create documents for eligible transactions, check the following boxes on the template record:
-
Automatically generate PDF box – Automatically creates PDF files.
-
Automatically generate DOCX box – Automatically creates Microsoft® Word files.
If you enable these options for multiple templates, you'll obtain multiple documents for the same transaction. Automatically created documents are stored in the Proposals folder at File Cabinet > SuiteScripts > CPQ.
After saving and editing the transaction, users can go to the Custom subtab to view and download documents from the list of links in the NS CPQ Auto-Generated Proposals field.
Exporting Document Templates
After creating templates, you may want to export them for various reasons. You can combine export and import options to move templates from your sandbox to your production account after testing. Through exporting, you can create duplicate templates in your current account and use them as a base for new templates. Exporting is also useful to create backup copies and restore templates if you run into any issues.
In the exported file, you can include additional resources, such as the appended PDF files. If these additional resources aren't available in the target account, make sure you check the Export resources box before exporting the template. However, if you export the template for testing purposes and you don't need additional resources, leave the box unchecked.
To export a document template:
-
Go to CPQ > Proposal Generator > Settings.
-
In the Export Proposal field, select a template.
-
(Optional) To export additional resources, check the Export resources box.
-
Click Export.
The template is saved as a ZIP file to your computer.
Importing Document Templates
After exporting a document template, you can import it back into the same account or into a different one. Imported templates may include references to files. These referenced files may need to be retrieved in the target account.
Before importing a document template, choose how to handle references to attached files in the NS Links Import Options field:
-
Don't import links – Leaves all fields that reference a file blank.
Choose this option when importing templates into a sandbox account for testing purposes and you don't need the referenced files.
-
Import links using same IDs – Assigns file references based on the file's internal ID. This is the default option.
Choose this option when importing templates within the same account to optimize the import process.
-
Import links using search by name – Finds the file internal ID by looking for the file name and place it in the link field.
Because files with the same name might have different internal IDs, choose this option when importing templates across different accounts.
To import a document template:
-
In NetSuite, go to CPQ > Proposal Generator > Settings.
-
In the Import Proposal field, select the ZIP file with the template.
-
In the NS Links Import Options field, select how to handle references to files when importing templates.
-
Click Import.