Automations | Confirmed Booking Invoice Generation and Email Attachment — Admin User Guide

Overview

This guide explains how to automatically generate a Confirmed Booking Invoice document and attach it to a confirmation email. It mirrors the Sales Quote setup, but targets the Confirmed booking flow and produces an Invoice (not a quote).

Who should use this? Super Admins or Admins with access to Files, Messaging Templates, and Automations.

What you get: When a confirmed booking is created, the system generates an invoice file (e.g., PDF) and immediately emails it to the booker with the invoice attached.

Prerequisites

  • Access to: Files, Messaging Templates, and Automations.

  • A branded Invoice template file ready (DOCX or as supported).

  • Confirmed booking flow configured (e.g., via PO or paid checkout as per your business rules).

What You Will Configure

  • Upload and register the Invoice document template.

  • Create or edit the Booking Confirmation Email (with Invoice attached) template.


    • Automation 1: Generate the invoice document when a backoffice booking is created

    • Automation 2: Generate the invoice document when a website booking is created

    • Automation 3: Email the generated invoice to the booker and attach the file.

Step 1 — Upload the Invoice Template

1.1 Add Template to Files

  1. Go to Files (File Manager).

  2. Create or open the directory named invoice

  3. Click Upload and add your invoice template (e.g., invoice_template.docx).

  4. Note the exact template name for selection in Automation 1.

Best practice: Maintain one approved invoice template per brand. Archive superseded versions to avoid selection errors.

Step 2 — Create or Edit the Messaging Template

2.1 Booking Confirmation Email (with Invoice attached)

  1. Navigate to Messaging Templates.

  2. Create a new template (or edit an existing one) titled: Booking Confirmation — Invoice Attached.

  3. Subject suggestion: Your Booking Confirmation for {{course_name}} — Invoice {{invoice_number}}


    • Greeting to the booker @leadbookername@

    • Booking summary: course, dates, delegate count, location (optional)

    • Invoice summary: invoice number / reference

    • Brand-aligned signature and support info.

  4. Save the template.

Attachment token: Your platform may require a specific token for the generated file (e.g., @invoicefileid@ or @nvoicefileid@). Confirm the correct token in your environment before finalizing Automation 2.

Step 3 — Automation 1: Generate the Invoice Document

3.1 Create Automation

  1. Go to Automations → Create new.

  2. Title: CREATE CONFIRMED BOOKING INVOICE.

  3. Trigger: A booking is confirmed (select the event that represents confirmation in your system; e.g., PO added or successful payment).

  4. Task/Action: Invoice Generate (document generation action).

  5. Template: Select your uploaded Invoice template.

  6. Share To Contact Variable: Organisation ID (stores the generated file against the organisation contact record).

  7. Conditions (optional but recommended):

    • Brand/Department/Location filters.

    • Course IN [list] for phased rollout.

    • Payment method IN [Invoice, PO, Account] if you only want invoices for these flows.

  8. Execution Timing: Trigger immediately.

  9. Save the automation.

Why “Share to Organisation ID”? Storing the invoice at the organisation level simplifies retrieval, audit, and future resends (especially for multi-delegate/company bookings).

Step 4 — Automation 2: Email the Generated Invoice

4.1 Create Automation

  1. Go to Automations → Create new.

  2. Title: Email Invoice to Booker.

  3. Trigger: An invoice is generated (the event produced by Automation 1).

  4. Action: Email.

  5. Recipient: Booker (or the target notification email field you use).

  6. Message Template: Booking Confirmation — Invoice Attached.

  7. Attach Document: Add the invoice file token (e.g., @invoicefileid@ — verify your exact token).

  8. Conditions (optional):

    • Status = Confirmed.

    • Payment method != Sales Quote (exclude quotes).

    • Brand/Department/Location filters matching Step 3.

  9. Execution Timing: Trigger immediately.

  10. Save the automation.

Token check: If your platform uses @nvoicefileid@ or another variant, update the attachment token accordingly. A token mismatch will result in emails without attachments.

Testing and Validation

Method A — Website Confirmed Booking

  1. Complete a website booking using a flow that creates a Confirmed booking (e.g., paid checkout or PO-entered flow).

  2. Use a test email you can access for the booker.

Method B — Back Office Confirmed Booking

  1. Create a booking in the back office and confirm it (e.g., add PO or mark as confirmed per your process).

  2. Ensure the booker’s email is valid and monitored.

What to Verify

  1. Invoice generated: A new invoice file is visible on the organisation contact record (or the configured storage location).

  2. Email received: The Booking Confirmation email arrives in the booker’s inbox.

  3. Attachment present: The invoice is attached; filename follows your convention (e.g., includes invoice number and/or customer name).

  4. Content accuracy: Customer details, course info, dates, line items, taxes, totals, due date (if applicable), terms, and branding are correct.

  5. Automation logs: Both automations fired without errors and in the expected order.

Verification Checklist

Item

Verification Step

Status (pass/fail)

Confirmed booking created

Booking visible in back office with Status = Confirmed


Invoice file generated

Invoice stored on organisation contact record and linked to booking


Email sent to booker

Confirmation email received with correct subject/body


Attachment correct

Invoice file attached with correct filename and format (e.g., PDF)


Data accuracy

Customer, booking, pricing, dates, taxes, totals, and terms match system data


Troubleshooting

  • No email received:

    • Confirm Automation 2 trigger is “invoice generated,” not “booking created.”

    • Check conditions (status, payment method) aren’t filtering out the case.

    • Review automation logs for errors; verify recipient field maps to the correct email.

  • Email sent but no attachment:

    • Attachment token may be incorrect. Verify token (e.g., @invoicefileid@ vs @nvoicefileid@).

    • Ensure Automation 1 completed successfully and produced a file ID.

  • Wrong or missing data on invoice:

    • Open the template and confirm merge fields/tokens match your data model.

    • Re-generate with a known-good booking to isolate template vs data issues.

  • File not found in storage:

    • Confirm “Share To Contact Variable” is set to Organisation ID (or your intended storage target).

    • Check access permissions on the file directory.

Invoice Template — Quick-Start (Optional)

Use the structure below to design your invoice (adapt branding and merge fields as needed).

From




Bill To



Invoice #:
{{invoice_number}}

Invoice date:
{{invoice_date}}

Payment due:
{{due_date}}

Item

Description

Unit price

Qty

Line total

Subtotal

Tax

Total

Notes/Terms:

Best practice: Include merge fields for PO number, course schedule, and delegate count for reconciliation, and ensure branding matches your confirmation emails.

FAQs

Will the email send if the invoice fails to generate?

No. Automation 2 depends on the “invoice generated” event and a valid file token. If generation fails, no file is available and the email step may be skipped or send without the attachment depending on configuration. Check automation logs.

Can I limit invoice generation to specific courses or brands?

Yes. Add conditions (e.g., Course IN [...], Brand = X) in Automation 1 and mirror them in Automation 2 for a controlled rollout.

Where is the generated invoice stored?

With “Share To Contact Variable = Organisation ID,” the file is stored against the organisation contact associated with the booking.


References