Connect Magento order events to customer messaging
Magento Open Source and Adobe Commerce share the same event architecture: observers on sales_order_save_after (or the newer Adobe Commerce webhooks/Events service) react to order state changes with full access to the order model.
A small module registers an observer for the order states you message on, builds the payload from the order's billing data, and posts to the SendiMessage API with the key in env.php or environment variables. On Adobe Commerce cloud, App Builder actions or the Webhooks service reach the same endpoint without a deployed module. Delivery events return to your status_callback URL (embed the increment id in it) for order-comment write-backs.
What this integration enables
Implementation options
Architecture
- Magento (Adobe Commerce) eventA record changes, a stage moves, or a workflow fires
- Workflow or backendMagento (Adobe Commerce) automation or your middleware prepares the request
- SendiMessage APIPOST /send-message — the message is validated and queued
- Managed messaging lineYour dedicated line sends the message
- SMS or supported iMessageChannel routing picks iMessage where supported, SMS otherwise
- CustomerThe message arrives; the customer can reply
- Delivery or reply eventSendiMessage records what actually happened
- Signed webhookYour endpoint receives outbound or receive
- Magento (Adobe Commerce) timeline updateYour handler writes the event back as activity
Example request
{"number": "{{order.customer_phone}}","content": "Hi {{order.first_name}}, your order #{{order.number}} has shipped. Track it here: {{order.tracking_url}}","status_callback": "https://your-endpoint.example.com/status?order_id={{order.id}}"}
Template variables are examples — use your platform's own merge fields or values resolved by your handler. The API accepts only number, content, and optional media_url / status_callback / line_handle; store the returned message_handle on the order to match later events back.
Delivery events and incoming replies
Delivery events arrive on your status_callback URL with the order id you embedded in it, so your handler can mark the notification delivered on the order timeline; replies arrive on your webhook and can open a support conversation.
// "outbound" event → your magento endpoint// Verify the SendiMessage-Signature header (t={timestamp},v1=HMAC-SHA256 of// "{timestamp}.{raw body}", keyed with your webhook secret), then use// GET /v2/messages/{message_handle} for authoritative state and match it to// your order_id in magento.
Limitations and honest notes
- iMessage delivery is available on supported messaging lines and destinations. Recipients without iMessage receive SMS when fallback is configured — never assume universal iMessage availability.
- Messages are accepted asynchronously — the API returns status QUEUED and final status arrives via webhook or the message endpoints.
- No official SDK for this ecosystem yet — the example uses plain HTTP against the REST API. Official SDKs are published for JavaScript/TypeScript (npm: sendimessage), Python (PyPI: sendimessage), PHP (Composer: sendimessage/sdk), and Go (github.com/sendimessage/sendimessage-go). Every SDK is dependency-free and covers the full public API surface.
- A native Magento (Adobe Commerce) app is not available today; the methods on this page are API-based.
- Send messages only to recipients who expect them. Transactional and operational messaging is the primary use case — unsolicited bulk marketing is not.
Security considerations
- Keep the API key in your server or platform secret store — never in theme code, storefront scripts, or checkout customizations.
- Verify webhook signatures before updating order records.
- Send only what the message needs (phone, first name, order number) — never full order or payment details.
Frequently asked questions
Does SendiMessage have a native Magento (Adobe Commerce) app?
Can order notifications use iMessage?
Are abandoned-cart messages allowed?
Related integrations
Ready to connect Magento (Adobe Commerce)?
Request a messaging line and a SendiMessage integration specialist will review your Magento (Adobe Commerce) workflow and guide the setup.