Document Generation Tips and Tricks

Listed below are the workarounds and methods of avoiding issues with document generation in SAP CPQ.

  • Do not change the color of the tags to white to make a document cleaner. The system pulls values of tags and it does not display the tags in the generated document, so you should not change the color of tags to white to hide them in the template.
  • Do not switch fonts in one tag.
  • Always use the same font for tags within one document.
  • Make sure to show paragraph marks and other hidden symbols in Microsoft Word by clicking in the toolbar. This will show all characters that may have been entered accidentally or while copying content and that will potentially cause errors in generating documents in SAP CPQ. Make sure to delete such characters.
  • Everything inside a C loop must be in the same font.
  • If all sections after the second section in a multi-section template inherit the formatting from the second section, and the Sections will inherit formatting (header,footer etc.) from the first section in the template options is off, select the Different Odd and Even checkbox in the word processing program.
  • Make sure to add a new line after each C2 tag (press ENTER on your keyboard).
  • If there are tables inside a C loop in the header, footer and the main part of the document, they all must have the same format (for example, they must have the same columns).
  • Use template versions when adding new tags in an existing template. When you create a template and properly generate a document, the next time you want to add new tags, create a new version of the document and make it active. This way, you make sure to always have a template version with tags that properly retrieve data. Also, if something is not properly retrieved in the new document, you limit the debugging only to the recently added tags.
  • Do not add table tags in conditions.
  • Do not add conditions into conditions.
  • Protected DOC and DOCX files cannot be uploaded into SAP CPQ.
  • If your template is not being properly generated, try adding an enter or a space character at the end of the section.
  • If Q_QP_FILE tag is found inside the text (paragraph), the file will be embedded above that paragraph, not inside the paragraph where the tag was placed. This is applicable for all tags that insert additional files in the document (docs, images, and so on).
  • The following tag returns numbers in the user’s selected number format:
    <*CTX( Number(<*EVAL(15000)*>).ToFormat(<*CTX( Number(1234.56).Format )*>) )*>
  • The application of conditional logic depends on the type of tags used for document generation: C2 or QUOTE_ITEMS. If the C2 approach is used, the system will first parse content and later, based on the parsed conditional logic, display and parse the document content. On the other hand, QUOTE_ITEMS will parse the condition and process only the content data that satisfies the condition. Row spacing should be reduced to minimum to ensure correct tag parsing. Below are the syntax examples for both approaches, which enable the user to print the content of the main and line items under specific conditions.
C2 example

This is a header.
Repeat once for each main item.

This is a footer.





More Information

You are here: SAP Sales Cloud CPQ Online HelpAdmin Page HelpQuotes AdministrationDocument GenerationDocument Generation Tips and Tricks