AI Engine Help Center

Design PDF templates

Build reusable PDF layouts that users generate from a record with the PDF button — section types, layout, preview and activation.

A PDF template is a reusable document layout, for example an account one-pager or an opportunity brief. Users generate it from a record with the 📄 PDF button in the Sales Agent, and the template runs against that record. This article is for admins and covers building templates in the PDF Templates tab. For how users generate and share PDFs, see PDF documents.

Before you start#

  • You need the AI_Engine_Admin permission set. Users who generate PDFs need AI_Engine_User.
  • The look of template PDFs (colours, logo, font, footer) comes from PDF settings, not from the template.

Create a template#

  1. Open the Ai Agent Admin Setup tab from the App Launcher and click 📋 PDF Templates.
  2. Click + New (or ✨ Create New Template when no template is open). A new template starts as "New Template" for Account.
  3. Enter a Template name.
  4. Enter the target object's API name, for example Account, Lead, Opportunity or a custom object such as Project__c. Do this before you add sections: the chat and the 🔍 Fields panel work from this object.
  5. Add sections, as described in the next section.
  6. Arrange the layout (order, two columns, titles).
  7. Click 👁 Preview to test the template against a real record.
  8. Check that Active is on (it is on for a new template) and click ✓ Save.

Nothing is stored until you click ✓ Save. Closing the template with ✕ discards unsaved changes.

The designer has three columns: your template list, a chat for building the template, and a preview of the page with a 🔍 Fields panel.

Add sections#

There are three ways to add sections:

  • Describe it in the chat. For example: "add a key fields section with industry, owner and annual revenue" or "add a table of open opportunities". The designer builds or changes sections from your description. To aim a request at one section, click that section first. The chat still returns the whole template, so check the other sections afterwards.
  • Drag fields. Open 🔍 Fields and drag a field onto the Drop field here to add new section area at the bottom of the page. A field of the target object creates a key fields section with that field. A field of a related object creates a table of related records.
  • Add manually. Click + Add Section manually and choose a type. Manually added Data Table and Key Fields sections start without a query and print nothing until you describe them in the chat.

The 🔍 Fields panel loads the target object's fields the first time you open it. If you change the object, or want to work on a template for another object, save, close the template with ✕ and open it again so the panel reloads.

Section types#

Type Shows Notes
Key Fields Field names and values of the record Build and change it in the chat. In the PDF each value is labelled with the field's API name (without __c, underscores shown as spaces), not its field label. Empty values and Id fields are skipped
Data Table A list of related records Tables created by dragging a related field show up to 10 records. In the PDF a table shows at most three columns, with common fields such as Name, Stage, Amount or Close Date first
AI Generated Text A paragraph the AI writes from the section's prompt See below
Static Text Fixed text, such as an introduction or disclaimer Type the text directly on the page. The text box is shown on full-width sections

Use 👁 Preview to check exactly what a Key Fields or Data Table section prints.

AI generated text#

An AI text section is written from its prompt and the record's name. It does not read the record's other fields. A manually added AI text section starts with the prompt "Write a concise summary of this record." To change a prompt, click the section and describe the new prompt in the chat.

Write the prompt so it stands on its own, and put the record facts the reader needs into a Key Fields or Data Table section next to it. Every AI text section is one AI request each time the PDF is generated.

Layout#

Finish your chat changes before you arrange the layout, and check the layout again after any later chat request, because the chat returns the whole template.

  • Order: drag a section by its ⠿ handle, or use ↑ and ↓.
  • Two columns: click ⬛ on a section to pair it with the next section (or with the previous one, if it is the last section). The two half-width sections are placed side by side. Click ⬜ on either of them to make both full width again.
  • Title: edit the title in the box below a full-width section. To rename a half-width section, make it full width, rename it, then pair it again.
  • Remove: click ✕ on the section.

Preview#

  1. Click 👁 Preview. The template needs at least one section.
  2. Type at least two characters of a record name and select the record.
  3. Click Open PDF in new tab to view the result.

Preview generates the real PDF with that record's data, including the AI text, using your PDF settings. You can preview before saving. Because preview runs the AI sections, it uses tokens.

How users run templates#

On a record of the target object, the 📄 PDF button in the Sales Agent lists the active templates for that object. The button appears only when at least one active template matches. The user chooses a template, ticks the sections to include and clicks ⚡ Generate PDF. The PDF is generated with that user's access: records and fields the user cannot see are left out.

A template saved without a target object is offered on records of every object.

Good to know#

  • To stop offering a template, switch Active off and click ✓ Save. To delete a template, open it and click 🗑. It is deleted immediately, without a confirmation step.
  • Large tables take longer to generate. Keep tables to the records a reader actually needs.
  • Many accented characters are printed without their accents in PDFs. See PDF settings.

Troubleshooting#

  • The template is missing from the PDF menu. It is inactive, it was not saved, or its target object API name does not match the record's object.
  • A section prints "No data available." There are no matching records, the user cannot see them, the section has no query yet, or the query could not run for this user, for example because it uses a field the user has no access to.
  • The AI text is generic. Make its prompt more specific, and show the facts in a Key Fields section instead of expecting the AI to know them.
Still stuck? Ask AI, or email contact@cloudconnected.pl with the exact error message, the page or action you used and roughly when it happened.