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 Feature | Event name | What your app handles |
|---|
| Local SMS | communication.sms.send | SMS messages to KSA numbers (+966...) |
| International SMS | communication.sms.send | SMS messages to numbers outside KSA |
| Email | communication.email.send | All email messages |
| WhatsApp | communication.whatsapp.send | All 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.| Field | Type | Description |
|---|
notifiable | string[] | One or more recipients (phone numbers or email addresses) |
type | string | Why this message is being sent (e.g. auth.otp.verification, order.status.updated) |
content | string | The ready-to-send message body |
entity | object | null | Related store entity (order, shipment, product, etc.) or null |
meta | object | Additional context (e.g. customer_id, OTP code) |
What you control#
Use this table to clarify the boundary between what Salla owns and what your app is responsible for.| Concern | Owned by |
|---|
| Deciding when to send a message | Salla |
| Which message types your app handles | Supported Features (configured in the Partner Portal) |
| Routing to your provider | Your App Function |
| Provider credentials | Your App Settings |
| Template content and sender IDs | Your provider account |
| Observing message outcomes | Your 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.| Page | Purpose |
|---|
| Get Started | Create the app, configure Supported Features, and add your first function in the Partner Portal |
| Interfaces and Responses | Context structure, event types, and TypeScript interfaces |
| Examples | Practical 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