Jump to content

Average Time of Order Accepting


hogava

Recommended Posts

No such feature exists. Moreover WHMCS doesn't record any date when the order completes meaning that if you want to get Average Time, first you'll need to store this date somewhere.

5 hours ago, hogava said:

how can i see Average Time between ordering and completing it?

What do you mean with the expression "completing"? Invoice paid? Order accepted?

Link to comment
Share on other sites

On 26/05/2019 at 12:26, Kian said:

What do you mean with the expression "completing"? Invoice paid? Order accepted?

the answer to that question is important because WHMCS does log when an order is placed, when it's accepted and also when an invoice is paid - so a time calculation could be made between any two conditions and averaged out.

Edited by brian!
Link to comment
Share on other sites

1 hour ago, brian! said:

the answer to that question is important because WHMCS does log when an order is placed, when it's accepted and also when an invoice is paid - so a time calculation could be made between any two conditions and averaged out. 

Really? Where? 🤔 Order placed and invoice paid are in tblorders.date and tblinvoices.datepaid but I have no idea where's the date for order accepted.

Link to comment
Share on other sites

On 26/05/2019 at 14:55, Kian said:

Really? Where? 🤔 Order placed and invoice paid are in tblorders.date and tblinvoices.datepaid but I have no idea where's the date for order accepted.

aahh, I thought I had said where... my bad 🙄

it's not stored in a simple way as per tblorders or tblinvoices, but it will (should is probably safer to say!) be stored in the activity log, so tblactivitylog...

a5JX0Ja.png

so the activitylog stores when an order is placed and when it's accepted... as you already know, you will more easily be able to get the date an order was placed from tblorders, then you'd have to query tblactivitylog to see if the order has been accepted (and not later returned to pending etc), and if so grab the date, do your calculation and then repeat for other orders, and finally average out the results... so not as straightforward as if the acceptance date was stored in the tblorders table, but with some effort, it should be possible to calculate an average time between placing and accepting. 🙂

Link to comment
Share on other sites

I was suspecting that. Personally I would create a dedicated table/column somewhere else. Joining tblorders with tbltickets and then with tblactivitylog on "description" column (TEXT field with no index and thousand of records) is inefficient. But I understand that 95% of times there will be no problem at all.

Link to comment
Share on other sites

1 minute ago, Kian said:

Personally I would create a dedicated table/column somewhere else.

I wouldn't argue with that - for a new user with a clean database, having a separate t/c would make sense... whereas, if you have years of existing data and then decide you want to know the average time between the two events, that's not as sensible (though still doable).

2 minutes ago, Kian said:

Joining tblorders with tbltickets and then with tblactivitylog on "description" column (TEXT field with no index and thousand of records) is inefficient.

I wasn't suggesting joining tblactivitylog into the query. 🙂

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated