Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Recurring Payments API
  • App Functions
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Recurring Payments API
  • App Functions
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. App Functions
  • Welcome 👋
  • What are App Functions?
  • Get Started
  • Supported Events
  • Testing
  • Responses
  • NodeJs Support
  • Merchants Events
    • Brand Events
    • Cart Events
    • Category Events
    • Communication Events
    • Customer Events
    • Invoice Events
    • Review Events
    • Shipment Events
    • Shipping Company Events
    • Shipping Zone Events
    • Special Offer Events
    • Store Branch Events
  • Customers Events
    • Account Events
    • Cart & Checkout Events
    • Product Events
    • Promotion & Coupon Events
    • Wishlist Events
  1. App Functions

Welcome 👋

Overview#

Welcome to the App Functions documentation for third-party developers. This comprehensive guide will help you build powerful, event-driven applications on Salla platform.

What are App Functions?#

App Functions allow you to embed custom logic directly into the lifecycle of merchant and customer activities on Salla. Write serverless functions that execute automatically when specific events occur in a store - no infrastructure to manage, automatic scaling, and seamless integration with Salla APIs.

📚 Documentation Structure#

Core Documentation#

📖 What are App Functions? — Introduction to App Functions, execution types, pricing, and benefits
🚀 Get Started — Get started with your first App Function in minutes
📋 Supported Events — Complete list of all available merchant and customer events
🧪 Testing App Functions — Comprehensive guide to testing your App Functions

Event Reference#

The event directories contain detailed schemas and examples for all available events:
🏷️ Brand Events — Brand creation, updates, and deletion
📦 Order Events — Order lifecycle events
🛍️ Product Events — Product management events
👤 Customer Events — Customer account events
🚚 Shipment Events — Shipping and fulfillment events
And many more...

Quick Links#

Getting Started#

1.
Read the Overview to understand App Functions
2.
Follow the Quick Start to create your first function
3.
Explore Supported Events to find events for your use case
4.
Learn Testing to validate your functions

Key Concepts#

Execution Types#

Synchronous Actions — Execute immediately, block the user, must respond in milliseconds (e.g., shipment.creating)
Asynchronous Events — Process in the background after the operation completes (e.g., order.created)
Customer Events — Triggered by storefront interactions, always asynchronous

Context Object#

Every function receives a context object:

Pricing#

App Functions are currently in beta and free of charge. When generally available, pricing will be based on:
Number of function calls
Execution time
Resource usage

Common Use Cases#

Merchant Events#

Order Management — Send confirmations, sync with fulfillment systems
Inventory Sync — Update external inventory systems when products change
Shipping Integration — Calculate rates, generate labels, track shipments
Customer Sync — Update CRM systems with customer data
Analytics — Track business metrics and generate reports

Customer Events#

Behavior Tracking — Monitor product views, searches, and interactions
Cart Recovery — Send reminders for abandoned carts
Personalization — Customize user experience based on behavior
Marketing — Trigger campaigns based on customer actions
Analytics — Track conversion funnels and user journeys

Example Function#

Here's a simple example that sends order data to a webhook:

Best Practices#

Keep Functions Focused#

Each function should have a single, clear purpose. Break complex logic into multiple functions.

Use Settings for Configuration#

Store API keys, URLs, and feature flags in app settings, not in code.

Return Consistent Responses#

Always return an object with a success boolean and relevant data or error information.

Test Thoroughly#

Test with various scenarios including success cases, failures, and edge cases.

Validate Input Data#

Check that required data exists before using it to prevent runtime errors.

Keep Responses Small#

Return only necessary data. Large responses can slow down execution and make debugging difficult.

Available Events#

Merchant Events (50+ events)#

Orders — created, updated, cancelled, refunded, etc.
Products — added, updated, deleted, quantity low, etc.
Shipments — creating (sync), created, cancelled, updated
Customers — created, updated, login, OTP request
Brands — created, updated, deleted
Categories — created, updated
Store — branch management, tax configuration
Cart — abandoned cart
Coupons — applied
Invoices — created
Special Offers — created, updated
Reviews — added
Checkout — started, step completed

Customer E-commerce Events (25+ events)#

Product Interactions — viewed, clicked, searched, shared, reviewed
Cart & Checkout — product added/removed, cart viewed/updated, checkout flow
Promotions — viewed, clicked, coupon entered/applied/denied/removed
Wishlist — product added/removed, added to cart
User Account — signed in/up/out, profile updated

Resources#

Documentation#

Salla Developer Docs — Salla Developer Docs
API Reference — Salla API Documentation
Webhooks Guide — Webhooks, Scopes & Events

Tools#

Partner Portal — portal.salla.partners
Demo Stores — Testing with Demo Stores
App Settings — Building App Settings

Support#

Community — Join our developer community
Partner Portal — Access support through the portal
Documentation — Comprehensive guides and references

TypeScript Support#

All events have TypeScript interfaces for better development experience:

Next Steps#

Ready to get started? Follow these steps:
1.
Read The Overview - Understand the fundamentals
2.
Complete Quick Start - Build your first function
3.
Explore Events - Find the right events for your app
4.
Test Your Functions - Ensure everything works correctly
5.
Review Event Schemas - Understand the data structures
Happy coding! 🚀
Modified at 2025-11-17 11:41:06
Next
What are App Functions?