Developer forum

Forum » Integration »  data when exporting eComOrders, and formatting eComOrders data?

data when exporting eComOrders, and formatting eComOrders data?

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

when we export eCom orderdata (from the table EcomOrders), there is a field called OrderCaptureInfo - which is data formatted as XML like this

<?xml version="1.0" encoding="utf-8" standalone="yes"?><OrderCaptureInfo><Timestamp>-8585716267392904180</Timestamp><State>NotCaptured</State><Message></Message></OrderCaptureInfo>

Q#1 I assumed the Timestamp was the TImestamp for when the order was captured, but since the State is NotCaptured - what does the timestamp indicate?

Q#2 Is there a way of only exporting orders where OrderCaptureInfo State is Captured, and equally important - is it possible to format the TimeStamp during export, so that we cann get a sortable field with data of when the order was captured? If so, how can this be done?

 

/Hans


Replies

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Hans,

  1. The timestamp (binary representation) is initially set when the cart is created. So just like the <State>NotCaptured</State> (stating that it is not yet captured) it is a default value. Naturally, this will change upon actual capture.
  2. You can use TableScript to evaluate each row being exported, and manipulate any of the data as you see fit. There is an example here

BR
Snedker

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi Morten.

Thanks for you reply. If i only wan´t to fetch the capture timestamp from the field, can I do this without setting it up as a "custom" solution etc?   The manual/example only shows more advanced implementing of table scripting.

/Hans

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Hans,

Sorry for the late reply, but: No, unfortunately not. The capture timestamp is wrapped in an XML, and you have to retrieve it from here, and you have to use DateTime.FromBinary() to revert to readable date.

BR
Snedker

 

You must be logged in to post in the forum