How to track new sale in Lightspeed

renjithmbrenjithmb Posts: 12Member

Is there is way to track new sale in Lightspeed through API. Please advice.

2 comments

  • Adrian SamuelAdrian Samuel Posts: 402Moderator, Lightspeed Staff moderator

    Hey @renjithmb, we the best thing would be to run a cron-job to check for new sales every X minute(s). If you persist the data of the count, you can use that to compare new sales.

    It would go something like this:

    Every 60 Seconds:

    Make a request to the Retail API, check the ["@attributes"].count value and store it in a database.

    In the next iteration (i.e.) in the next 60 seconds, check to see if the count is greater than the previously stored count value, and then grab the details from the difference.

    Hope this helps!

  • renjithmbrenjithmb Posts: 12Member
Sign In or Register to comment.