SMS (Text Message)

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

This action sends a text/SMS message to the recipient using Twilio.

Test Mode SMS Restrictions

The SMS action includes built in safety logic to prevent accidental text messages during testing or development.

Event Test Mode Check

When an Action is associated with an Event, that Event has a TestMode boolean property.
When TestMode is true, the SMS action applies phone number filtering.

Allowlist Configuration

The system checks the TestModeSMSPhoneNumberAllowList setting stored in the Settings table.
This setting contains a list of phone numbers that are allowed to receive messages during testing.

Number Comparison

The system extracts digits only from the resolved phone number using StringHelper.DigitsOnly.
This removes formatting like plus signs, hyphens, spaces, and parentheses.

It checks whether the resulting digits exist in the allowlist.

If your allowlist contains 5551234567, it will match numbers formatted as:

  • +1 (555) 123 4567
  • 555 123 4567
  • 555-123-4567
Filtering Logic

If TestMode is false, all phone numbers are allowed.

If TestMode is true and the phone number is in the allowlist, the SMS is sent.

If TestMode is true and the phone number is not in the allowlist:

  • A log entry is created: Phone number removed due to test policy
  • An exception is thrown: "To" property has resolved to an empty string"
  • The SMS is not sent

Why This Exists

This prevents developers and testers from accidentally sending SMS messages to real customers.
You can safely test Events using production like data without sending messages to actual phone numbers.

Configuration

The TestModeSMSPhoneNumberAllowList commonly includes:

  • Developer or QA team mobile numbers
  • Test phone numbers
  • A company owned Twilio test number

Important Note

The error message "To" property has resolved to an empty string" is misleading.
The phone number did not resolve to empty. It was intentionally filtered out by test mode rules.
The real reason is visible in the system logs.

Practical Usage

When setting up a test Event that sends SMS:

  1. Set Event.TestMode = true
  2. Add your test phone numbers, digits only, to TestModeSMSPhoneNumberAllowList
  3. Trigger the Event
    Only allowlisted numbers receive SMS messages
  4. When ready for production, set Event.TestMode = false to disable filtering
Path Params
string
required

Identifies the type of record you will be performing the Action on. For example, Claim, Policy, Invoice, etc.
Works with all Domains.

integer
required

This is the ID of the record to which the sms message will be associated.

Body Params
parameters
object
required
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json