question

tonerkurier_de avatar image
0 Likes"
tonerkurier_de asked ·

GetOrders and OrderStatus Active

Hi everybody, from time to time we do receive Orders via getOrders()-Call where OrderStatus is in State Active which means "the cart is active. Items can only be added, deleted, or updated in the cart when status is Active." Can anybody tell me how to handle those orders? I'm a little confused about status active and the proper way to work with "orderstatus active" during getOrders management. Should i just save/cache the order in active state locally and try to get it later via GetOrder-Call? Or does eBay provide the order later on as soon as OrderStatus is complete? Thank you for your help and time :) Wayne http://developer.ebay.com/DevZone/XML/docs/reference/ebay/types/OrderStatusCodeType.html
getordersorderstatuscodetype.active
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered ·
Are you only asking for complete orders? http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/GetOrders.html#Request.OrderStatus If an order is in the active state you most likely will want to ignore it. Since it is not yet complete the order information may change, so you don't want to fulfill an active order. The only time you want to review and active order is when there is a dispute. So if you are only asking for complete orders you will from time to time see an order pop into the response again as active. And that is usually due to a resolution management case has been opened.
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tonerkurier_de avatar image
0 Likes"
tonerkurier_de answered ·
Thanks for your response. So I shouldn't care about Orders where status is active, good news :) In the past, I've asked for all statuses during getOrders-call - I've modified that to only call for orders where OrderStauts is completed. getOrders.OrderStatus = OrderStatusCodeType.Completed Hope that fixes problems :)
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered ·
Yes that is the best practice. Here are a few more, https://ebaydts.com/eBayKBDetails?KBid=1788
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tonerkurier_de avatar image
0 Likes"
tonerkurier_de answered ·
Hi everybody, thanks for your replies. For further Information - I'm using the latest .NET SDK - and unfortunately I'm still receiving orders where OrderStatus is "Active" - even if I do call getOrders like follows GetOrdersCall getOrders = new GetOrdersCall(MC.eBay.Api.GetApiContext()); getOrders.DetailLevelList = new DetailLevelCodeTypeCollection(); getOrders.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); getOrders.OrderStatus = OrderStatusCodeType.Completed; getOrders.CreateTimeFrom = CreateTimeFrom; getOrders.CreateTimeTo = CreateTimeTo; getOrders.Execute(); What am I missing? I've explicitly asking for orders where OderStatus is "OrderStatusCodeType.Completed". Here's such an order from api.log: xxxxxxxxx-xxxxxxxxxxxxxx Active 0.0 0.0 0.0 NoPaymentFailure 2014-02-03T17:34:26.000Z None Incomplete false ...... Any help appreciated. Cheers, Wayne
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tonerkurier_de avatar image
0 Likes"
tonerkurier_de answered ·
As a further note: seems like as "getOrders.OrderStatus = OrderStatusCodeType.Completed;" is not honored by the api call: xxxxxxxxxxxx ReturnAll xxxxx-xxxxx-xxxx-xxxx-xxxxxxxx 849 2014-02-02T09:56:46.777 2014-02-02T10:58:47.0135055Z What am I doing wrong here?
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered ·
I would need to get some specific information from you. But from looking at the above code you are doing nothing wrong. I just tried my GetOrders for both sandbox and production and it worked as expected.
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tonerkurier_de avatar image
0 Likes"
tonerkurier_de answered ·
Hi everybody, You're right, seems like it's working as expected. However I have to save/cache orders where checkout has not completed after buying multiple items locally - to ask for them later again. I tracked down my problems to the current implementation. Right now I do save the OrderID for later processing and ask in later runs again for the unfinished orders - and process them - if paid by the user. I do this like follows: StringCollection OrderIdCollection = new StringCollection(new[] { "xxxxxxxxxx-xxxxxxxxxx" }); getOrders = new GetOrdersCall(MC.eBay.Api.GetApiContext()); getOrders.OrderIDList = OrderIdCollection; getOrders.DetailLevelList = new DetailLevelCodeTypeCollection(); getOrders.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); getOrders.Execute(); This is working very well except if a user bought more than one item - let's say three - then I do get three different orders from the api - the last one seems to be right one wich contains all other items. Did I miss something in the getOrders()-Call here to tell the API that I only want to receive the one which contains everything? Thank you, Wayne
· 1 ·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Do I have to summarize those Orders which I get with mentioned call?
0 Likes 0 ·
jourbandts avatar image
0 Likes"
jourbandts answered ·
No, what you will see with a multi line item order, is you will get the OrderID for the OrderArray, and then you will also get each individual transaction in the transaction array. The difference is you will get the OrderLineItemID for each transaction. This is intended so you can get all the information for each transaction, but also have the total order information.
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tonerkurier_de avatar image
0 Likes"
tonerkurier_de answered ·
I think I've found the problem: I've "cached" orders which have not been completed yet locally in the database - during the next run those where checked again if their status has changed to "Complete". If so, they were injected. That worked for Single-Item-Orders without problems - but I've discovered - with multiple Items ebay seems to create a new order.orderID after the checkout is complete - if there are multiple items in an order. Didn't know that - I just hat to create a setOrder-Call for the newly generated Order.OderID instead of "the old one" which I've saved meanwhile as the order was not completed yet. Seems to work, but hard to debug.
·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered ·
Here is a best practice article. You want to not only ignore Active orders for the most part, but you also want to have a 2 minute buffer with your "now" time. Otherwise you can see order information change. The reason being is until the order is complete, the buyer can add more items, change shipping information, and more. So the data is not yet complete. What you are noticing is when a buyer "commits" to a buy, that will generate a transaction. And you can use GetOrders to see that transaction, but until the buyer completes checkout, you can't rely on that information. https://ebaydts.com/eBayKBDetails?KBid=1788
· 3 ·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I've honored the mentioned points so far. Another question: First getOrders-Call (time: 1pm minus 2minutes to 2pm minus 2 minutes) order is active. Next getOrders-Call (time: 2pm minus 2 minutes to 3pm minus 2 minutes). Do I get the formerly active order as completed in second call?
0 Likes 0 ·
You should not get any active orders. If you are seeing Active orders when only asking for Completed orders, you need to report this bug to us, http://developer.ebay.com/support/developersupport/default.aspx With that said, if the order was completed within your second time frame (2pm - 2 mins to 3pm - 2mins) then yes.
0 Likes 0 ·
I'm getting all orders again as I've experienced problems with orders in incomplete state as I do not get those again in subsequent calls if they've been finished after the first getOrders-call. That means I should just skip active orders as I should receive them in subsequent getorder-calls ? Thank you, Wayne
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.