Zip File Output

A Zip file output can gather up many other outputs into one single zip archive.This output is a convenient way to gather up multiple output documents into one file for easy sharing. 

For example, consider a quote workflow that generates a quote document as a PDF, a packing list as an Excel file, and a terms and conditions PDF document (as a reference to an existing file on a web site).  These 3 files could be made visible to the customer on the quote separately, but some customers may forget to retrieve all three files. Or share only two of them. By using the Zip File Output, you can gather up these files into one single zip archive, ensuring that the customer retrieves them all, and that they are stored and transferred in the most efficient manner. Your customer will be able to open the Zip file to see each file individually, in its own native format.


Note: if your goal is to gather up many separate PDF documents into a single larger file for read-only use by the customer, try the PDF Bundle output instead.   The PDF Bundle output is the best way to create a single read-only multi-page PDF file by combining together many Word, Excel, Image, or other outputs.


Zip File Section output fields can be added to specify the files to be included in the Zip archive. These files can be the outputs of a quote output, a configurator output (attained by tag), a media or template file, or an external URL. The Zip file is generated, containing the files noted in each output field compressed inside. If any of the referenced outputs does not exist, the builder will report the missing file in the output builder log and simply continue to build the rest of the Zip file without it.

ZIP Section Output Field Properties

 

Property Datatype Description
Name text The name of the field. Can be left as the default, but usually edited. Used for referring to this output field in Snap rules.
Source text

Options: "Output," "Nested Configurator," "Export," "Template," "Media," "Url," or "File Upload Field"


Field Naming Convention

Since the field names are never seen by your customer, use a naming format that is useful for your own interface design and Snap programming.  We've seen implementations with some of these suggestions, but none of the following formats are required for Epicor CPQ to work.

  • NameUsingCamelCase
  • Or_Name_With_Underlines (to help finding code faster).
  • Start the field name with one letter reminding you where the field came from. 
    For example, a Word output doc may have a field named "W_CoverLetter" and a SolidWorks diagram have a field "S_ExplodedView". This will help you debug problems when popular fields having the same name need to be in multiple documents, like "CustomerNumber"  or "LastName"

Conventions like these can make your Snap code easier to read and maintain.


Example

Consider the following configurator, with a Scene Render output, and a Word Document output called "Product Description".  By adding a third "Zip" output, we can add two zip output fields (one for each of the previous outputs) to create a new, third output: a zip file which contains the previous two outputs.

 

The first field includes the Output of the Scene Render (the first output in this example)

 

The second field includes the output of the Word Document (the second output in this example).

Note that Zip Outputs can be based on rules, like any other output.  In these rules you can programmatically set the name or source.  For example, the zip output field rule below will zip up the same two outputs as in the example above, but only when the configurator's warranty type requires these details.  Otherwise, no zip file will be created.

Was this article helpful?