onStockOrderCollected

Purpose

Triggered when a stock order is collected/delivered. Use this hook to track inventory updates and log deliveries.

When It Triggers

  • Employee or owner collects a ready stock order

  • Stock is added to the shop's inventory

Parameters

Parameter
Type
Description

data.source

number

Server ID of who collected

data.shopId

string

Unique shop identifier

data.shopName

string

Display name of the shop

data.orderId

string

Unique order identifier

data.items

table

Array of collected items

data.totalItems

number

Total items collected

data.totalValue

number

Total value of order

data.orderDate

string

When order was placed

data.collectedBy

string

Name of person who collected

data.collectedByIdentifier

string

Identifier of person who collected

data.newStockLevels

table

Updated stock levels for each item

data.timestamp

number

Server timestamp

Example

Last updated