> For the complete documentation index, see [llms.txt](https://help.orderdesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.orderdesk.com/technical-documentation/templates-and-documents/customer-receipt-email-template.md).

# Customer Receipt Email Template

This is an example of an email template that would send the customer a receipt. The variable field names are slightly different from the receipt template itself.

If you don’t see the code, please click the expand button above to open this article in a full-size window.

## Embedded code sample

```twig
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<style type="text/css">
body {
	font-family: Arial;
}
</style>
</head>
<body>
<p>Your order has been placed.</p>

<p>{{ shipping.first_name }} {{ shipping.last_name }}<br>
{% if shipping.company %}{{ shipping.company }}<br>{% endif %}
{{ shipping.address1 }}<br>
{% if shipping.address2 %}{{ shipping.address2 }}<br>{% endif %}
{{ shipping.city }}, {{ shipping.state }} {{ shipping.postal_code }}<br>
{{ shipping.country }}</p>

<p>
<strong>Order ID: </strong>{{ source_id }}<br>
<strong>Order Date: </strong>{{ date_added|date_modify("+0 hours")|date("m/d/Y", store_timezone) }}<br>
</p>

<ul>
{% for item in order_items %}
	<li>
	<b>{{ item.name }}</b><br>
	Price {{ item.price }}<br>
	SKU: {{ item.code }}<br>
	Quantity: {{ item.quantity }}
	</li>
	{% if item.variation_list|length > 0 %}
		<ul>

		{% for key, val in item.variation_list %}
			<li>{{ key }}: {{ val }}</li>
		{% endfor %}

		</ul>
	{% endif %}
{% endfor %}
</ul>

<p>
<b>Subtotal:</b> {{ product_total|money_format }}<br>
<b>Shipping:</b> {{ shipping_total|money_format }}<br>
<b>Tax:</b> {{ tax_total|money_format }}<br>

				{% if discount_list|length > 0 %}
					{% for discount in discount_list %}
						<b>{{ discount.name|e }}:</b> {{ discount.amount|money_format }}
					{% endfor %}
				{% endif %}

<b>Total:</b> {{ order_total|money_format }}
</p>

<p>Thank you,</p>

<p><i>{{ store_name }}</i></p>
</body>
</html>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.orderdesk.com/technical-documentation/templates-and-documents/customer-receipt-email-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
