Skip to content

Node.js server for Lightspeed Retail (X-Series) automation. Handles specific sale events and adds predefined items automatically using Lightspeed's Workflows API. Simplifies retail operations through automated workflow actions.

Notifications You must be signed in to change notification settings

tavarezlspd/xworkflowsapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Lightspeed Workflow Server

This project is a Node.js server that handles Lightspeed Retail (X-Series) workflow events. It listens for specific events, such as sale.line_items.added, and automatically adds items to sales when triggered.

Repository: xworkflowsapp

Features

  • Receives and processes workflow events from Lightspeed Retail (X-Series).
  • Automatically adds a specific line item to a sale when triggered.
  • Prevents duplicate item additions.

�4. Update Product ID:

  • Open server.js and replace the targetItemId with the product_id of the line item from your Lightspeed X-Series account.
  1. Install Dependencies:

    npm install
  2. Run the Server:

    npm start
    • The server will run on PORT specified in the environment or default to 3000.

Endpoint

  • POST /lightspeed/workflow

    • Receives workflow events from Lightspeed.
    • Adds a specific item to the sale if the event type is sale.line_items.added.

    Example request body:

    {
      "event_type": "sale.line_items.added",
      "line_items": [
        {
          "product_id": "some-product-id"
        }
      ]
    }

Deployment

This server can be deployed using any Node.js-compatible hosting service, such as:

  • Render
  • Heroku
  • AWS
  • DigitalOcean

Ensure the server is accessible via a public URL and configure the Lightspeed Retail (X-Series) app to send POST requests to the /lightspeed/workflow endpoint.

Security

  • Validate requests to ensure they originate from Lightspeed (e.g., using a shared secret).
  • Add rate limiting to prevent abuse.

License

This project is open source and available under the MIT License.

About

Node.js server for Lightspeed Retail (X-Series) automation. Handles specific sale events and adds predefined items automatically using Lightspeed's Workflows API. Simplifies retail operations through automated workflow actions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published