Benötigen Sie Hilfe?
Im Maileon Help-Center finden Sie umfassende Dokumentationen zu unserem System.
Beliebte Suchanfragen: Importe | Rest-API | Integrationen | SMS
Order Confirmation
This page provides a sketch for creating order confirmation mails. Not all attributes need to be filled, as not each shop system can provide all data or some data is decided not to be required for the usecase. However, having a common transaction type can ease development
Attribute | Mandatory | Type | Description |
order.id | yes | String | ID of the order |
order.date | yes | Timestamp | Date of the order, can contain time information |
order.status | String | Current state of the order, e.g. “Waiting for payment” or “completed” | |
order.estimated_delivery_time | String | E.g. “3 Working Days” | |
order.estimated_delivery_date | Date | An estimate for the delivery date | |
order.items | yes | JSON | Set of items in the order. See table below for data definition. |
order.product_ids | String | Comma separated list of product IDs in the order for easier filtering | |
order.categories | String | Comma separated list of categories in the order for easier filtering | |
order.brands | String | Comma separated list of brands in the order for easier filtering | |
order.total | yes | Double | Overall price |
order.total_no_shipping | * | Double | Overall price without shipping fees |
order.total_tax | yes | Double | Taxes applied |
order.total_fees | yes | Double | Sum of fees, like shipping costs |
order.total_refunds | Double | Sum of refunds | |
order.fees | JSON | Set of fees applied to the order, e.g. shipping fee. See table below for data definition. | |
order.refunds | JSON | Set of refunds applied to the order, e.g. some cashback. See table below for data definition. | |
order.currency | yes | String | Currency, e.g. € |
payment.method.id | String | ID of the payment method | |
payment.method.name | * | String | Name of the payment method |
payment.method.url | String | Some URL, e.g. for payment details | |
payment.method.image_url | String | URL of an image to display in the mailing | |
payment.method.data | String | E.g. the Klarna-Payment-ID | |
payment.due_date | Date | Date till the payment should be done | |
payment.status | String | Status, e.g. “open” or “paid” | |
discount.code | String | If there is a simple discount code, e.g. a voucher code | |
discount.total | String | The sum of discounts | |
discount.rules | JSON | Set of rules applied to the order, e.g. vouchers. See table below for data definition. | |
discount.rules_string | String | Rules as a CSV string. Can be used for filters | |
customer.salutation | * | String | Salutation |
customer.fullname | String | Full name | |
customer.firstname | String | First name | |
customer.lastname | String | Last name | |
customer.id | * | String | Customer ID |
billing.address.salutation | String | Salutation for BA | |
billing.address.firstname | String | First name for BA | |
billing.address.lastname | String | Last name for BA | |
billing.address.street | String | Street for BA | |
billing.address.zip | String | ZIP for BA | |
billing.address.city | String | City for BA | |
billing.address.region | String | Region for BA | |
billing.address.country | String | Country for BA | |
shipping.address.salutation | String | Salutation for SA | |
shipping.address.firstname | String | First name for SA | |
shipping.address.lastname | String | Last name for SA | |
shipping.address.street | String | Street for SA | |
shipping.address.zip | String | ZIP for SA | |
shipping.address.city | String | City for SA | |
shipping.address.region | String | Regionfor SA | |
shipping.address.country | String | Country for SA | |
shipping.service.id | String | ID of the shipping service, e.g. the code like “dhl”, “ups”, or an internal ID like “123” | |
shipping.service.name | String | Name of the shippings ervice, e.g. “UPS” | |
shipping.service.url | String | URL for more informations about shipping service | |
shipping.service.image_url | String | URL for an image to display in a mailing | |
shipping.service.tracking.code | String | A tracking code to display | |
shipping.service.tracking.url | String | A url to the tracking information | |
shipping.status | String | Status, like “shipped” | |
generic.string_1 | String | ||
generic.string_2 | String | ||
generic.string_3 | String | ||
generic.string_4 | String | ||
generic.string_5 | String | ||
generic.string_6 | String | ||
generic.string_7 | String | ||
generic.string_8 | String | ||
generic.string_9 | String | ||
generic.string_10 | String | ||
generic.double_1 | Double | ||
generic.double_2 | Double | ||
generic.double_3 | Double | ||
generic.double_4 | Double | ||
generic.double_5 | Double | ||
generic.integer_1 | Integer | ||
generic.integer_2 | Integer | ||
generic.integer_3 | Integer | ||
generic.integer_4 | Integer | ||
generic.integer_5 | Integer | ||
generic.boolean_1 | Boolean | ||
generic.boolean_2 | Boolean | ||
generic.boolean_3 | Boolean | ||
generic.boolean_4 | Boolean | ||
generic.boolean_5 | Boolean | ||
generic.date_1 | Date | ||
generic.date_2 | Date | ||
generic.date_3 | Date | ||
generic.timestamp_1 | Timestamp | ||
generic.timestamp_2 | Timestamp | ||
generic.timestamp_3 | Timestamp | ||
generic.json_1 | JSON | ||
generic.json_2 | JSON | ||
generic.json_3 | JSON |
Attributes: order.items
Attribute | Mandatory | Type | Description |
sku | yes | String | Stock Keeping Unit |
product id | String | Often there is a product ID that differs from SKU | |
is_gift | Boolean | Indicates if it is a gift | |
title | yes | String | Title of the product |
description | * | String | Regular description |
short_description | String | Short (teaser) description | |
review | String | A review comment | |
release_date | Date | Date of product release | |
url | yes | String | URL to the product in the shop |
image_url | yes | String | URL of the image to display |
status | * | String | Idicates, if the product available, delayed, shipped, sold out, etc. |
quantity | yes | Integer | Quantity |
single_price | yes | Double | Price of a single product |
total | yes | Double | Total cost |
categories | * | String | Categories as a CSV string |
seller.id | String | ID of a third party seller, e.g. for marketplaces | |
seller.name | String | Name of the seller | |
seller.url | String | URL to the details of a seller | |
attributes | JSON | If there are attributes required that are missing or should be displayed, e.g. as a list | |
brand | String | Brand | |
color | String | Color | |
weight | String | Weight | |
width | String | Width | |
height | String | Height | |
estimated_delivery_date | Date | The estimated date | |
estimated_delivery_time | String | E.g. “3 Working Days” |
Attributes: order.discount.rules
Attribute | Mandatory | Type | Description |
id | String | Internal ID of the rule | |
name | yes | String | Readable name of the rule |
description | String | Description | |
total | yes | Double | Number to display |
type | * | String | Defines, if the discount is absolute or in percent |
Attributes: order.fees
Attribute | Mandatory | Type | Description |
id | String | Internal ID of the fee | |
name | yes | String | Readable name of the fee |
description | String | Description | |
total | yes | Double | Number to display |
Attributes: order.refunds
Attribute | Mandatory | Type | Description |
id | String | Internal ID of the refund | |
name | yes | String | Readable name of the refund |
description | String | Description | |
total | yes | Double | Number to display |
Sourcecode for Order Confirmations (PHP)
public function getOrderTransactionType() { $attributes = array(); array_push($attributes, new AttributeType(null, "order.id", DataType::$STRING, true)); array_push($attributes, new AttributeType(null, "order.date", DataType::$TIMESTAMP, false)); array_push($attributes, new AttributeType(null, "order.status", DataType::$STRING, true)); array_push($attributes, new AttributeType(null, "order.estimated_delivery_time", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "order.estimated_delivery_date", DataType::$DATE, false)); array_push($attributes, new AttributeType(null, "order.items", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "order.product_ids", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "order.categories", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "order.brands", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "order.total", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "order.total_no_shipping", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "order.total_tax", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "order.total_fees", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "order.total_refunds", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "order.fees", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "order.refunds", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "order.currency", DataType::$STRING, true)); array_push($attributes, new AttributeType(null, "payment.method.id", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "payment.method.name", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "payment.method.url", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "payment.method.image_url", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "payment.method.data", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "payment.due_date", DataType::$DATE, false)); array_push($attributes, new AttributeType(null, "discount.code", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "discount.total", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "discount.rules", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "discount.rules_string", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "customer.salutation", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "customer.fullname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "customer.firstname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "customer.lastname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "customer.id", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.salutation", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.firstname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.lastname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.street", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.zip", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.city", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.region", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.address.country", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "billing.status", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.salutation", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.firstname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.lastname", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.street", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.zip", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.city", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.region", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.address.country", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.id", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.name", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.url", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.image_url", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.tracking.code", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.service.tracking.url", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "shipping.status", DataType::$STRING, false)); $attributes = $this->addGenericFields($attributes); $orderTxTypeRetentionTime = 365; return new TransactionType(null, self::TX_TYPE_NAME_ORDER, $attributes, $orderTxTypeRetentionTime, false, "An order triggered by X"); }
private function addGenericFields($attributes) { array_push($attributes, new AttributeType(null, "generic.string_1", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_2", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_3", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_4", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_5", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_6", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_7", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_8", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_9", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.string_10", DataType::$STRING, false)); array_push($attributes, new AttributeType(null, "generic.double_1", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "generic.double_2", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "generic.double_3", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "generic.double_4", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "generic.double_5", DataType::$DOUBLE, false)); array_push($attributes, new AttributeType(null, "generic.integer_1", DataType::$INTEGER, false)); array_push($attributes, new AttributeType(null, "generic.integer_2", DataType::$INTEGER, false)); array_push($attributes, new AttributeType(null, "generic.integer_3", DataType::$INTEGER, false)); array_push($attributes, new AttributeType(null, "generic.integer_4", DataType::$INTEGER, false)); array_push($attributes, new AttributeType(null, "generic.integer_5", DataType::$INTEGER, false)); array_push($attributes, new AttributeType(null, "generic.boolean_1", DataType::$BOOLEAN, false)); array_push($attributes, new AttributeType(null, "generic.boolean_2", DataType::$BOOLEAN, false)); array_push($attributes, new AttributeType(null, "generic.boolean_3", DataType::$BOOLEAN, false)); array_push($attributes, new AttributeType(null, "generic.boolean_4", DataType::$BOOLEAN, false)); array_push($attributes, new AttributeType(null, "generic.boolean_5", DataType::$BOOLEAN, false)); array_push($attributes, new AttributeType(null, "generic.date_1", DataType::$DATE, false)); array_push($attributes, new AttributeType(null, "generic.date_2", DataType::$DATE, false)); array_push($attributes, new AttributeType(null, "generic.date_3", DataType::$DATE, false)); array_push($attributes, new AttributeType(null, "generic.timestamp_1", DataType::$TIMESTAMP, false)); array_push($attributes, new AttributeType(null, "generic.timestamp_2", DataType::$TIMESTAMP, false)); array_push($attributes, new AttributeType(null, "generic.timestamp_3", DataType::$TIMESTAMP, false)); array_push($attributes, new AttributeType(null, "generic.json_1", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "generic.json_2", DataType::$JSON, false)); array_push($attributes, new AttributeType(null, "generic.json_3", DataType::$JSON, false)); return $attributes; }