📦 Process orders and update external systems
🔄 Sync inventory across platforms
📧 Send custom notifications
✔️ Validate and transform data
🔌 Integrate with third-party services
⚙️ Implement custom business logic
payload — Event-specific data (order details, product information, customer data, etc.)
settings — Your app's configuration values defined in the Salla Partner Portal and customized by each merchant
merchant - An object contains the merchant info on which the Action/Event occures.
🔐 Call Salla APIs (with automatic authentication)
🔌 Integrate with external services
✔️ Return responses that affect the store's behavior (for synchronous actions)
🔄 Process data asynchronously in the background (for events)
⚠️ Blocks the user — Merchant cannot proceed until your function responds
⚡ Must respond in milliseconds — Target < 500ms for good user experience
⏱️ Maximum timeout — 5 seconds (but this creates poor UX)
🔄 Executed in real-time, synchronously
✔️ Can return data that affects the operation
✔️ Can modify or reject the action
⚠️ Critical performance — Slow responses create poor user experience
✔️ Action completes immediately (user doesn't wait)
⚡ Event is queued for background processing (happens in < 1 second)
🔄 Function executes in background (max 30 seconds timeout)
ℹ️ Your return value doesn't affect the original action
👥 Works for both merchant actions and customer interactions
✔️ User cycle is never impacted - queuing is instant
✔️ Ideal for non-critical operations