1. Communication Apps
Image
Salla Platform Docs
  • Overview
  • Get Started
  • App Channels Configuration
  • Set Up Your Provider (Twillo)
  • Build Your App Function
  • Test & Go Live
  • Event & Payload Reference
  • Examples
  • Root
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  1. 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.

Prerequiste#

Partners account
It is a must to have a good foundational background in App Functions
Already familiar with App Functions?
Jump directly to Build Your App Function if you already have your app created and your provider set up.
Good to know
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#

When a store event occurs, an order status change, a new customer registration, an OTP request, Salla intercepts it and, instead of sending the message itself, fires an event to your App Function. Your function receives the full message payload, calls your provider, and returns the result. Salla never touches the delivery layer.
The diagram below shows the full lifecycle of a single outgoing message.

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
Important
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 Event & Payload Reference.

What you control#

Salla owns the trigger. You own the delivery. Here's the full boundary:
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#

Create Your App & Configure Channels
Create the app in the Partner Portal and declare which channels you handle.
Set Up Your Provider
Configure Twilio (or any provider) and prepare your credentials.
Build Your App Function
Understand the payload, write your handler, and configure App Settings.
Test & Go Live
Test end-to-end from the dashboard, preview panel, and publish.
Events & Payload Reference
Full payload interface, event type list, entity reference, and error code table.
Examples
Ready-to-use handler code for SMS, Email, and WhatsApp — including OTP handling, multi-channel routing, and a SendGrid and Meta implementation.
Modified at 2026-05-12 12:03:04
Next
Get Started
Advertisement
Advertisement