Developer forum

Forum » Feature requests » Add AccessUserId entry to EcomOrderDebuggingInfo

Add AccessUserId entry to EcomOrderDebuggingInfo

Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

This is hopefully a quick feature, but it will be very valuable. We sometimes need to track down a missing cart or order that goes missing for some reason or other. It's difficult to do so after a cart or order is fully deleted.

Sometimes we have luck looking in EcomOrderDebuggingInfo if the user's IP is known and current. But IPs change and that doesn't always work.

It would be nice if there is always an entry added to EcomOrderDebuggingInfo when a cart is created. It should include the OrderDebuggingInfoOrderAutoId and the user's AccessUserId. That would let us see all carts ever created for a particular user.

Thanks!

Scott


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

+1

We have the same challenges with missing or deleted carts

Adrian

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Thanks Adrian for the +1.

And one more point to this is that a cart can start with an anonymous user, so, if it does, it should log the user to EcomOrderDebuggingInfo when the user is known (logs in) since it wouldn't have been known when the cart was first created.

Scott

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Bump.

This is becoming more of a pressing issue for us. We've lost some carts recently that is becoming a serious issue with an important customer.

Is there any chance this could be added to an upcoming hotfix? We'll upgrade the customer's site as needed (on 9.10.x).

I believe it's as easy as adding a single entry to EcomOrderDebuggingInfo when a cart is created if it's an authenticated user.

Thanks!

Scott

 
Nicolai Pedersen
Reply

Hi Scott

I have added this to the loglines:

UserID/name/secondaryid:{order.CustomerAccessUserId}/{order.CustomerAccessUserUserName}/{order.SecondaryUserId}

It does take the userid registered on the order and not the currently logged in user. This is on purpose so that can be followed.

There are situations where carts can be completely deleted - if a customer alls cartcmd=emptycart. We discussed the option to create a setting that would never ever call hard delete on orders, but always only mark them as deleted. Maybe that could be handy for situations like this - and explicitly log on orders why they got deleted.

Let me hear your thoughts.

BR Nicolai

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Nicolai,

That log entry looks good. What about in EcomOrderDebuggingInfo? Would it make sense to have it in EcomOrderDebuggingInfo too? The problem I ran into is that an order was deleted and it was logged in EcomOrderDebuggingInfo but I didn't have a way to figure out which AutoId or OrderId was used for that deleted order. If there was a link from the UserId (or SecondaryUserId), then I could find all carts from a particular user on that day. It's ok if it's in the body of the message. It could have a single entry added to EcomOrderDebuggingInfo when the order is created.  (or maybe you meant EcomOrderDebuggingInfo and I misunderstood)

The general log would be helpful also, I believe.

Regarding deleting orders, that sounds like a great idea to just soft delete them. It would protect us from situations like this, to be able to dig up those orders again. I can't envision that it would clutter up the EcomOrders table since the percentage of deleted orders is a fraction of the regular orders. It would happen with problem situations like this, or if someone creates a cart and empties the lines, causing the header to be deleted. I'm sure there are a few other situations. In all cases, having access to the original order sounds great.

Thanks!

Scott

 

 
Nicolai Pedersen
Reply
This post has been marked as an answer

This is EcomOrderDebuggingInfo :-). We can add additional info like cart created etc.

We will look into being able to disable hard deletes all over.

BR Nicolai

Votes for this answer: 1
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Perfect, that sounds really good then. Having that info logged when the cart is created will be very helpful, and disabling the hard deletes everywhere will be a great bonus for protecting the integrity of orders and trackability.

One more bonus while you're in there may be to also log an event when a cart switches from anonymous to authenticated, and log the same order user fields. That would track it as soon as possible after determining who the user is when it's an anonymous user. (just a bonus one. I don't mean to keep slowly growing the scope ;))

Thanks again.

Scott

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is this request included already in the new versions?

Thank you,

Adrian

 
Nicolai Pedersen
Reply

Yes

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Great!

Thank you,
Adrian