# Confirmation email

Eventmaker comes with a powerful language editor for your custom emails. It’s derived from the markup language [Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers). This page shows you how you can use the custom Eventmaker liquid tags and variables to build your confirmation emails.

## Liquid variables

Here are the variables available to use in [Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) for the custom confirmation emails :

### {{ event }}

```
{
             "title" => "New Year's Eve 2015",
         "organizer" => "Eventmaker Developers",
       "description" => "This event has not begun yet",
          "timezone" => "Paris",
                "id" => "5408886b4f6905cb83000001",
             "photo" => nil,
    "photo_original" => nil,
        "start_date" => Wed, 31 Dec 2014 22:00:00 CET +01:00,
          "end_date" => Thu, 01 Jan 2015 07:00:00 CET +01:00
}
```

### {{ guest\_category }}

```
{
                 "name" => "Visitor",
        "badge_enabled" => true,
               "traits" => {},
                "price" => 0.0,
                  "vat" => 0.0,
    "price_without_vat" => 0.0,
       "price_with_vat" => 0.0,
           "vat_amount" => 0.0
}
```

### {{ guest }}

```
{
                                    "_id" => "54da19ae826b77b377000047",
                             "created_at" => nil,
                             "updated_at" => nil,
                             "deleted_at" => nil,
                                    "uid" => "TESTUID",
                              "order_uid" => nil,
                                  "email" => "john.smith@acme.com",
                             "first_name" => "John",
                              "last_name" => "Smith",
                               "position" => "Chief Technical Officer",
                           "company_name" => "Acme Company Inc.",
                           "phone_number" => "999 888 777",
                                "message" => nil,
                        "invitation_code" => nil,
                             "utm_source" => nil,
                             "utm_medium" => nil,
                           "utm_campaign" => nil,
                     "person_parent_type" => nil,
                    "person_parent_field" => nil,
                       "person_parent_id" => nil,
                  "facebook_profile_link" => nil,
                               "event_id" => "51f64612112710982f0006e9",
                      "guest_category_id" => "5419a085826b77608500000a",
                     "payment_promo_code" => nil,
    "send_email_on_guest_category_change" => nil,
                "confirmation_email_sent" => false,
                   "disable_update_email" => false,
                 "wait_for_linked_people" => false,
                            "rsvp_status" => "not_replied",
            "vip_notification_on_checkin" => nil,
                              "showed_up" => nil,
               "green_access_control_ids" => nil,
                 "red_access_control_ids" => nil,
                                     "id" => "54da19ae826b77b377000047",
                         "guest_metadata" => {
                                     "city" => "Paris",
                                  "country" => "France"
                              },
                                    "vat" => 0.0,
                        "unsubscribe_url" => "url to cancel event registration",
                              "badge_url" => "#fake_preview_badge_url",
                        "badge_completed" => false,
                      "access_privileges" => [],
                           "person_files" => [],
                                "tickets" => [],
                              "documents" => [],
                    "discount_percentage" => 0.0,
                "purchase_total_with_vat" => 0.0,
             "purchase_total_without_vat" => 0.0,
                           "purchase_vat" => 0.0,
                         "payment_status" => "FREE",
                       "payment_currency" => "EUR",
                        "last_cart_total" => 0.0,
          "last_cart_total_excluding_vat" => 0.0,
               "last_cart_payment_status" => "FREE",
                 "payment_transaction_id" => nil,
                  "payment_merchant_type" => nil,
                           "payment_date" => nil,
                        "payment_attempt" => 0,
                 "payment_gateway_status" => nil,
             "payment_wufoo_sync_blocked" => false,
                          "person_parent" => nil,
                                  "carts" => []
}
```

### {{ carts }}

```
  [
    {
      "total_incl_vat" => 0,
      "total_excl_vat" => 0,
      "adjustment" => 0,
      "balance" => 0,
      "has_promo_code" => false,
      "payment_currency" => "EUR",
      "payment_status" => "FREE",
      "payment_transaction_id" => "",
      "payment_merchant_type" => "",
      "payment_date" => "",
      "payment_attempt" => 0,
      "payment_gateway_status" => 0,
      "zoho_invoice_reference" => "",
      "zoho_invoice_id" => ""
      "cart_items" => []
    },
    {
      "total_incl_vat" => 0,
      "total_excl_vat" => 0,
      "adjustment" => 0,
      "balance" => 0,
      "has_promo_code" => false,
      "payment_currency" => "EUR",
      "payment_status" => "FREE",
      "payment_transaction_id" => "",
      "payment_merchant_type" => "",
      "payment_date" => "",
      "payment_attempt" => 0,
      "payment_gateway_status" => 0,
      "zoho_invoice_reference" => "",
      "zoho_invoice_id" => ""
      "cart_items" => []
    }
  ]
```

### {{ cart\_items }}

```
[
  {
    "price_incl_vat" => 0,
    "price_excl_vat" => 0,
    "vat" => 0,
    "promo_percent" => 0,
    "label" => "",
    "description" => ""
  },
  {
    "price_incl_vat" => 0,
    "price_excl_vat" => 0,
    "vat" => 0,
    "promo_percent" => 0,
    "label" => "",
    "description" => ""
  }
]
```

### {{ access\_privileges }}

```
[
    {
        "max_allowed_accesses" => -1,
            "accesspoint_name" => "Atelier 1",
              "accesspoint_id" => "545b4034826b774f9d0000ae",
           "price_without_vat" => 0.0,
                  "vat_amount" => 0.0,
              "price_with_vat" => 0.0,
                 "access_once" => false,
          "accesspoint_traits" => {
                           "type" => "atelier",
                          "label" => "Atelier Peinture"
                      }
    },
    {
        "max_allowed_accesses" => 1,
            "accesspoint_name" => "Atelier 2",
              "accesspoint_id" => "545b403f826b774f9d0000b9",
           "price_without_vat" => 0.0,
                  "vat_amount" => 0.0,
              "price_with_vat" => 0.0,
                 "access_once" => true,
          "accesspoint_traits" => {
                          "type" => "atelier"
                      }
    }
]
```

**Example**

```
  
    {% if guest.access_privileges %}
    <h2>Your conferences</h2>
    <h3>Tuesday</h3>
    <ul>
      {% for point in guest.access_privileges %}
        {% if point.accesspoint_traits.jour == "Tuesday" %}
          <li>{{ point.accesspoint_traits.label }}</li>
        {% endif %}
      {% endfor %}
    </ul>
    <h3>Wednesday</h3>
    <ul>
      {% for point in guest.access_privileges %}
        {% if point.accesspoint_traits.jour == "Wednesday" %}
          <li>{{ point.accesspoint_traits.label }}</li>
        {% endif %}
      {% endfor %}
    </ul>
    {% endif %}
```

### {{ linked\_guests }}

```
[]
```

**Example**

```
  {% for lg in linked_guests %}
    {% for access_privilege in lg.access_privileges %}
      {% if access_privilege.accesspoint_traits.jour == "Monday" %}
        <li>{{ access_privilege.accesspoint_traits.label }}</li>
      {% endif %}
    {% endfor %}
  {% endfor %}

  {% for lg in linked_guests %}
    Name : {{lg.first_name}}
    Invited by : {{lg.person_parent.first_name}}
  {% endfor %}
```

### {{ email\_url }}

```
"#fake_preview_email_url"
```

### {{ edit\_form\_url }}

```
"#fake_edit_form_url"
```

### {{ is\_update }}

```
false
```

### {{ qrcode\_image\_tag }}

```
"<img src=\"http://apps.eventmaker.io/en/events/51f64612112710982f0006e9/guest_categories/5419a085826b77608500000a/email_fake_qrcode\" alt=\"QR Code\" width=\"240\" style=\"image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor\" />"
```

### {{ qrcode\_image\_url }}

```
"http://apps.eventmaker.io/en/events/51f64612112710982f0006e9/guest_categories/5419a085826b77608500000a/email_fake_qrcode"
```

## Liquid tags

Along with the native liquid tags, some new ones have been made available for you to build your custom confirmation email.

### Documents

The identifier must be replaced with a document template id.

```
<a href="{% document_url '542c2c7c826b777071000001' %}">Document</a>
```

### Badges

The identifier must be replaced with a badge template id.

```
<a href="{% badge_url '5419a085826b77608500000d' %}">A4</a>
```

### inline image url

inline attach in the mail the image passed as parameter.

```
<img src="{%inline_image_url "url_of_the_image" %}" />
```

## Email Object

The email object supported Liquid language. You can use condition in it.

```
{% if guest.payment_merchant_type == 'ogone' %}You have pay online{% else %}You do not pay online{% endif %}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.eventmaker.io/liquid-documentation/confirmation-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
