Comment on page

XML File Structure

Wonder how the structure of our transaction feed should look? Scroll through our example and find notes at the bottom if you don't understand a certain parameter.

Whole XML FILE STRUCTURE:

<?xml version="1.0" encoding="utf-8"?>
<Orders version="5.2" propertyCode="examplecz" startDate="2017-02-28" endDate="2017-03-28">
<Order>
<Site>example.cz</Site>
<OrderId>12001508xxx</OrderId>
<UserId>e99f33420f577ee8</UserId>
<Status>Ordered</Status>
<Delivered>1|0</Delivered>
<OrderedAt>2015-04-25T09:00:00</OrderedAt>
<CurrencyCode>CZK|EUR|PLN</CurrencyCode>
<Profit>235</Profit>
<Revenue>928.05</Revenue>
<DeliveryCost>80</DeliveryCost>
<PaymentCost>15</PaymentCost>
<ProcessingCost>0</ProcessingCost>
<ProductsCost>235</ProductsCost>
<Total>1123</Total>
<Tax>194.95</Tax>
<Discount>30</Discount>
<Delivery>0</Delivery>
<Surcharge>0</Surcharge>
<ProductsRevenue>980</ProductsRevenue>
<SalesChannel>online|offline</SalesChannel>
<PaymentType>CashOnDelivery</PaymentType>
<DeliveryType>PPL</DeliveryType>
<ProcessingType>no-login | no-login</ProcessingType>
<ProductsQuantity>1</ProductsQuantity>
<ProductsDelivered>0</ProductsDelivered>
<CreatedAt>2015-04-25T09:00:00</CreatedAt>
<ModifiedAt>2015-04-25T11:11:00</ModifiedAt>
<ShippedAt>2015-04-26T13:00:00</ShippedAt>
<DeliveredAt>2015-04-27T10:00:00</DeliveredAt>
<ReturnedAt>2015-05-02T10:00:00</ReturnedAt>
<SourceSystem>SAP ERP6.142</SourceSystem>
<UserEmailHash>e99f33420f577ee8</UserEmailHash>
<UserPhoneHash>s11f12420f897cc8</UserPhoneHash>
<UserSegment>customer.c15</UserSegment>
<UserGender>m | f</UserGender>
<UserBirthAt>1988-12-11</UserBirthAt>
<UserCountryCode>CZ|SK</UserCountryCode>
<UserCity>Praha 2</UserCity>
<UserPostalCode>12200</UserPostalCode>
<UserCreatedAt>2015-02-25T12:17:00<UserCreatedAt>
</Order>
</Orders>

XML FILE STRUCTURE with notes and descriptions:

<?xml version="1.0" encoding="utf-8"?>
<Orders version="5.2" propertyCode="examplecz" startDate="2017-02-28" endDate="2017-03-28">
Note: propertyCode - the same as Business unit code
startDate - beginning of the period for which the export is generated
endDate - end of the period for which the export is generated
each order is represented by one Order element
<Order>
Required fields
<Site>example.cz</Site>
Note: The web domain where the order was generated. If the order isn't placed online the value will be "-".
<WebId>A1234582</WebId>
Note: The unique ID of the online order captured by the web tracking software, for instance when Google Analytics is used, this is the transaction ID. ID must be unique. For offline orders it will be a dash -.
<OrderId>12001508xxx</OrderId>
Note: Internal unique order number. Can be the same as WebId. During all editing in the system this ID has to stay the same.
<UserId>e99f33420f577ee8</UserId>
Note: User ID connected to the order. Must be hashed.If it is not possible to assign an ID to a user (e.g. the system does not create users for orders without a login) their hashed e-mail address is used. UserId will then be the same as userEmailAddress. UserId for offline orders can be null.
<Status>Ordered</Status>
Note: This identifies the status of the order, it can be a numerical type or a textual description of the order status. Examples statuses are new/paid/returned. Unknown status shall be encoded with "-".
<<Delivered>1|0</Delivered>
Note: Status whether money was received.1 = YES, 0 = NO.
<OrderedAt>2015-04-25T09:00:00</OrderedAt>
Note: The date when the order was completed. The date when the order was accepted into the ERP system. This should be the time when WebID was send to Google Analytics.
<Curr<CurrencyCode>CZK|EUR|PLN</CurrencyCode>
Note: ISO 4217 currency name, the whole order must be converted into a single currency.
<Profit>235</Profit>
Note: Trade margin / surcharge. Difference in sales and purchase prices. This is the gross profit on the order. If not filled in, counts as (Revenue - ProductsCost).
<Revenue>928.05</Revenue>
Note: Total revenue for sold goods. Value excludes VAT and other delivery, payment or shipping costs. From a business perspective, not a customer. (Total - (Tax + DeliveryCost + PaymentCost + ProcessingCost)). We can simplify this calculation by subtracting only tax and inputting the other costs as zero.
The following items are optional - these are the real costs of processing the order. Ideally however, we recommend that you implement them to verify that all values are correct
<DeliveryCost>80</DeliveryCost>
Note: Cost of delivered / undelivered shipment. Usually it has fixed values according to the type of transport. It is not the fee that your customer pays for delivery.
<PaymentCost>15</PaymentCost>
Note: Payment costs (e.g: for payment gate maintenance, costs for each type of payment) - fixed value.
<ProcessingCost>0</ProcessingCost>
Note: Other costs for order processing. For example, packing.
<ProductsCost>235</ProductsCost>
Note: Cost of purchasing goods excluding VAT.
The following items are optional - financial information from the customer's perspective
<Total>1123</Total>
Note: Invoiced amount including all charges (postage, shipping, discounts and VAT) as seen by the customer. (ProductsRevenue + Delivery + Surcharge + Tax).
<Tax>194.95</Tax>
Note: Tax of the products VAT and any other tax paid if applicable, tax is calculated only from the total less delivery and surcharge.
<Discount>30</Discount>
Note: Discount value including VAT. These include, for example, a discount obtained through a discount coupon, a discount on a product or an entire order. The discount value can be any positive number; it cannot be zero., a discount obtained through a discount coupon, a discount on a product or an entire order. The discount value can be any positive number; it cannot be zero.
<Delivery>0</Delivery>
Note: Delivery costs, including VAT, that are charged to the client.
<Surcharge>0</Surcharge>
Note: Extra charges to the customer, for instance payment fee, etc, including VAT.
<ProductsRevenue>980</ProductsRevenue>
Note: This is the income on sold goods without any bonuses or discounts. In cases when there are no discounts and other costs then this is identical to the revenue.excluding VAT.
Optional items - further information about the order
<SalesChannel>online|offline</SalesChannel>
Note: Optional. If not filled in, the order behaves as "online".
<PaymentType>CashOnDelivery</PaymentType>
Note: Determines the payment method, e.g. cash, card, cupon delivery, ...
<DeliveryType>PPL</DeliveryType>
Note: Determines the delivery method, e.g. post, local pickup, ...
<ProcessingType>no-login | no-login</ProcessingType>
Note: Order processing method. E.g. order without registration -> order.nologin; order after login -> order.login etc.
<ProductsQuantity>1</ProductsQuantity>
Note: Number of products sold in the order.
<ProductsDelivered>0</ProductsDelivered>
Note: Number of products delivered, ProductsQuantity less ProductsReturned, or removed from the order when amended.
Optional items - times of order status change
<CreatedAt>2015-04-25T09:00:00</CreatedAt>
Note: Date and time when the product was first added to the cart. If CreatedAt is unknown, the value from OrderedAt is used.
<ModifiedAt>2015-04-25T11:11:00</ModifiedAt>
Note: Date when the order was modified.
<ShippedAt>2015-04-26T13:00:00</ShippedAt>
Note: Datetime when the order was completed and dispatched to the customer (or prepared for pick up by the customer).
<DeliveredAt>2015-04-27T10:00:00</DeliveredAt>
Note: Date the order was handed over to the customer (date of receipt of the shipment).
<ReturnedAt>2015-05-02T10:00:00</ReturnedAt>
Note: Datetime when the order was returned by the customer.
Optional items - customer information
<SourceSystem>SAP ERP6.142</SourceSystem>
Note: Identifier of the system where the order was sourced from, ERP name.
<UserEmailHash>e99f33420f577ee8</UserEmailHash>
Note: Hash of the email address. For example MD5(LOWERCASE(email_address)). When the UserEmailHash is not populated then a UserId must be provided, bad data shall be encoded with "-".
<UserPhoneHash>s11f12420f897cc8</UserPhoneHash>
Note: Hash of the phone number, preferable in a standardised international format. For example MD5(+19207658943), bad data shall be encoded with "-".
<UserSegment>customer.c15</UserSegment>
Note: Indicates the kind of the customer private - customer who is not a company private.partner.{xxx} - customer who is not a company with a special contract, {xxx} defines the contract type, for instance the discount level etc business – customer who is a company, and his price is the same as for private customers business.partner.{xxx} – companies, with a specific status, either they do have a special contract or a special price, {xxx} defines the contract type, for instance the discount level etc.
<UserGender>m | f</UserGender>
Note: gender of the customer. Values: "m" or "f".
<UserBirthAt>1988-12-11</UserBirthAt>
Note: Date of birth "YYYY-MM-DD".
<UserCountryCode>CZ|SK</UserCountryCode>
Note: Country code identifying the user's country.
<UserCity>Praha 2</UserCity>
Note: The city where the order was delivered.
<UserPostalCode>12200</UserPostalCode>
Note: Zip code.
<UserCreatedAt>2015-02-25T12:17:00<UserCreatedAt>
Note: The date the user account was created. For an unregistered user the order date will be applied.
</Order>
</Orders>