Skip to main content

How can I send an email with a PDF attachment?

Create an action for emails​

  • Open your configurator's editor.
  • Click
    Loading...
    in the sidebar.
  • Click the pencil icon on the block containing the price and “Order” buttons.
  • Here, you can create and manage “Order” buttons. Either use the existing one or click
    Loading...
    to create a new one.
  • Uncheck the box next to Send to Shop
  • You now have several options:
    • Send Internal Email sends an email to you. You can still specify the email address and whether a PDF should be attached. If you check the latter box, you can also specify which PDF-Dokument should be sent.
    • Contact Form displays a form for user data as the second step of the order process. Normally, you should check this box. You can now specify which fields appear in the form. If you collect an email address in particular, you can choose to also send a confirmation email to the customer. Here, too, you can specify whether and which PDF should be sent.
  • Click on
    Loading...
  • Test an order: After clicking the “Order” button, a summary will open. A contact form should then appear, and the configuration should be saved afterward. You should receive the correct emails.

Attaching Additional PDFs​

You can attach more than one PDF to an email. Typical examples: a data sheet for the customer and the internal sales team, plus a long text or a shipping label, which is only used internally.

  • First, check the box for the regular PDF for the respective email (Attach PDF to internal email or Attach PDF to customer email). Only then will the button for additional documents appear.
  • Click
    Loading...
    or
    Loading...
    .
  • Under PDF Document, select the Templat from which the document will be generated.
  • Under File Name (optional), you can specify the name of the attachment.
  • Use the trash can icon to remove a row.
  • Repeat this for each additional document.

Internal and customer emails are managed separately. A document that you enter only for internal email will be sent only there.

tip

The same applies to the direct PDF-Download: there, the button is labeled

Loading...
.

Attach Excel with Bill of Materials​

In addition to PDF documents, K3 can export the configuration as an Excel file. It contains two worksheets:

  • Bill of Materials: the items with number, item, quantity, count, unit price, and total price.
  • Characteristics: all characteristics with their values, organized by steps.

The Excel file is intended for your back-office staff, for example, to be imported into order entry.

  • Open the action as described above.
  • For emails, check the box next to Attach Excel to internal email or Attach Excel to customer email.
  • Specify the name of the attachment below under Excel file name ... (optional).
  • If you want the file to be downloaded directly instead (or in addition), check the box for Download Excel in the action and optionally assign a File name for the Excel file.
info

The Excel file is generated from the same data as the PDF-Dokumente. It is therefore only available in products that contain PDF documents.

tip

All emails are sent via the K3 mail service from its email address. However, the email sent to the customer includes a “Reply-To” field. This field is populated with the address you specified in the internal email settings. This is where customers’ replies to the confirmation email will be sent.

Formatting Emails​

Normally, emails are sent in a neutral format.

info

To customize email content, you’ll need basic knowledge of HTML and CSS. You may want to leave this to your web designer.

  • Open your configurator’s editor.
  • Click on
    Loading...
    in the sidebar.
  • Switch to the Mail tab. Here you can edit multiple email templates.
  • Click on
    Loading...
  • Click in the Select Template field and choose one of the templates:
    • cfg-internal: the email sent to you
    • cfg-customer: the email sent to the customer
    • layout: the overall design of the emails
    • cta: design of the button included in the email You can also create completely custom templates, but this is not normally necessary.
  • You will now see the template as provided and can edit it.
  • Templates are written in Twig.
  • The following variables are available: app, cfg, dealerApp, link, locale, more detailed description bei PDF
  • You can use locale to make the emails multilingual.
  • You can define the following blocks using {% block subject %}...{% endblock %}:
    • subject: The email subject line
    • content: The body of the email
    • sender: The footer containing the sender’s address
  • Otherwise, check the template to understand how you can customize the emails.
  • If you do not use the command {% extends "layout" %} in the first line, you must/can design the email entirely as you wish. However, be sure to define the subject block so that the email has a subject line.
  • If you want to discard your changes and revert to the default, click
    Loading...
    .
  • Click
    Loading...
    .

Next Steps​

  • You can, of course, also edit the attached PDF documents in a very similar way using ändern.