Twilio Integration for Facilio
Introductionβ
Effective communication is crucial for facility operations, maintenance, and customer-facing teams. Twilio integration with Facilioβs Connected CMMS enables seamless SMS notifications, automated communication workflows, and centralized message logging within Facilio.
With Twilio integrated, teams can:
- Send real-time SMS alerts for Work Orders, Announcements, and operational workflows
- Track detailed SMS delivery status and error responses
- Maintain full communication history for audit readiness
- Improve team response times and reduce manual messaging
Configuring Twilio Integrationβ
1. Accessing Twilio Settingsβ
To configure Twilio:
- Go to your Facilio account
- Select Twilio Settings
- Enter your Twilio credentials and default sender number
2. General Configuration Fieldsβ
- Account SID β Your Twilio account identifier
- Auth Token β Secure token for authentication
- Default From Number β Twilio-verified sender number
Click Save to store the configuration.

Sending a Test SMSβ
- Open Twilio Settings
- Click Send Test SMS
- Enter recipient number in E.164 format
- Type your message
- Click Send

Note: Test SMS messages are not saved in the SMS Logs.
Viewing SMS Logs in Facilioβ
All automated or workflow-triggered SMS messages are recorded in SMS Logs.
Fields Available in SMS Logsβ
- ID β Unique log entry
- Name β Outbound message
- From β Sender number or sender ID
- Recipient β Receiver number
- Status β Delivered, Queued, Failed
- Message SID β Twilio message reference
- Source β Module or workflow that triggered the SMS
- Date Created / Date Sent β Timestamp details
- Message Body β The exact SMS text sent
- Error Message β Twilio error description
- Error Code β Twilio error code for troubleshooting

Note: SMS are sent immediately by Twilio, but the delivery status will be fetched and updated in the SMS Logs only after 10 minutes.
Automating Twilio SMS Notificationsβ
This section provides an overview of how to automate Twilio SMS communication using custom functions, which can be used in Workflows and Stateflows. These functions enable seamless interaction with Twilio for sending SMS messages, allowing automated alerts, reminders, and notifications to be triggered based on operational events. This ensures timely communication with technicians, tenants, and on-site teams, improving responsiveness and streamlining operations.
1. Send SMS (Default From Number)β
Function: sendSMS(String toNumber, String message, String source)
Description: Sends an SMS using the default Twilio from number configured in Twilio Settings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
toNumber | String | The recipient's phone number in E.164 format (e.g., +15551234567). |
message | String | The SMS text content to be sent. |
source | String | A short label indicating the origin of the message (e.g., Work Orders). |
Returns:
A Boolean value:
- `true` β SMS request successfully sent to Twilio
- `false` β SMS request failed (check SMS Logs for error details)
Example Usage in a Workflow Script:
status = new NameSpace("twilio").sendSMS(
"+1xxxxxxx",
"Your work order has been assigned.",
"Work Order Assignment"
);
console.log(status);
π Use Case in Workflows:
- Notify technicians when a Work Order is assigned
- Send reminders for upcoming preventive maintenance tasks
- Trigger announcements to tenants for scheduled downtime or service updates
- Broadcast emergency notifications to on-site teams
- Send quick alerts for inspections, checklists, or follow-ups
2. Send SMS with Custom From Numberβ
Function: sendSMSFrom(String fromNumber, String toNumber, String message, String source)
Description: Sends an SMS using a custom sender, allowing you to override the default Twilio number and use a specific Twilio phone number or an Alphanumeric Sender ID (when supported by your Twilio account and the recipientβs country). This is useful when you need to send messages using site-specific numbers or country-specific numbers.
Parameters:
| Parameter | Type | Description |
|---|---|---|
fromNumber | String | Sender identifier β must be a Twilio-verified phone number in E.164 format (e.g., +15551234567) or an Alphanumeric Sender ID, if supported. |
toNumber | String | The recipient's phone number in E.164 format (e.g., +15551234567). |
message | String | The SMS text content to be sent. |
source | String | A short label indicating the origin of the message (e.g., Work Orders). |
Returns:
A Boolean value:
- `true` β SMS request successfully sent to Twilio
- `false` β SMS request failed (check SMS Logs for error details)
Example Usage in a Workflow Script:
status = new NameSpace("twilio").sendSMSFrom(
"+1xxxxxxx", // Custom sender number or Alphanumeric Sender ID
"+1xxxxxxx", // Recipient number
"Your work order has been updated.",
"Work Order Update"
);
console.log(status);
π Use Case in Workflows:
- Use country-specific numbers for region-based communication
- Use site-based numbers for large portfolios or multi-campus operations
- Send messages using a branded Alphanumeric Sender ID (if approved and supported)
- Notify tenants using a public-facing sender name
- Trigger emergency alerts from a designated high-priority sender
- Send leases, announcements, or utility outage messages from department-specific numbers
Recommended Phone Number Formatβ
All phone numbers must follow E.164 international format, such as:
+15551234567
+971501234567
+919876543210
Using phone numbers in E.164 format will significantly improve SMS delivery success and routing accuracy.
Benefits of Twilio Automationβ
- Real-time technician, vendor, and customer alerts
- Complete message visibility and auditability
- Reduction of manual communication tasks
- Centralized communication history
- Availability of region-specific or site-specific sender numbers
- Seamless integration with Workflows and Stateflows
Troubleshooting & Supportβ
If SMS delivery fails:
- Verify Account SID, Auth Token, and From Number
- Ensure recipient number is in E.164 format
- Ensure Twilio account has sufficient credits
- Confirm Sender ID is supported in the destination country
- Check SMS Logs for Error Code and Error Message
- Review Twilioβs regional SMS guidelines
For unresolved issues, contact support@facilio.com.
Frequently Asked Questions (FAQ)β
What is the recommended phone number format?
Does Facilio track Twilio SMS credits?
Is Alphanumeric Sender ID supported for sending SMS?
Twilio only delivers Alphanumeric Sender IDs if:
* The Twilio account< supports Alphanumeric Sender IDs
* The destination country allows them
* Required registrations/approvals are completed
Facilio passes the βFromβ value exactly as provided, but Twilio determines whether delivery is allowed.
Why is my SMS status showing βfailedβ
* Incorrect phone format (not E.164)
* Twilio credit exhaustion
* Sender ID restrictions
* Carrier filtering
* Invalid phone number
* Incorrect Twilio credentials
Review SMS Logs for detailed error messages.
Can I send SMS using region-specific or site-specific numbers?
Does Facilio retry failed messages automatically?
What is the maximum SMS message length?
Overall maximum limits with segmentation:
A. GSM-7 encoding:
1) Single message limit: 160 characters
2) Segmented limit: ~1,600 characters total
3) Each segment after splitting carries 153 characters
B. UCS-2 encoding (Unicode, emojis, non-Latin):
1) Single message limit: 70 characters
2) Segmented limit: ~737 characters total
3) Each segment after splitting carries 67 characters
Anything beyond these total limits will be truncated and not delivered.
Twilio charges per segment, not per original message.
Summaryβ
Facilioβs Twilio integration enables reliable, automated SMS communication for operational workflows. By combining configurable sender options, detailed message tracking, and workflow automation, organizations can streamline communication and improve service response times.
For additional guidance or troubleshooting, contact support@facilio.com.