Get SaleVoid query missing time range options and option to filter by SaleId

guyrbissonguyrbisson Member Posts: 10

We are exclusively a read-only integration with Lightspeed Retail. We are required to report on voided sales on a per day basis per site. We are encountering two problems.

1) Unless you know the exact SaleVoidID, you cannot avoid (yes, pun intended :-) having to retrieve *all* voided transactions for account.

2) The SalesVoidID is not part of the Sale object. Yes, you can tell if the transaction is voided but you cannot easily recover the SaleVoid data without having to retrieve all voided transactions (see 1) and then filtering down to either the time range in question or finding the SaleVoid object that matches the SaleId of the sale being processed.

Of course, as this is only searchable by account the greater the number of a customer's voided transactions across all of the shops , the bigger the issue. I've tried optimising our code so that it only retrieves the Void data once per processing but this step alone takes 30-40% of my lambda's processing time for the very few times it is required. And this is only for an account with two shops. I hate to imagine what performance will be like for large accounts.

I would love to see either

1) the ability to set SaleVoid as a relation during the Sale query, or

2) have the Sale itm return the SaleVoidID as part of the Sale query so that we only have to retrieve the few voided transactions.

Sign In or Register to comment.