HomeIntegration guideData integrationOrders feed

Orders feed

The feed with all orders made within given e-shop. At least one product per order is required. Because the prices of products can vary between orders, each product may have price valid at the time of order. If no price is specified, current price in the Products feed is assumed.

Each order can be in different statuses but as a part of a unification we use only 3 statuses:

  • finished – Finished order (customer received the goods) – only these orders are currently processed by Yottly.
  • created – Order was not delivered (waiting for payment, wating for delivery etc.)
  • canceled – Order was canceled/revoked/deleted etc. This order will never be finished.

Only these 3 keywords are recognized by our service.

If there are orders created by not registered customer (i.e., CUSTOMER_ID does not exist in customer feed or does not exist at all), provide his/her EMAIL and PHONE (if available) instead of CUSTOMER_ID. Yottly will automatically create a new customer from this record thus allowing you to contact the customer via campaigns. If there is a customer in the customer feed with such EMAIL and no or unknown (i.e., not existing in the customer feed) CUSTOMER_ID is provided in the orders feed, this order will be attributed to that customer. Otherwise his/her EMAIL from the orders feed will be used as an ID. Orders with missing both EMAIL and CUSTOMER_ID will not be processed at all.


Field nameField typeRequiredDescription
ORDER_IDStringyesIdentifier of an order
CUSTOMER_IDStringnoIdentifier of a customer who made this order.
CREATED_ONDatetime (as String)yesDatetime of the order creation in format YYYY-MM-DDThh:mm:ss.sTZD (more info).
ITEMSyesProducts in given order
FINISHED_ONDatetime (as String)noDatetime of the order completion in format YYYY-MM-DDThh:mm:ss.sTZD (more info). Do not use or leave empty if the order has not been finished yet.
STATUSStringnoStatus of the order. Allowed values are: created, finished, canceled (if missing, order is assumed to be finished)
EMAILStringnoValid email
PHONEStringnoPhone number in the format according to the International Telecommunication Union. It should contain a plus sign ("+") as the international prefix symbol, the country code and the number , e.g., "+420777123456" for the Czech Republic
ZIP_CODEStringnoZIP code from the shipping address
COUNTRY_CODEStringnoCountry code of the shipping address in 2 letter format according to ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

ITEMS fields

Each order must contain all products that are in the given order. PRICE is the price of the product while the order was created.

 

 

Field nameField typeDescription   
PRODUCT_IDStringREQUIRED PRODUCT_ID from Product feed specification. If product variant exists for given product and is part of an order, use PRODUCT_ID from variant. If product in products feed has no variant, use product’s PRODUCT_ID
AMOUNTNumber (integer, >0)OPTIONAL. If the field is not set, default value is used (1)
PRICENumber (>0)OPTIONAL total price of all items including VAT

 


XML format

<?xml version="1.0" encoding="utf-8"?>
<ORDERS>
         <ORDER>
                <ORDER_ID>5ds465d</ORDER_ID>
                <CUSTOMER_ID>d4s5a6sd6as</CUSTOMER_ID>
                <CREATED_ON>2014-12-31T03:53:43.962Z</CREATED_ON>
                <FINISHED_ON>2015-01-05T03:53:43.962Z</FINISHED_ON>
                <ZIP_CODE>15500</ZIP_CODE>
                <COUNTRY_CODE>CZ</COUNTRY_CODE>
                <ITEMS>
                       <ITEM>
                             <PRODUCT_ID>DAS656</PRODUCT_ID>
                             <AMOUNT>6</AMOUNT>
                             <PRICE>42.5</PRICE>
                       </ITEM>
                </ITEMS>
         </ORDER>
         <ORDER>
                <ORDER_ID>45sd8</ORDER_ID>
                <EMAIL>john.doe@email.com</EMAIL>
                <CREATED_ON>2014-12-31T03:53:43.962Z</CREATED_ON>
                <FINISHED_ON>2015-01-05T03:53:43.962Z</FINISHED_ON>
                <ZIP_CODE>15500</ZIP_CODE>
                <COUNTRY_CODE>CZ</COUNTRY_CODE>
                <ITEMS>
                       <ITEM>
                             <PRODUCT_ID>DAS656</PRODUCT_ID>
                             <AMOUNT>6</AMOUNT>
                             <PRICE>42.5</PRICE>
                       </ITEM>
                </ITEMS>
         </ORDER>

</ORDERS>
Was this article helpful to you? Yes No