Extracting only sales from sale where accountID != 0

shuareyshuarey Member Posts: 2

I have tried a few different parameters, but I can't filter the data down to sales that were either charges or credits to specific customers. So far, all I've got is the following query:


I've tried making the zero wrapped in quotations and just set it to greater than zero, etc.

Basically, I'm just trying to get all Sale objects that have customerID not equal to zero.

If anyone has an idea, I'd appreciate it.



  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 625 moderator
    edited September 2019

    Hey @shuarey,

    Thank you for your question. To execute a query like that you'll need to do something like this


    You can read more about how to use query parameters here: https://developers.lightspeedhq.com/retail/introduction/parameters/

    Hope this helps!

    Adrian Samuel

    Integrations & Solutions Developer - Strategic Solutions

    Lightspeed HQ

  • shuareyshuarey Member Posts: 2

    Thank you Adrian. That helped! It took about 10k results out of my query. Additionally I filtered out another 30k results by saying Sale.SalePayments.SalePayment.paymentTypeID=,4

Sign In or Register to comment.