Configure PDF as email attachment and download
    • PDF

    Configure PDF as email attachment and download

    • PDF

    Article summary

    The result PDF contains a summary of the recommendations and the selected answers from the questionnaire. You can integrate it into the user journey in two places:

    • As download on the result page

    • As an attachment in the email notifications

    The setup requires the following steps:

    • Create PDF template

    • Send PDF in email notification

    • Configure PDF download on the result page


    Create PDF template

    1. Download and install LibreOffice.

    💡You cannot use LibreOffice? Alternatively, create a sketch of the PDF in Word. Add images, logos and the font. Additionally, use an example to show what product information the PDF should contain. Then send the template to your CSM support and we will help you with the PDF creation.

    1. Download the desired templates:

    1. Open the template with LibreOffice.

    2. Adjust the following points:

      1. Font

      2. Images and logos

      3. Placement of product information

      4. Placement of user responses

    3. Send the template to your CSM support. We support you with the following steps:

      1. Adjusting the handlebars

      2. Upload the file to the FoxBase server

      3. Provision of the PDF link

    💡The configuration of the PDF template requires knowledge of managing handlebars. Thus, we support you in creating them. Would you like to edit the templates yourself? Note the following tips.


    Tips and notes on the structure of the PDF template

    How do I edit handlebars?

    You can freely design PDF templates. Here are a few tips for creating them:

    • First customize the header and footer.

    • The variable fields are created using handlebars (placeholders). These can be inserted via Insert > Field command > Further field commands > Placeholders. Enclose the statement with <{{…}}>

    • The name within the placeholders after recommendation. corresponds to the name of the column in the imported product data. The handlebar <{{recommendation.productName}}> for instance displays the product name.

    • Generate lists with the following handlebar: <{{htmlList recommendation.benefits}}>
      In addition, you must store the text in the CSV file as a list: <ul><li>point1</li><li>point 2</li></ul>. For a list use <ul> (unordered list), for numbering use <ol> (ordered list). Add the desired enumeration character to the handlebar.

    • Create a variable hyperlink with http://hyperlink/recommendation.video (CSV column title: video).

    • IF loops are opened with <{{#if recommendation}}> and closed with <{{/if}}> and must have the same unique name in the note. The same applies to EACH loops that are run through several times. The placeholders in EACH start with this. (instead of recommendation.). Within the IF loop, an alternative can be output with <{{else}}> (with the same hint name) to output an alternative.

    • You can use the PDF template (fodt file) as a download in the Result Page Product Section or the Top/Bottom Section.

      • In the Product Section, the product recommendation is selected with recommendation, in the Top/Bottom Section all product recommendations are selected with recommendations.

    • Select ONE of the given options within the template. Delete the unused option.

      • Option A: If only one product is recommended at a time (download in bottom section) or if the download button is in the product section, this is the most straightforward option.

      • Option B: If the same template is to be stored for product section (recommendation) and top/bottom section (recommendations).

      • Option C: Either product recommendation as rows OR as columns.

    Why can't I download the PDF on the result page?

    Possible sources of error:

    • You have not yet configured a button on the result page. See the corresponding section in this article.

    • The PDF URL is not up to date. Make sure that you use the link provided by FoxBase.

    • One or more IF or EACH loops have not been closed or do not have the same name in the note.

    • The same IF or EACH hint was used in several loops.

    • The handlebars contain spelling mistakes, spaces or do not contain a period (e.g. at {{this.productName}}).


    Send PDF in email notification

    You can set up an email notification for when the user sends the contact form (see related article). In this section you will learn how to configure the PDF as an email attachment.

    1. Open the Lead section in the workbench.

    2. Activate the Send attachments toggle in the Mail Configuration.

    💡 If there is no mail configuration yet available, configure it first via New Mail Config.

    1. Enter the PDF URL in the field Attachment template.

    2. Enter the name of the PDF download into the field Custom attachment file name. Use the format Name.pdf.

    Configure PDF attachment in different languages

    If you use several languages, you need one PDF template per language. Follow the instructions below to ensure that the PDF is sent in the correct language.

    Save and import language-dependent PDF URLs in a CSV file

    1. Download the template:

    1. Open the file with Excel.

    2. Enter the language in IETF format into the column lang (for German: de_DE; for English: en_EN, for French: fr_FR etc.).

    3. Enter the PDF URLs into the column url.

    4. Click on File > Save as and save the file in CSV UTF-8 format.

    5. Go to the workbench and open Data Sources.

    6. Import the CSV by clicking on New Data Source.

    Configure language-dependent PDF attachments

    1. Go to the workbench and open Lead.

    2. Activate the Send attachments toggle in the Mail Configuration.

    💡 If there is no mail configuration available yet, configure it first via New Mail Config.

    1. Click on the blue arrow to the right of Attachment template .

    2. Configure the line If

      1. Under Source, select the option chosen_language.

    3. Configure the line =

      1. Under Source, select the imported CSV.

      2. Under Column, select the column lang.

    4. Configure the line then use

      1. Under Column, select the column url.


    Configure PDF download on the result page

    1. Go to the workbench and open Result Page.

    2. Open the Top Sections or Bottom Sections.

    💡 The sections define where the PDF download is available on the result page. Note the related article.

    1. Click on Add Section > CTA PDF download button.

    2. Enter a label under Button Label.

    3. Enter the PDF URL under Template URL.

    4. Enter the file name in the format Name.pdf under Custom Download File Name .


    Was this article helpful?

    What's Next