+49 69 83008980 service@xqueue.com
Benötigen Sie Hilfe?

Im Maileon Help-Center finden Sie umfassende Dokumentationen zu unserem System.

Beliebte Suchanfragen: Importe | Rest-API | Integrationen | SMS

Shopping Cart Abandonment

Sie sind hier:

This page provides a sketch for creating abandoned cart 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
cart.id yes String ID of the cart
cart.date yes Timestamp Time information when the cart was updated last
cart.url yes String URL to the cart. Usually this will be the regular URL to the generic cart, which might be empty, if the usersession timed out.
cart.items yes JSON Set items in the cart. See table below for data definition.
cart.product_ids String Comma separated list of product IDs in the cart for easier filtering
cart.categories String Comma separated list of categories in the cart for easier filtering
cart.brands String Comma separated list of brands in the cart for easier filtering
cart.total yes Double Overall price
cart.total_no_shipping * Double Overall price without shipping fees
cart.total_tax yes Double Taxes applied
cart.total_fees yes Double Sum of fees, like shipping costs
cart.total_refunds Double Sum of refunds
cart.fees JSON Set of fees applied to the cart, e.g. shipping fee. See table below for data definition.
cart.refunds JSON Set of refunds applied to the cart, e.g. some cashback. See table below for data definition.
cart.currency yes String Currency, e.g. €
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 cart, 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
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: cart.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_time String E.g. “3 Working Days”

Attributes: cart.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: cart.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: cart.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 Cart Abandonments (PHP)

public function getOrderTransactionType() {
    $attributes = array();
    array_push($attributes, new AttributeType(null, "cart.id", DataType::$STRING, true));
    array_push($attributes, new AttributeType(null, "cart.date", DataType::$TIMESTAMP, false));
    array_push($attributes, new AttributeType(null, "cart.status", DataType::$STRING, true));
    array_push($attributes, new AttributeType(null, "cart.url", DataType::$STRING, false));
    array_push($attributes, new AttributeType(null, "cart.estimated_delivery_time", DataType::$STRING, false));
    array_push($attributes, new AttributeType(null, "cart.estimated_delivery_date", DataType::$DATE, false));
    array_push($attributes, new AttributeType(null, "cart.items", DataType::$JSON, false));
    array_push($attributes, new AttributeType(null, "cart.product_ids", DataType::$STRING, false));
    array_push($attributes, new AttributeType(null, "cart.categories", DataType::$STRING, false));
    array_push($attributes, new AttributeType(null, "cart.brands", DataType::$STRING, false));
    array_push($attributes, new AttributeType(null, "cart.total", DataType::$DOUBLE, false));
    array_push($attributes, new AttributeType(null, "cart.total_no_shipping", DataType::$DOUBLE, false));
    array_push($attributes, new AttributeType(null, "cart.total_tax", DataType::$DOUBLE, false));
    array_push($attributes, new AttributeType(null, "cart.total_fees", DataType::$DOUBLE, false));
    array_push($attributes, new AttributeType(null, "cart.total_refunds", DataType::$DOUBLE, false));
    array_push($attributes, new AttributeType(null, "cart.fees", DataType::$JSON, false));
    array_push($attributes, new AttributeType(null, "cart.refunds", DataType::$JSON, false));
    array_push($attributes, new AttributeType(null, "cart.currency", DataType::$STRING, true));
    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));
    $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;
}
Inhaltsverzeichnis