Salla Docs
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Communication Apps
  • Overview
  • Get Started
  • Interfaces and Responses
  • Examples
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Communication Apps

Overview

Communication Apps: Overview#

A Communication App on Salla lets you take over message delivery for any merchant who installs your app. When Salla needs to send an SMS, Email, or WhatsApp message to a customer, it fires an event that calls your App Function. Your function receives the full message payload, calls your chosen provider (Twilio, SendGrid, 360dialog, Unifonic, or any other), and returns the result.
Merchants benefit from using their own provider accounts, sender IDs, and templates. You control the routing and delivery logic entirely through code.
If you are new to App Functions, read the App Functions reference first. It covers execution types, the Resp utility class, runtime constraints, and how to use the Partner Portal editor. This guide assumes that foundation and focuses entirely on Communication Apps.

How it works#

The diagram below shows the full lifecycle of a single outgoing message, from a store event through your function to the provider.
Store event occurs
(order placed, OTP requested, cart abandoned, etc.)
         |
         v
Salla fires a communication event
(communication.sms.send / communication.email.send / communication.whatsapp.send)
         |
         v
Your App Function is called
(receives recipient, content, type, entity, meta)
         |
         v
Your function calls your provider API
(Twilio, SendGrid, 360dialog, etc.)
         |
         v
Your function returns Resp.success() or Resp.error()

Supported channels#

Each channel maps to a Supported Feature you declare in the Partner Portal and a dedicated App Function event. The Supported Feature is what makes your app appear on the merchant side as the active handler for that message type - once selected, your app takes full ownership of all messages for that feature.
Supported FeatureEvent nameWhat your app handles
Local SMScommunication.sms.sendSMS messages to KSA numbers (+966...)
International SMScommunication.sms.sendSMS messages to numbers outside KSA
Emailcommunication.email.sendAll email messages
WhatsAppcommunication.whatsapp.sendAll WhatsApp messages
Local SMS and International SMS both arrive through the same communication.sms.send event. If you select both Supported Features, your app handles all SMS traffic regardless of destination. You can inspect notifiable[0] to apply provider-specific routing by number prefix if needed.

What Salla sends to your function#

Every communication event delivers the same payload shape inside context.payload.data. These fields are all you need to route and deliver a message through your provider.
FieldTypeDescription
notifiablestring[]One or more recipients (phone numbers or email addresses)
typestringWhy this message is being sent (e.g. auth.otp.verification, order.status.updated)
contentstringThe ready-to-send message body
entityobject | nullRelated store entity (order, shipment, product, etc.) or null
metaobjectAdditional context (e.g. customer_id, OTP code)
A full list of type values is in the Interfaces and Responses reference.

What you control#

Use this table to clarify the boundary between what Salla owns and what your app is responsible for.
ConcernOwned by
Deciding when to send a messageSalla
Which message types your app handlesSupported Features (configured in the Partner Portal)
Routing to your providerYour App Function
Provider credentialsYour App Settings
Template content and sender IDsYour provider account
Observing message outcomesYour App Function (logging and responses)

What this guide covers#

Each page below addresses one distinct concern. Start with Get Started, then refer to other pages as you build out each channel.
PagePurpose
Get StartedCreate the app, configure Supported Features, and add your first function in the Partner Portal
Interfaces and ResponsesContext structure, event types, and TypeScript interfaces
ExamplesPractical handler examples for SMS, Email, and WhatsApp

Next steps#

Ready to build? Start with Get Started to create your app in the Partner Portal and wire up your first function.
Modified at 2026-03-08 22:10:17
Next
Get Started