# Passport

## Using the Passport integration tool

Passport is offering you a functionality, which generates simple conditional statement for you for specific section. It allows you to show/hide a section, based on the result of the condition.

1. In order to add the condition, hover your mouse on the section and click on the `add condition` button.
2. A menu will pop up, prompting you to define the condition. This section will be displayed only if the contact data `client` is set to `true`, which means that this address has already been registered in the system. If not, the section will be skipped.


### Adding logic as a text

In order to include more advanced conditional statements, which should not necessarily apply for the whole section, but to part of the content (could be part of the section or multiple sections), you can insert the condition directly as a text. For example, you can add the following condition.

The syntax is:

```html
html linenums="1" hl_lines="1 3 7 11"
{% if var:step == "confirmorder" %} Confirmation of purchase: {{
var:productname:"" }} {% elseif var:step == "unavailable" %} Sorry, {{
var:productname:""}} is out of stock :( If you would like a refund, please
<a href="http://mailjet.com/">contact us</a>. {% elseif var:step == "refund" %}
Refund of your purchase {{ var:productname:"" }} has been issued. The amount of
{{var:totalprice}} will be returned to your credit card within 10 business days.
{% endif %}
```

### Inserting Template block

The `Template block` is a functionality of the editing tool, allowing you to insert template language inside it. It can be either a conditional statement or a loop.

In order to add template language inside the block, you double click on it and enter the code on the left hand side of the builder.

### Use case

Now that you are aware of the possibilities Mailjet's template language offers, we can put them all together.

This guide will show you how to quickly be up and running with your first transactional template. This guide leverages Mailjet's responsive mail builder (Passport) which helps you design your emails easily.

At the end of this guide you will have a flexible e-commerce template, which will cover different types of actions - order confirmation (including list of purchased products), out of stock notice, refund request, unavailable product notification.

## Content insertion

### Leverage custom contact data

You can personalize the name for the recipient using the [contact data](/docs/email-api/contact-management/manage-sub-status-existing-contact).

```html
Hello {{data:firstname:”customer”}}
```

### Insert an image

You can insert an image, providing only the public image URL. For example:

```html
<img src="{{var:url}}" alt="some_text" style="width:width;height:height;" />
```